info metric for target that doesn't run constantly?

17 views
Skip to first unread message

John Dexter

unread,
Jan 20, 2021, 9:56:41 AM1/20/21
to promethe...@googlegroups.com
Our system involves lots of modules that only run some of the time. I was thinking if it would make sense to have a metric like:
my_system_info{module = "<module_name>"} 1
I presume this would report 0 when the module isn't running and polling fails so I could track history of when it was running? Or would I get missing data instead?

Thank you.

Ben Kochie

unread,
Jan 20, 2021, 11:55:31 AM1/20/21
to John Dexter, Prometheus Users
Typically _info metrics always have one. Usually what people expose for something like that is my_system_up{module="foo"} with the boolean value.

If these are cron-type jobs, people will expose a start and end timestamp metric, similar to process_start_time_seconds.

--
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/CAGJRanif7zETmTtbOBwCD_Tt5XRPS4%3DuEnopUTmx0LcX1W-33Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages