Skip to content

Commit

Permalink
docs: updated README.md and a couple of examples
Browse files Browse the repository at this point in the history
Signed-off-by: Mårten Svantesson <[email protected]>
  • Loading branch information
msvticket committed Mar 4, 2024
1 parent d181c72 commit e528d21
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ aws_tag_select | Optional. A tag configuration to filter on, based on mapping fr
tag_selections | Optional, under `aws_tag_select`. Specify a map from a tag key to a list of tag values to apply [tag filtering](https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html#resourcegrouptagging-GetResources-request-TagFilters) on resources from which metrics will be gathered.
resource_type_selection | Required, under `aws_tag_select`. Specify the [resource type](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namesspaces) to filter on. `resource_type_selection` should be comprised as `service:resource_type`, as per the [resource group tagging API](https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html#resourcegrouptagging-GetResources-request-TagFilters). Where `resource_type` could be an empty string, like in S3 case: `resource_type_selection: "s3:"`.
resource_id_dimension | Required, under `aws_tag_select`. For the current metric, specify which CloudWatch dimension maps to the ARN [resource ID](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax).
arn_resource_id_regexp | If the Cloudwatch dimension specified in `resource_id_dimension` doesn't conform to the convention for resource ID an alternative regular expression to extract the resource ID from the ARN can be given here. The default is `(?:([^:/]+)|[^:/]+/([^:]+))$`. The first non empty match group will be used.
aws_statistics | Optional. A list of statistics to retrieve, values can include Sum, SampleCount, Minimum, Maximum, Average. Defaults to all statistics unless extended statistics are requested.
aws_extended_statistics | Optional. A list of extended statistics to retrieve. Extended statistics currently include percentiles in the form `pN` or `pN.N`.
delay_seconds | Optional. The newest data to request. Used to avoid collecting data that has not fully converged. Defaults to 600s. Can be set globally and per metric.
Expand Down
16 changes: 14 additions & 2 deletions examples/ApplicationELB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@ metrics:
aws_metric_name: HealthyHostCount
aws_dimensions:
- LoadBalancer
aws_statistics:
- Sum
- TargetGroup
aws_statistics:
- Minimum
# In case you want to use some tag to select target group to monitor, or to have additional `info` metric
# with all target group tags as labels, use `aws_tag_select`.
# Since the TargetGroup dimension doesn't follow the convention for how to extract resource ids from ARN
# `arn_resource_id_regexp` is specified with an alternative regular expression.
aws_tag_select:
resource_type_selection: elasticloadbalancing:targetgroup
resource_id_dimension: TargetGroup
arn_resource_id_regexp: "(targetgroup/.*)$"
tag_selections:
Environment:
- production
- aws_namespace: AWS/ApplicationELB
aws_metric_name: UnHealthyHostCount
aws_dimensions:
Expand Down
11 changes: 11 additions & 0 deletions examples/WAFV2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ metrics:
aws_namespace: AWS/WAFV2
aws_statistics:
- Sum
# In case you want to use some tag to select web acls to monitor, or to have additional `info` metric
# with all web acl tags as labels, use `aws_tag_select`.
# Since the WebACL dimension doesn't follow the convention for how to extract resource ids from ARN
# `arn_resource_id_regexp` is specified with an alternative regular expression.
aws_tag_select:
resource_type_selection: wafv2:regional/webacl
resource_id_dimension: WebACL
arn_resource_id_regexp: "([^/]+)/[^/]+$"
tag_selections:
Environment:
- production
- aws_dimensions:
- Region
- Rule
Expand Down

0 comments on commit e528d21

Please sign in to comment.