
The values of these are exported to Prometheus. If all metrics within a job (discovery or static) have the same Period value configured, CloudWatch APIs will be requestedįor metrics from the scrape time, to Periods seconds in the past. Settings affects the produced values in two different scenarios. Period controls how far back in time CloudWatch metrics are considered, during each agent scrape. # Optional: See the `Period` section below. # Required: List of statistic types, e.g.
#Export cloudwatch metrics to prometheus how to#
To see available metrics, AWS does not keep a documentation page with all available metrics.įollow this guide on how to explore metrics, to easily Represents an AWS Metrics to scrape, under the context of a job. # Optional: External ID used when calling STS AssumeRole API. # Required: AWS IAM Role ARN the exporter should assume to perform AWS API calls. See this documentation on how to configure this. Is configured for the agent to assume prior to calling AWS APIs, therefore, the credentials configured in the system need This is useful when scraping metrics from different AWS accounts with a single pair of credentials. The AWS role that the credentials configured in the environment posses will be used. When exported, the label name follows the following format: # Optional: Custom tags to be added as a list of Key/Value pairs. # Required: CloudWatch metric dimensions as a list of Name/Value pairs. When exported to Prometheus format corresponds to the `name` label. # Required: Identifier of the static scraping job. Defaults to the role on the environment configured AWS role. Same applies to CloudWatch custom metrics,Īll dimensions attached to a metric when saved in CloudWatch are required.Ĭonfiguration reference: # Required: List of AWS regions. Require Resource, Service, Class, and Type dimensions to be specified. For example, all AWS/EC2 metrics are identified by the InstanceId dimension.įor example, if one wants to scrape the same metrics in the discovery example, but for a specific AWS EC2 instance: sts_region: us-east-2Īll dimensions need to be specified when scraping single metrics like the example above.

# Required: List of metric definitions to scrape.Ī static job allows one to scrape an individual CloudWatch metric. To use all of the integration features, use the following AWS IAM Policy: `. The following IAM permissions are required to discover tagged Database Migration Service (DMS) replication instances and tasks: "dms:DescribeReplicationInstances",

The following IAM permission is required to discover tagged API Gateway REST APIs: "apigateway:GET" The following IAM permissions are required for the Transit Gateway attachment (tgwa) metrics to work. Some permissions are needed for the exporter to work. Regardless of the method used to acquire the credentials, Provides authentication via AWS’s default credential chain. The agent must be running in an environment with access to AWS. This integration lets you scrape CloudWatch metrics in a set of configurations that we will call jobs. Use the cloudwatch_exporter to collect AWS CloudWatch metrics. The cloudwatch_exporter_config block configures the cloudwatch_exporter integration, which is an embedded version of So I follow this guide.Open source cloudwatch_exporter_config Overview I wish to export to Cloudwatch metrics some metric comming from Prometheus. I have Prometheus installed on the cluster. I run pods on a kubernetes running inside EKS.
