Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metricIDNameMap and use ListMetrics to construct metric queries #10627

Merged
merged 84 commits into from
Feb 19, 2019
Merged

Remove metricIDNameMap and use ListMetrics to construct metric queries #10627

merged 84 commits into from
Feb 19, 2019

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Feb 6, 2019

@jsoriano Thanks for pointing this out to me that I don't need a metricIDNameMap to convert between AWS cloudwatch metric names and ec2 metricset names. This PR is to add cloudwatch metric names into schema.

This PR also includes a bug fix: when AWS EC2 instances are in states other than running, metrics are not collected and sent to ES.

ph and others added 30 commits November 27, 2018 10:51
Remove default version qualifier and rename the environment variable to set it from `BEAT_VERSION_QUALIFIER` to `VERSION_QUALIFIER` this will align with other parts of the stack.

**Tested with filebeat.**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:39:01]
filebeat version 7.0.0 (amd64), libbeat 7.0.0 [0a0c267 built 2018-11-19 13:38:15 +0000 UTC]
```

**Without the patch**
```
 ❯ ./filebeat version                                                                                                                                                                                                                                                                                                                                          [08:40:07]
filebeat version 7.0.0-alpha1 (amd64), libbeat 7.0.0-alpha1 [b007837 built 2018-11-19 13:39:59 +0000 UTC]
```

Fixes: #8384
@kaiyan-sheng
Copy link
Contributor Author

jenkins, test this

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all the comments.

It LGTM, but before merging please move the testing utils to specific testing files so we don't include testing code in non-testing files.

x-pack/metricbeat/module/aws/ec2/ec2.go Show resolved Hide resolved
x-pack/metricbeat/module/aws/utils.go Outdated Show resolved Hide resolved
@kaiyan-sheng kaiyan-sheng merged commit 589fd32 into elastic:master Feb 19, 2019
@kaiyan-sheng kaiyan-sheng deleted the change_schema_ec2 branch February 19, 2019 17:05
kaiyan-sheng added a commit that referenced this pull request Feb 25, 2019
…struct metric querie… (#10837)

* Remove metricIDNameMap and use ListMetrics to construct metric queries (#10627)

* Remove metricNameIDMap and use ListMetrics to construct metric queries

* Add utils.go to put common functions for all metricsets

* Remove fields that dont need to apply schema

* Remove s.Optional in schema and use s.FailOnRequired instead

* Regenerate data,json

* Move GetMetricDataResults into utils.go

* Replace with report.error

* Separating TestData from TestFetch

* Move two functions only used by integration tests into a separate file

* Move aws_testing.go under mtest

(cherry picked from commit 589fd32)

* Remove debug lines
@kaiyan-sheng kaiyan-sheng removed needs_backport PR is waiting to be backported to other branches. review v7.0.0 labels Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement Metricbeat Metricbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants