Page 1 of 2
Graph not displaying data on 0
Posted: Wed Feb 20, 2019 2:37 pm
by tsawyer
I'm having an issue with the performance graph showing "No Data to Display" when the returned value is repetitive 0's. The service in question is monitored with a custom py script that returns the counts for a certain error code. So, when everything is good, it returns 0. The problem is that I know this, but it "Would look better if you made it show the 0's". Is there a way to format the perfdata returned so that the 0 is graphed, not ignored altogether??
Re: Graph not displaying data on 0
Posted: Wed Feb 20, 2019 5:01 pm
by lmiltchev
Have you tried selecting the "Ignore null values when calculating Avg/Max/Last values " check-box under "System Settings" to see if this is going to fix the issue?
Re: Graph not displaying data on 0
Posted: Wed Feb 20, 2019 5:24 pm
by tsawyer
I saw that before, but didn't think that would apply as I'm not returning a null value. I'll certainly give that a shot and see. Thanks much.
Re: Graph not displaying data on 0
Posted: Thu Feb 21, 2019 12:20 pm
by lmiltchev
Let us know if this helped. We will keep the thread open for the time being.
Re: Graph not displaying data on 0
Posted: Fri Feb 22, 2019 12:59 pm
by tsawyer
Good morning! No dice...

Ignoring Null didn't help, my graphs still show "No data to display". Is there something in the performance data formatting i can change??
Here's the line of code on an All Clear:
Code: Select all
if get102 == None:
sys.stdout.write("No 102 codes recorded on GW|'Code Count'=0;10;100;0;1000")
sys.exit(0)
I tried formatting the 0 as an integer to see if that would help, but Nagios didn't like that.
Re: Graph not displaying data on 0
Posted: Fri Feb 22, 2019 1:31 pm
by lmiltchev
Can you click on the service, go to the
Advanced tab, and show us a screenshot of the page?
Are RRD and XML files in /usr/local/nagios/share/perfdata/<hostname> directory updating? Can you show us the output of the following command:
Code: Select all
ls -la /usr/local/nagios/share/perfdata/<hostname>
where you substitute <hostname> with the actual name of the folder?
Also, upload the /usr/local/nagios/var/npcd.log and /usr/local/nagios/var/perfdata.log files on the forum. Thanks!
Re: Graph not displaying data on 0
Posted: Fri Feb 22, 2019 5:58 pm
by tsawyer
102errorsnip.PNG
perfdata.log
npcd.log
The perfdata.log is only showing a short span of time from the 19th, hope it's useful.
//////////////
[root@nagiosmonitor scraper]# ls -al /usr/local/nagios/share/perfdata/CIC-GW0
total 5680
drwxrwxr-x 2 nagios nagios 4096 Feb 22 14:38 .
drwxrwxr-x. 266 nagios nagios 12288 Feb 7 14:32 ..
-rw-rw-r-- 1 nagios nagios 384952 Feb 22 14:21 Check_102_Errors.rrd
-rw-rw-r-- 1 nagios nagios 2093 Feb 22 14:21 Check_102_Errors.xml
-rw-rw-r-- 1 nagios nagios 1534768 Feb 22 14:38 _HOST_.rrd
-rw-rw-r-- 1 nagios nagios 3934 Feb 22 14:38 _HOST_.xml
-rw-rw-r-- 1 nagios nagios 1534768 Feb 22 14:38 Ping.rrd
-rw-rw-r-- 1 nagios nagios 4047 Feb 22 14:38 Ping.xml
-rw-rw-r-- 1 nagios nagios 768224 Jun 21 2018 Port_2_Bandwidth.rrd
-rw-rw-r-- 1 nagios nagios 2859 Jun 21 2018 Port_2_Bandwidth.xml
-rw-rw-r-- 1 nagios nagios 768224 Feb 22 14:37 Port_3_Bandwidth.rrd
-rw-rw-r-- 1 nagios nagios 2899 Feb 22 14:37 Port_3_Bandwidth.xml
///////////////
Thanks for taking a poke at this. Much appreciated.
Re: Graph not displaying data on 0
Posted: Mon Feb 25, 2019 1:50 pm
by scottwilkerson
Does this plugin ever return more than 1 performance metric?
Re: Graph not displaying data on 0
Posted: Tue Feb 26, 2019 11:52 am
by tsawyer
No, this particular monitor only watches for current counts of the one error code.
Re: Graph not displaying data on 0
Posted: Tue Feb 26, 2019 3:49 pm
by scottwilkerson
So even though you have the correct .rrd files there, you are not seeing any graph on the performance graphs tab?
It is just displaying "No Data to Display" ?
Does it do this if you adjust the time frame too?