-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add Metricbeat AWS EC2 Module #9257
Conversation
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
I'm thinking by following https://github.com/elastic/ecs#network, rename the cpu related metrics to |
For the metrics best follow the naming scheme that the system metricbeat module uses. |
@ruflin Yes good point, but some of the cloudwatch metrics don't have a direct match to metrics in system metricbeat module. What I found can be a direct map are:
What do you think? |
Yes, lets only map the ones that exist, the other ones which are EC2 specific I would keep prefixed. Some of the above values are actually matching to ECS which is even nicer: https://github.com/elastic/ecs#network For the cpu / disk ones: Keep in mind that they are prefixed by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great @kaiyan-sheng 🎉 🎉. I left a few comments, nothing major.
I'm not very comfortable with the need of a mock
config param for tests, will try to think of alternatives to that and propose them here 😇
@ruflin about metric names, as there is no direct map with At some point we will also want this to work with current Waffle map view and others, let's review the metrics that are being used there and see our options. For instance, we could put those under |
@exekias I like the idea to start to play with aliases here. We will have to make sure that the units etc. are all in sync. |
@exekias I thought about the
The AWS CLI stores the credentials that you specify with aws configure in a local file named credentials in a folder named .aws in your home directory
Both |
That's an interesting approach, let's split the testing part from client settings. Historically our users struggle with external files for configuration, as it requires more orchestration to configure. I think previous config was better as it allowed using config params, and if you want, pass these params through ENV vars. I've found a possible solution to avoid
Let me know what you think! I'll have a look to the mock and post again :) |
Sounds good. Thanks for testing it and for all the comments. I created a meta issue for this and also added a checklist for this PR. I will merge this PR and create a new PR to address the rest of the comments. |
This PR is to add AWS EC2 metricset into metricbeat. This PR enables metricbeat to periodically fetch EC2 monitoring metrics from AWS Cloudwatch using GetMetricData API. Also for each EC2 instance, it uses DescribeInstances API to get detailed information about a specific instance.
Checklist:
data.json
exists and an automated way to generate it exists (go test -data
)There are 16 cloudwatch metrics for EC2 monitoring collected by AWS EC2 module:
CPUUtilization -> aws.ec2.cpu.total.pct
CPUSurplusCreditBalance -> aws.ec2.cpu.surplus_credits_balance
CPUSurplusCreditsCharged -> aws.ec2.cpu.surplus_credits_charged
CPUCreditBalance -> aws.ec2.cpu.credit_balance
CPUCreditUsage -> aws.ec2.cpu.credit_usage
NetworkPacketsIn -> aws.ec2.network.in.packets
NetworkPacketsOut -> aws.ec2.network.out.packets
NetworkIn -> aws.ec2.network.in.bytes
NetworkOut -> aws.ec2.network.out.bytes
DiskReadBytes -> aws.ec2.diskio.read.bytes
DiskWriteOps -> aws.ec2.diskio.write.bytes
DiskReadOps -> aws.ec2.diskio.read.ops
DiskWriteBytes -> aws.ec2.diskio.write.ops
StatusCheckFailed -> aws.ec2.status.check_failed
StatusCheckFailed_System -> aws.ec2.status.check_failed_system
StatusCheckFailed_Instance -> aws.ec2.status.check_failed_instance
Also this PR adds metric collection for basic AWS EC2 instance information:
cloud.provider
cloud.instance.id
cloud.image.id
cloud.machine.type
cloud.region
cloud.availability_zone