Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags
Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags
[][quay] [][docker]
YACE, or yet another cloudwatch exporter, is a Prometheus exporter for AWS CloudWatch metrics. It is written in Go and uses the official AWS SDK.
As of November 2024, YACE is part of prometheus-community. Read more about it in these announcement posts:
Consider using the official CloudWatch Exporter if you prefer a Java implementation.
While YACE is at version less than 1.0.0, expect that any new release might introduce breaking changes. We'll document changes in CHANGELOG.md.
Where feasible, features will be deprecated instead of being immediately changed or removed. This means that YACE will continue to work but might log warning messages. Expect deprecated features to be permanently changed/removed within the next 2/3 releases.
Read more how to report a security vulnerability in SECURITY.md.
Only the latest version gets security updates. We won't support older versions.
/aws/sagemaker/Endpoints - Sagemaker Endpoints/aws/sagemaker/InferenceRecommendationsJobs - Sagemaker Inference Recommender Jobs/aws/sagemaker/ProcessingJobs - Sagemaker Processing Jobs/aws/sagemaker/TrainingJobs - Sagemaker Training Jobs/aws/sagemaker/TransformJobs - Sagemaker Batch Transform JobsAmazonMWAA - Managed Apache AirflowAWS/ACMPrivateCA - ACM Private CAAWS/AmazonMQ - Managed Message Broker ServiceAWS/AOSS - OpenSearch ServerlessAWS/ApiGateway - ApiGateway (V1 and V2)AWS/ApplicationELB - Application Load BalancerAWS/AppRunner - Managed Container Apps ServiceAWS/AppStream - AppStreamAWS/AppSync - AppSyncAWS/Athena - AthenaAWS/AutoScaling - Auto Scaling GroupAWS/Backup - BackupAWS/Bedrock - GenerativeAIAWS/Billing - BillingAWS/Cassandra - CassandraAWS/CertificateManager - Certificate ManagerAWS/ClientVPN - Client-based VPNAWS/CloudFront - Cloud FrontAWS/Cognito - CognitoAWS/DataSync - DataSyncAWS/DDoSProtection - Distributed Denial of Service (DDoS) protection serviceAWS/DirectoryService - Directory Services (MicrosoftAD)AWS/DMS - Database Migration ServiceAWS/DocDB - DocumentDB (with MongoDB compatibility)AWS/DX - Direct ConnectAWS/DynamoDB - NoSQL Key-Value DatabaseAWS/EBS - Elastic Block StorageAWS/EC2 - Elastic Compute CloudAWS/EC2Spot - Elastic Compute Cloud for Spot InstancesAWS/ECR - Elastic Container RegistryAWS/ECS - Elastic Container Service (Service Metrics)AWS/EFS - Elastic File SystemAWS/ElastiCache - ElastiCacheAWS/ElasticBeanstalk - Elastic BeanstalkAWS/ElasticMapReduce - Elastic MapReduceAWS/ELB - Elastic Load BalancerAWS/EMRServerless - Amazon EMR ServerlessAWS/ES - ElasticSearchAWS/Events - EventBridgeAWS/Firehose - Managed Streaming ServiceAWS/FSx - FSx File SystemAWS/GameLift - GameLiftAWS/GatewayELB - Gateway Load BalancerAWS/GlobalAccelerator - AWS Global AcceleratorAWS/IoT - IoTAWS/IPAM - IP address managerAWS/Kafka - Managed Apache KafkaAWS/KafkaConnect - AWS MSK ConnectorsAWS/Kinesis - Kinesis Data StreamAWS/KinesisAnalytics - Kinesis Data Analytics for SQL ApplicationsAWS/KMS - Key Management ServiceAWS/Lambda - Lambda FunctionsAWS/Logs - CloudWatch LogsAWS/MediaConnect - AWS Elemental MediaConnectAWS/MediaConvert - AWS Elemental MediaConvertAWS/MediaLive - AWS Elemental MediaLiveAWS/MediaPackage - AWS Elemental MediaPackageAWS/MediaTailor - AWS Elemental MediaTailorAWS/MemoryDB - AWS MemoryDBAWS/MWAA - Managed Apache Airflow (Container, queue, and database metrics)AWS/NATGateway - NAT GatewayAWS/Neptune - NeptuneAWS/NetworkELB - Network Load BalancerAWS/NetworkFirewall - Network FirewallAWS/Network Manager - Network ManagerAWS/PrivateLinkEndpoints - VPC EndpointAWS/PrivateLinkServices - VPC Endpoint ServiceAWS/Prometheus - Managed Service for PrometheusAWS/QLDB - Quantum Ledger DatabaseAWS/QuickSight - QuickSight (Business Intelligence)AWS/RDS - Relational Database ServiceAWS/Redshift - Redshift DatabaseAWS/Redshift-Serverless - Redshift ServerlessAWS/Route53 - Route53 Health ChecksAWS/Route53Resolver - Route53 ResolverAWS/RUM - Real User MonitoringAWS/S3 - Object StorageAWS/Sagemaker/ModelBuildingPipeline - Sagemaker Model Building PipelinesAWS/SageMaker - Sagemaker invocationsAWS/Scheduler - EventBridge SchedulerAWS/SecretsManager - Secrets ManagerAWS/SES - Simple Email ServiceAWS/SNS - Simple Notification ServiceAWS/SQS - Simple Queue ServiceAWS/States - Step FunctionsAWS/StorageGateway - On-premises access to cloud storageAWS/Timestream - Time-series database serviceAWS/TransitGateway - Transit GatewayAWS/TrustedAdvisor - Trusted AdvisorAWS/Usage - Usage of some AWS resources and APIsAWS/VpcLattice - VPC LatticeAWS/VPN - VPN connectionAWS/WAFV2 - Web Application Firewall v2AWS/WorkSpaces - WorkspacesContainerInsights - EKS ContainerInsights (Dependency on Cloudwatch agent)CWAgent - CloudWatch agentECS/ContainerInsights - ECS/ContainerInsights (Fargate metrics)Glue - AWS Glue JobsTo provide backwards compatibility, some of YACE's new features or breaking changes might be guarded under a feature flag. Refer to docs/feature_flags.md for details.
Refer to the installation guide.
The exporter will need to be running in an environment which has access to AWS. The exporter uses the AWS SDK for Go and supports providing authentication via AWS's default credential chain. Regardless of the method used to acquire the credentials, some permissions are needed for the exporter to work.
As a quick start, the following IAM policy can be used to grant the all permissions required by YACE
…If you would like to remove certain permissions based on your needs the policy can be adjusted based the CloudWatch namespaces you are scraping
These are the bare minimum permissions required to run Static and Discovery Jobs
"tag:GetResources",
"cloudwatch:GetMetricData",
"cloudwatch:GetMetricStatistics",
"cloudwatch:ListMetrics"This permission is required to discover resources for the AWS/ApiGateway namespace
"apigateway:GET"This permission is required to discover resources for the AWS/AutoScaling namespace
"autoscaling:DescribeAutoScalingGroups"These permissions are required to discover resources for the AWS/DMS namespace
"dms:DescribeReplicationInstances",
"dms:DescribeReplicationTasks"This permission is required to discover resources for the AWS/EC2Spot namespace
"ec2:DescribeSpotFleetRequests"This permission is required to discover resources for the AWS/Prometheus namespace
"aps:ListWorkspaces"These permissions are required to discover resources for the AWS/StorageGateway namespace
"storagegateway:ListGateways",
"storagegateway:ListTagsForResource"This permission is required to discover resources for the AWS/TransitGateway namespace
"ec2:DescribeTransitGatewayAttachments"This permission is required to discover protected resources for the AWS/DDoSProtection namespace
"shield:ListProtections"The AWS IAM API supports creating account aliases, which are human-friendly names that can be used to easily identify accounts. An account can have at most a single alias, see (docs). Each alias must be unique across an AWS network partition (docs). The following permission is required to get the alias for an account, which is exported as a label in the aws_account_info metric:
"iam:ListAccountAliases"If running YACE inside an AWS EC2 instance, the exporter will automatically attempt to assume the associated IAM Role. If this is undesirable behavior turn off the use the metadata endpoint by setting the environment variable AWS_EC2_METADATA_DISABLED=true.
Refer to the configuration docs.
……to support local testing all AWS urls can be overridden with by setting an environment variable AWS_ENDPOINT_URL
docker run -d --rm -v $PWD/credentials:/home/.aws/credentials -v $PWD/config.yml:/tmp/config.yml \
-e AWS_ENDPOINT_URL=http://localhost:4766 -p 5000:5000 --name yace quay.io/prometheuscommunity/yet-another-cloudwatch-exporter:latestMultiple roleArns are useful, when you are monitoring multi-account setup, where all accounts are using same AWS services. For example, you are running yace in monitoring account and you have number of accounts (for example newspapers, radio and television) running ECS clusters. Each account gives yace permissions to assume local IAM role, which has all the necessary permissions for Cloudwatch metrics. On this kind of setup, you could simply list:
apiVersion: v1alpha1
sts-region: eu-west-1
discovery:
jobs:
- type: AWS/ECS
regions:
- eu-north-1
roles:
- roleArn: "arn:aws:iam::1111111111111:role/prometheus" # newspaper
- roleArn: "arn:aws:iam::2222222222222:role/prometheus" # radio
- roleArn: "arn:aws:iam::3333333333333:role/prometheus" # television
metrics:
- name: MemoryReservation
statistics:
- Average
- Minimum
- Maximum
period: 600
length: 600Additionally, if the IAM role you want to assume requires an External ID you can specify it this way:
roles:
- roleArn: "arn:aws:iam::1111111111111:role/prometheus"
externalId: "shared-external-identifier"The flags 'cloudwatch-concurrency' and 'tag-concurrency' define the number of concurrent
No open issues yet, or sync has not completed.