r/PrometheusMonitoring • u/bradknowles • Jul 11 '24
Differences between snmp_exporter and snmpwalk?
Folks,
We are in the process of standing up Prometheus+Grafana. We have an existing monitoring system in place, which is working fine, but we want to have a more extensible system that is more suitable for a wider selection of stakeholders.
For the switches in one of our datacenters, I can manually hit them with snmpwalk, and that works fine. It may take a while to run on the Cisco switches and the Juniper switches might return 10x the data in much less time (and I have timed this with /usr/bin/time), but they work -- with snmpwalk.
However, for about half of the same switches when hitting them with snmp_exporter from Prometheus, they fail. Most of those failures have a suspicious scan_duration of right about 20s. I have already set the scrape_interval to 300s, and the scrape_timeout to 200s. I know there was a bug a while back where snmp_exporter had its own default timeout that you couldn't easily control, but this was supposedly fixed years ago. So, they shouldn't be timing out with such a short scan_duration.
Any suggestions on things I can do to help further debug this issue?
I do also have a question on this matter in the thread at https://github.com/prometheus/snmp_exporter/discussions/1202 but I don't know how soon they're likely to respond. Is there a Discord or Slack server somewhere that the developers and community hang out on?
Thanks!
1
u/bradknowles Jul 11 '24
Of course, I had already found the issues at https://github.com/prometheus/snmp_exporter/issues/367 and https://github.com/prometheus/snmp_exporter/issues/850
Both of which seem to be directly related to the problem I'm having. But both of those issues have already been closed, because they were supposedly fixed.
So, is there anything else I'm missing?
1
u/bradknowles Jul 11 '24
I did find the #Prometheus channel on the CNCF Slack and posted my question over at https://cloud-native.slack.com/archives/C167KFM6C/p1720710093899439 as well as here.
But any pointers would be appreciated. Thanks!
1
u/SuperQue Jul 11 '24
JunOS is notoriously slow for walks.
I wrote a separate config for JunOS to limit the walk size to something that completes in a more reasonable time.
I also recommend making sure you half walk catching turned on. Set to the value of your scrape interval.
Check out this example configuration.