Cloudwatch_exporter cannot be started in case you provide custom metrics - via _prometheus_cloudwatch_exportercfg.
In that case metrics section is indented to the right which causes error - inability for cloudwatch_exporter to start.
Config file is generated like this:
---
#
# Do not edit manually, this file is managed using automation tools
#
modules:
metrics:
- aws_dimensions:
- LoadBalancer
aws_metric_name: ActiveConnectionCount
aws_namespace: AWS/ApplicationELB
but it should be like this (no indentation for metric section):
---
#
# Do not edit manually, this file is managed using automation tools
#
modules:
metrics:
- aws_dimensions:
- LoadBalancer
aws_metric_name: ActiveConnectionCount
aws_namespace: AWS/ApplicationELB
https://github.com/mesaguy/ansible-prometheus/blob/4c22d377e05b83bf6dfad06190575b01d46a17d0/templates/cloudwatch_exporter.yml.j2#L7
Cloudwatch_exporter cannot be started in case you provide custom metrics - via _prometheus_cloudwatch_exportercfg. In that case metrics section is indented to the right which causes error - inability for cloudwatch_exporter to start.
Config file is generated like this:
but it should be like this (no indentation for metric section):
See more here: https://github.com/prometheus/cloudwatch_exporter
@mesaguy