Monitoring the status of targets using snmp_exporter

167 views
Skip to first unread message

Liquid Lulz

unread,
Oct 10, 2022, 10:50:12 AM10/10/22
to Prometheus Users
Hi everyone,

I am pretty new to using snmp_exporter for monitoring various network devices and the like. It works great, but i still haven't figured out what is the recommended way of monitoring the up status of each target is a generic way.

In prometheus i am using a generic "targetDown" alert that notifies me when a target does into a DOWN state in by evaluating the "up" time series automatically created by Prometheus. I use this for things like node_exporter, blackbox_exporter and others which works great. The issue with snmp_exporter targets is that i can't seem to find this "up" time series for the even though they do appear under "Targets" in Prometheus UI.

My question is, what the recommended way to monitor the "up" status of snmp devices without having to create specific alerts for each device separately?

Thanks

Brian Candler

unread,
Oct 10, 2022, 1:20:29 PM10/10/22
to Prometheus Users
I don't understand your problem: "up" works fine for scraping snmp_exporter.

If your scrape job is named "snmp" (say), then the PromQL query

    up{job="snmp"}

will show you snmp targets as up or down.  (If, as you say, they are visible in the "Targets" in the UI, then you can see here exactly what "job" label to look for)

Brian Candler

unread,
Oct 10, 2022, 1:21:30 PM10/10/22
to Prometheus Users
I just realised, maybe you haven't done your relabelling correctly so that each SNMP target gets a different "instance" label.  Can you post your scrape config, i.e. the section of prometheus.yml which starts

- job_name: snmp

or whatever?

Reply all
Reply to author
Forward
0 new messages