Custom metrics from AWS cloudwatch

38 views
Skip to first unread message

kiran

unread,
Oct 15, 2020, 10:34:49 AM10/15/20
to Prometheus Users
Hello all

I am collecting some information that I need from AWS cloudwatch. How do I push it to Prometheus to scrape. Here are my questions:

1.From what I read, I can use Prometheus pushgatheway text protocol using curl command. Is this the preferred method? Any other methods?

Assuming push gateway is the method preferred, 

2. What shall be the format. It’s the standard key: value format?

3. Do I need to pass the job name along with other labels to push gateway or push gateway has a separate configuration to specify the job name.

Thank you.

Brian Candler

unread,
Oct 15, 2020, 11:46:29 AM10/15/20
to Prometheus Users
Whatever the question is, pushgateway is not the answer.  It only has one use case (*).

Probably what you want is cloudwatch_exporter, and you scrape it directly from prometheus.

If cloudwatch_exporter doesn't give what you need, and you end up writing a script which talks to cloudwatch and produces your own custom metrics, then write them to a text file for the node_exporter textfile collector.

If your network does not allow prometheus to talk directly to cloudwatch_exporter (or node_exporter), then you can look at PushProx - but really it's much better if you can fix your networking so prometheus can talk directly to the exporter.  If necessary, just run another prometheus instance directly alongside the exporter.

-----
(*) that is for one-shot scripts which want to store their result somewhere before terminating, so it can be scraped later.
Reply all
Reply to author
Forward
0 new messages