Prometheus exporter for AWS CloudWatch
This exporter used the AWS CloudWatch GetMetricsData API call, please it is important you read
WARNING:
- The use of this exporter could be expensive, this need be used taking care.
NOTES:
- When you use AWS CloudWatch GetMetricsData API call with 1 request you can get 500 metrics a time, so read the links above before use it.
LIMITATIONS:
- You could define 500 metrics queries in total (a future release will allow more)
To configure the server you have 3 ways:
- Configuration Files (i.e.: ./server.yaml)
- Environment Variables (i.e.: SERVER_PORT, SERVER_ADDRESS, etc)
- Program Flags (i.e.: --serverPort, --serverAddress,etc)
This exporter used the standard metrics queries format used by AWS CloudWatch API GetMetricData More information at metrics.md
Using your own ~/.aws
configuration in local
docker run --rm \
-i \
-u nobody:nogroup \
--privileged \
-v ~/tmp/queries/m1.yaml:/home/nobody/m1.yaml:ro \
-v ~/tmp/queries/m2.yaml:/home/nobody/m2.yaml:ro \
-v /tmp/:/home/nobody/tmp/:rw \
-v ~/.aws:/home/nobody/.aws:ro \
-e "AWS_SDK_LOAD_CONFIG=true" \
-e "AWS_PROFILE=slashdevops" \
slashdevops/aws-cloudwatch-exporter-linux-amd64:develop metrics get --metricsFiles /home/nobody/m1.yaml --outFile /home/nobody/tmp/out.yaml
Check the result
cat /tmp/out.yaml
If you download the binary from releases
AWS_SDK_LOAD_CONFIG="true" \
AWS_PROFILE="slashdevops" \
./aws_cloudwatch_exporter metrics get \
--metricsFiles ~/tmp/queries/m1.yaml \
--debug
WIP
This software is released under the APACHE LICENSE, VERSION 2.0: