Graph not displaying data on 0

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tsawyer
Posts: 13
Joined: Tue Apr 24, 2018 1:23 pm

Graph not displaying data on 0

Post 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??
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Graph not displaying data on 0

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
tsawyer
Posts: 13
Joined: Tue Apr 24, 2018 1:23 pm

Re: Graph not displaying data on 0

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Graph not displaying data on 0

Post by lmiltchev »

Let us know if this helped. We will keep the thread open for the time being.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tsawyer
Posts: 13
Joined: Tue Apr 24, 2018 1:23 pm

Re: Graph not displaying data on 0

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Graph not displaying data on 0

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
tsawyer
Posts: 13
Joined: Tue Apr 24, 2018 1:23 pm

Re: Graph not displaying data on 0

Post 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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Graph not displaying data on 0

Post by scottwilkerson »

Does this plugin ever return more than 1 performance metric?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tsawyer
Posts: 13
Joined: Tue Apr 24, 2018 1:23 pm

Re: Graph not displaying data on 0

Post by tsawyer »

No, this particular monitor only watches for current counts of the one error code.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Graph not displaying data on 0

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked