Page 1 of 1

Check_snmp performance data

Posted: Fri Nov 20, 2020 4:38 pm
by snapon_admin
Trying to figure out an issue with performance data while using the check_snmp plugin. I ran an SNMPwalk against a specific OID and the check does appear to output perfdata, but the OID is included in that so I'm not actually seeing anything get graphed. Is there a way to fix this?

Code: Select all

/usr/local/nagios/libexec/check_snmp -H [IP ADDRESS] -p 161 -o 'ciscoMgmt.147.1.2.2.2.1.5.40.6' -C '[SNMP COMMUNITY]' -P 2c -u 'current connections' -m CISCO-SMI -w 450000 -c 480000
SNMP OK - 16183 current connections | CISCO-SMI::ciscoMgmt.147.1.2.2.2.1.5.40.6=16183current connections;450000;480000

Re: Check_snmp performance data

Posted: Mon Nov 23, 2020 5:59 pm
by cdienger
Try:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H [IP ADDRESS] -p 161 -o 'ciscoMgmt.147.1.2.2.2.1.5.40.6' -C '[SNMP COMMUNITY]' -P 2c -u ' current connections' -m CISCO-SMI -w 450000 -c 480000
Note the addition of the space right before 'current connections'. This should update the perfdata output to look like:

Code: Select all

CISCO-SMI::ciscoMgmt.147.1.2.2.2.1.5.40.6=16183 current connections;450000;480000
and allow it to graph. Make sure to remove any current rrd or xml file that may exist for this service at /usr/local/nagios/share/perfdata/<hostname>/<servicedesc>.[rrd|xml].

Re: Check_snmp performance data

Posted: Tue Nov 24, 2020 10:59 am
by snapon_admin
When I add a space to the command it still doesn't put one in the perf data.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H [IP ADDRESS] -p 161 -o 'ciscoMgmt.147.1.2.2.2.1.5.40.6' -C '[SNMP COMMUNITY]' -P 2c -u ' current connections' -m CISCO-SMI -w 450000 -c 480000
SNMP OK - 15806 current connections | CISCO-SMI::ciscoMgmt.147.1.2.2.2.1.5.40.6=15806current connections;450000;48000
Untitled.png

Re: Check_snmp performance data

Posted: Tue Nov 24, 2020 11:23 am
by scottwilkerson
snapon_admin wrote:When I add a space to the command it still doesn't put one in the perf data.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H [IP ADDRESS] -p 161 -o 'ciscoMgmt.147.1.2.2.2.1.5.40.6' -C '[SNMP COMMUNITY]' -P 2c -u ' current connections' -m CISCO-SMI -w 450000 -c 480000
SNMP OK - 15806 current connections | CISCO-SMI::ciscoMgmt.147.1.2.2.2.1.5.40.6=15806current connections;450000;48000
Untitled.png
see #10 in this section
https://nagios-plugins.org/doc/guidelines.html#AEN200

' current connections' isn't a valid unit of measure UOM, being this is just an integer I would leave the -u ' current connections' off