Skip to content

Commit

Permalink
[Metricbeat] Add ability to collect tags for aws services (#12480)
Browse files Browse the repository at this point in the history
* Collecting tags from resourcegroupstaggingapi in cloudwatch metricset

* Use aws arn parse function

* Add resource_type_filters as a input parameter

* Change resource_type_filter from a list of strings to string

* Remove getResourceTypeUsingNamespace function and add tags.resource_type_filter
  • Loading branch information
kaiyan-sheng authored Jun 23, 2019
1 parent 47eb1a9 commit 3a4d34f
Show file tree
Hide file tree
Showing 21 changed files with 1,671 additions and 54 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add a system/entropy metricset {pull}12450[12450]
- Allow redis URL format in redis hosts config. {pull}12408[12408]
- Add tags into ec2 metricset. {issue}[12263]12263 {pull}12372[12372]
- Collect tags for cloudwatch metricset in aws module. {issue}[12263]12263 {pull}12480[12480]

*Packetbeat*

Expand Down
6 changes: 5 additions & 1 deletion metricbeat/docs/modules/aws.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ metricbeat.modules:
== Metricsets

Currently, we have `ec2`, `sqs`, `s3_request`, `s3_daily_storage` and `cloudwatch` metricset in `aws` module. Collecting `tags`
for EC2 instances is supported.
for `ec2` and `cloudwatch` metricset is supported.

* *tags.*: Tag key value pairs from aws resources. A tag is a label that user assigns to an AWS resource.

Expand Down Expand Up @@ -124,6 +124,8 @@ each S3 bucket.
=== `cloudwatch`
This metricset gives users the freedom to query metrics from AWS Cloudwatch with
any given namespaces or specific instance with a given period.
Please see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html[AWS Services That Publish CloudWatch Metrics]
for a list of AWS services that publish metrics to CloudWatch.


[float]
Expand Down Expand Up @@ -179,6 +181,8 @@ metricbeat.modules:
- name: InstanceId
value: i-0686946e22cf9494a
- namespace: AWS/EBS
- namespace: AWS/ELB
tags.resource_type_filter: elasticloadbalancing
#regions:
# - us-east-1
# - us-east-2
Expand Down
86 changes: 86 additions & 0 deletions vendor/github.com/aws/aws-sdk-go-v2/aws/arn/arn.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3a4d34f

Please sign in to comment.