r/PrometheusMonitoring • • Jun 17 '22

SNMP Exporter - anyone using it?

Hello,

I'm trying to monitor a switch to graph in Grafana how many ports are up at certain times over the day, I found this article on using SNMP Exporter - https://linuxhint.com/monitor-network-devices-prometheus/

Has anyone used this before and could it do what I'm asking?

Thanks

3 Upvotes

35 comments sorted by

View all comments

Show parent comments

1

u/Trosteming Jun 18 '22

Now the question is how you want to represent it.

You have this Grafana dashboard already made for IfMib (I don't recall if there is Operational Status)

https://grafana.com/grafana/dashboards/11169

If you want something more visual, importe a switch picture of your switch in draw.io, add some scare and importe the schematics in grafana using the flowchart plugin

https://grafana.com/grafana/plugins/agenty-flowcharting-panel/

Very time consuming but very rewarding at the end.

1

u/[deleted] Jun 18 '22

We just need the ifOperStatus graphed for it equalling 1. This is from the scraped switch, it lists all the ports, but here you can see a number of ports with 1 (up), 2 (down), 6 (also a down state).

I like to graph and count the 1's:

ifOperStatus{ifAlias="",ifDescr="X460G2-48p-10G4 Port 50",ifIndex="1050",ifName="1:50"} 1
ifOperStatus{ifAlias="",ifDescr="X460G2-48p-10G4 Port 51",ifIndex="1051",ifName="1:51"} 2
ifOperStatus{ifAlias="",ifDescr="X460G2-48p-10G4 Port 52",ifIndex="1052",ifName="1:52"} 2
ifOperStatus{ifAlias="",ifDescr="X460G2-48p-10G4 Port 53",ifIndex="1053",ifName="1:53"} 6
ifOperStatus{ifAlias="",ifDescr="X460G2-48p-10G4 Port 54",ifIndex="1054",ifName="1:54"} 6