Host down alert, Agent Mode

224 views
Skip to first unread message

Clima Gabriel

unread,
Aug 30, 2022, 2:37:18 AM8/30/22
to Prometheus Users
Hey y'all,

Has anyone been able to figure out how to create a Host Down alert for a host that is running Prometheus in Agent mode? 

Julius Volz

unread,
Sep 3, 2022, 4:04:55 PM9/3/22
to Clima Gabriel, Prometheus Users
Hi,

Do you mean monitoring the host that the Agent-Mode Prometheus is running on? If that is the case, you would monitor it like any other host by deploying the Node Exporter (https://github.com/prometheus/node_exporter) on it, scraping it from another Prometheus server, and then having some alert based on the "up" metric for that Node Exporter job. See also https://prometheus.io/docs/guides/node-exporter/.

Or do you mean configuring alerting rules in a Prometheus server that is running in Agent mode? In that case, that's not possible, since an Agent-mode Prometheus server does not have a full local storage and querying+rule engine. You would need to run a full Prometheus server for that.

Regards,
Julius

On Tue, Aug 30, 2022 at 8:37 AM Clima Gabriel <clima.g...@gmail.com> wrote:
Hey y'all,

Has anyone been able to figure out how to create a Host Down alert for a host that is running Prometheus in Agent mode? 

--
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/b4c6eca2-bd6f-41ba-bc84-8d36fd89f410n%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com

Clima Gabriel

unread,
Sep 5, 2022, 6:37:10 AM9/5/22
to Julius Volz, Prometheus Users
Hey Julius,

I meant alerting when the hosts running Prometheus in Agent Mode go down.

Turned out to be quite simple:
absent(up{prometheus_agent="true",hostname="hostname"})

Not sure what I got so confused about anymore.
Thanks)

Regards,
Gabriel
Reply all
Reply to author
Forward
0 new messages