Skip to content

Commit

Permalink
Add documentation for tags_filter and tags (#16731)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyan-sheng authored Mar 3, 2020
1 parent d89675f commit 10ed037
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metricbeat/docs/modules/aws.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ metricbeat.modules:
credential_profile_name: test-mb
metricsets:
- ec2
tags_filter:
- key: "Organization"
value: "Engineering"
- module: aws
period: 300s
credential_profile_name: test-mb
Expand Down Expand Up @@ -292,6 +295,9 @@ metricbeat.modules:
- namespace: AWS/EBS
- namespace: AWS/ELB
tags.resource_type_filter: elasticloadbalancing
tags:
- key: "Organization"
value: "Engineering"
- module: aws
period: 60s
credential_profile_name: test-mb
Expand Down
6 changes: 6 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ metricbeat.modules:
credential_profile_name: test-mb
metricsets:
- ec2
tags_filter:
- key: "Organization"
value: "Engineering"
- module: aws
period: 300s
credential_profile_name: test-mb
Expand Down Expand Up @@ -213,6 +216,9 @@ metricbeat.modules:
- namespace: AWS/EBS
- namespace: AWS/ELB
tags.resource_type_filter: elasticloadbalancing
tags:
- key: "Organization"
value: "Engineering"
- module: aws
period: 60s
credential_profile_name: test-mb
Expand Down
6 changes: 6 additions & 0 deletions x-pack/metricbeat/module/aws/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
credential_profile_name: test-mb
metricsets:
- ec2
tags_filter:
- key: "Organization"
value: "Engineering"
- module: aws
period: 300s
credential_profile_name: test-mb
Expand Down Expand Up @@ -32,6 +35,9 @@
- namespace: AWS/EBS
- namespace: AWS/ELB
tags.resource_type_filter: elasticloadbalancing
tags:
- key: "Organization"
value: "Engineering"
- module: aws
period: 60s
credential_profile_name: test-mb
Expand Down
8 changes: 8 additions & 0 deletions x-pack/metricbeat/module/aws/cloudwatch/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ For example, specifying a resource type of ec2 returns all Amazon EC2 resources
only EC2 instances.
* *statistic*: Statistics are metric data aggregations over specified periods of time.
By default, statistic includes Average, Sum, Count, Maximum and Minimum.
* *tags*: The tags to filter against. If tags are given in config, then only
collect metrics from resources that have tag key and tag value matches the filter.
For example, if tags parameter is given as `Organization=Engineering` under
`AWS/ELB` namespace, then only collect metrics from ELBs with tag name equals to
`Organization` and tag value equals to `Engineering`.

[float]
=== Configuration examples
Expand All @@ -48,6 +53,9 @@ in configurations in order for this metricset to make proper AWS API calls.
- namespace: AWS/EBS <1>
- namespace: AWS/ELB <2>
tags.resource_type_filter: elasticloadbalancing
tags:
- key: "Organization"
value: "Engineering"
- namespace: AWS/EC2 <3>
name: CPUUtilization
statistic: ["Average"]
Expand Down

0 comments on commit 10ed037

Please sign in to comment.