Cloudwatch exporter scraping from multiple aws accounts

1,491 views
Skip to first unread message

rs vas

unread,
Jun 20, 2020, 4:11:10 AM6/20/20
to Prometheus Users
Hi, would like to know if cloudwatch exporter installed in one AWS account can scrape cloudwatch metrics from multiple AWS accounts using multiple roleARNs in the configuration? Anything specific needs to be configured in-order to support multiple accounts at the same time?

I could not find any way to do this as of now? Anyone has any luck doing this? Appreciate your help!

Thanks!
vas

Brian Brazil

unread,
Jun 20, 2020, 5:16:44 AM6/20/20
to rs vas, Prometheus Users
On Sat, 20 Jun 2020 at 09:11, rs vas <rsvas...@gmail.com> wrote:
Hi, would like to know if cloudwatch exporter installed in one AWS account can scrape cloudwatch metrics from multiple AWS accounts using multiple roleARNs in the configuration? Anything specific needs to be configured in-order to support multiple accounts at the same time?

You need one exporter per account and region.

Brian
 

I could not find any way to do this as of now? Anyone has any luck doing this? Appreciate your help!

Thanks!
vas

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAPs_Afhj04AYaayHpqVnHu0wUnfddGq2vJ0NaSoXstnacz-p%3Dw%40mail.gmail.com.


--

rs vas

unread,
Jun 20, 2020, 10:51:41 PM6/20/20
to Brian Brazil, Prometheus Users
thanks Brian for the quick response. Is there any possibility we can enhance to support multi account and region scraping? 

Or any other options/libraries provide that functionality. Appreciate any pointers or suggestions on the same!

rs vas

unread,
Jun 22, 2020, 2:12:53 PM6/22/20
to Brian Brazil, Prometheus Users
Just checking on this again! Is it something by design that is not possible?

Or is it just a question of priority and someone doing the work to support multiple accounts and regions by cloudwatch exporter?

https://github.com/prometheus/cloudwatch_exporter/issues/123 If it is later, Me/someone can definitely spend some time enhancing it. please let me know!

Stuart Clark

unread,
Jun 22, 2020, 3:48:42 PM6/22/20
to promethe...@googlegroups.com, rs vas, Brian Brazil, Prometheus Users
The general design of most exporters is that they deal with a single instance of the thing being monitored (single server, database, region, account), with multiple instances being handled by running multiple copies of the exporter.

One reason this often works well is because you generally need different credentials and find that different underlying instances could fail independently - which makes failures easier to handle.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

rs vas

unread,
Jun 23, 2020, 9:05:17 PM6/23/20
to Stuart Clark, Prometheus Users, Brian Brazil
Thanks Suart for your response.I agree with you most of the cases - for example: nodeExporter (instance specific metrics), JMXExpoter(JVM specific metrics).

But I believe Cloudwatch Exporter is different - It is currently responsible/limited to scrape region specific metrics. Is there any design limitation expanding this and having flexibility to scrape multiple regions and accounts? That way each metric should have two more additional tags probably account and region to identify the unique metric. Please share your thoughts!


I found another workaround: YACE - yet another cloudwatch exporter (which allow scraping from multiple regions and accounts) - Any ideas on this how widely YACE is used?
Appreciate your help!

Brian Candler

unread,
Jun 24, 2020, 6:23:10 AM6/24/20
to Prometheus Users
> That way each metric should have two more additional tags probably account and region to identify the unique metric.

You simply have multiple scrape targets, one for each account/region, and add labels specific to each target. Even file_sd_config or static_sd_config can do that.
Reply all
Reply to author
Forward
0 new messages