Page 1 of 1

Can't get check_snmp to graph - no rrd file

Posted: Wed Mar 30, 2016 3:21 am
by quartix
Hi,

I've got some custom service checks which use check_snmp to get the data which returns just fine. It's to get the number of sessions currently connected to our Juniper firewalls. However it used to graph but we have recently noticed it's not working anymore, the graphs just say no data to display. I don't know much about how the graphing system of nagios works but after doing some googling on it I got as far as deleting the old rrd file for that service along with it's xml file, in hopes it would recreate them. No such luck.

Could anyone help me resolve this please?

Thanks

Re: Can't get check_snmp to graph - no rrd file

Posted: Wed Mar 30, 2016 11:36 am
by tmcdonald
Let's check a few things. Please run the following as root from the Nagios server command line:

Code: Select all

service npcd status
ls -l /usr/local/nagios/var/spool/xidpe | wc -l
ls -l /usr/local/nagios/var/spool/perfdata | wc -l

Re: Can't get check_snmp to graph - no rrd file

Posted: Wed Apr 06, 2016 3:21 am
by quartix
Hi,

Apologies for not replying earlier I didn't get an email notification - here's the results of running those commands:

Code: Select all

[root@nagiosxi ~]# service npcd status
NPCD running (pid 15235).

Code: Select all

[root@nagiosxi ~]# ls -l /usr/local/nagios/var/spool/xidpe | wc -l
3

Code: Select all

[root@nagiosxi ~]# ls -l /usr/local/nagios/var/spool/perfdata | wc -l
3

Re: Can't get check_snmp to graph - no rrd file

Posted: Wed Apr 06, 2016 11:32 am
by tgriep
That output from those commands looks fine.
Can you run the check from the command line and post the full output so we can see if the performance data output is correct?
Thanks

Re: Can't get check_snmp to graph - no rrd file

Posted: Fri Apr 22, 2016 3:24 am
by quartix
Hi,

Here is the check command running from the CLI:

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_snmp -H 192.168.17.252 -o .1.3.6.1.4.1.3224.16.3.2.0 -C public -P 2c -l "Current Sessions" -w 30000 -c 40000
SNMP OK - Current Sessions 6949 | 'Current Sessions'=6949;30000;40000;30000;40000;

Re: Can't get check_snmp to graph - no rrd file

Posted: Fri Apr 22, 2016 9:07 am
by ssax
Try changing "Current Sessions" to "Current_Sessions", I don't think it allows spaces.

Re: Can't get check_snmp to graph - no rrd file

Posted: Mon Apr 25, 2016 10:33 pm
by Box293
Spaces are allowed, the performance data is accommodating for this by enclosing the label in single quotes.

The problem is that the performance data string has one too many semi colons at the end, and this is causing the performance data processing to discard the data.

SNMP OK - Current Sessions 6949 | 'Current Sessions'=6949;30000;40000;30000;40000-->;<--

https://nagios-plugins.org/doc/guidelines.html#AEN200

Code: Select all

'label'=value[UOM];[warn];[crit];[min];[max]
What I don't understand is why the warning and critical values are being used for the minimum and maximum values.

What is the version of check_snmp?

Code: Select all

/usr/local/nagios/libexec/check_snmp -V