Can't get check_snmp to graph - no rrd file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
quartix
Posts: 8
Joined: Wed Nov 19, 2014 4:42 am

Can't get check_snmp to graph - no rrd file

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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
Former Nagios employee
quartix
Posts: 8
Joined: Wed Nov 19, 2014 4:42 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
quartix
Posts: 8
Joined: Wed Nov 19, 2014 4:42 am

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

Post 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;
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post by ssax »

Try changing "Current Sessions" to "Current_Sessions", I don't think it allows spaces.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked