grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.48k stars 221 forks source link

Possibility to run prometheus.exporter.cloudwatch component only once across grafana-agents #400

Open Jeinhaus opened 1 year ago

Jeinhaus commented 1 year ago

Background

Right now, I'm trying to replace cloudwatch-exporter with the prometheus.exporter.cloudwatch component of the Grafana Agents using the flow configuration mode.

The component works as expected so far, but because I've set up the agents to run as a DaemonSet, all of them are now scraping the CloudWatch API and writing metrics to Prometheus.

Is there any way to limit the scraping and/or sending the metrics only from one instance of the agents?

Proposal

I don't have an idea if agents are not running in clustered mode.

tpaschalis commented 1 year ago

Thanks for the feedback!

We've discussed this in the past in the context of clustering, and I've finally gotten around to opening an issue to keep track of it.

As for the non-clustering mode, I'm not sure yet if any other workarounds exist, I'll have to check.

Jeinhaus commented 1 year ago

Thank you for looking into this and opening the issue.

For now, I'll probably resort to deploying multiple modes of the agent (one in daemonset mode for logs and node metrics and one in clustered mode for scraping jobs).

github-actions[bot] commented 1 year ago

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it. If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue. The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity. Thank you for your contributions!