-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Describe the bug
If you configure cloudwatch-agent to scrape Prometheus metrics and you scrape more than 100 metrics, they will not actually appear in CloudWatch. This is because the agent just dumps all the metrics into a single log line, but as per the spec, a log line may not contain more than 100 metrics.
Steps to reproduce
- Create an endpoint that exposes more than 100 Prometheus metrics (you can just have a static file on a web server at
/metrics) - Configure
cwagentwith a prometheus.yaml that simply ingests all metrics and acwagentconfig.jsonthat contains a.logs.metrics_collected.prometheus.emf_processor.metric_declarationthat ingests them all - Launch cwagent
What did you expect to see?
The metrics should all appear in the desired log stream, and also as Metrics in Cloudwatch
What did you see instead?
The metrics are all in the log stream, but are not in CloudWatch Metrics. The EMFValidationErrors metric under AWS/Logs increments to 1.
What version did you use?
1.300057.1b1167
What config did you use?
Environment
OS: N/A (deploying via Docker on Kubernetes)
Additional context
The agent should simply group into 100 metrics at a time and emit them as separate log lines.