Page 1 of 3

no uptime graph for custom alive check

Posted: Wed Apr 15, 2020 3:20 pm
by katieKatiePants
helloooooo nagios universe. after having read [https://support.nagios.com/kb/article/n ... ems-9.html] and the other forum post from 2012 about uptime graphs from custom uptime checks, am a little stuck. what doco should i follow to build the right <thing> for the uptime graphs? i suspect i'm supposed to build an .xml file (?) or a template somewhere (?) ... is there a doco that i can follow? #superLost

Re: no uptime graph for custom alive check

Posted: Wed Apr 15, 2020 4:15 pm
by tgriep
FYI, if the plugin outputs performance data in the correct format, the XI system will automatically create the xml and rrd files and display the graph in the GUI.

If you can run the uptime check in a root shell and post the output so we can see what the plugin displays, we can see if it is the correct format to be graphed.

See this guide under the performance data section to see what it should look like.
https://nagios-plugins.org/doc/guidelines.html

Re: no uptime graph for custom alive check

Posted: Wed Apr 15, 2020 4:16 pm
by ssax
The only thing that determines whether or not performance data is built is if the plugin returns it in the output.

See here:

Code: Select all

https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/pluginapi.html
If the service name used to have a different check command you may need to delete the old RRD so it gets rebuilt:

Code: Select all

rm /usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd
Please link us to the exact plugin you're using, make sure to check the help section of the plugin (if any) to look for performance data options.

Thank you

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 3:58 pm
by katieKatiePants
@ssax and @tgriep - thank you for the response, today is not a total waste of space and time.

for your curiosity, i'm using

Code: Select all

check_tcp
on the Super Evil Nagios port ... i'll get the outputs from your asks after this interminable call ends.

#I have one job on this ship, it's stupid, but i'm going to do it. -Tawny Madison#

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 4:34 pm
by katieKatiePants

Code: Select all

[root@ip-10-10-10-10 centos]# /usr/local/nagios/libexec/check_tcp 10.20.20.20 -H 10.20.20.20 -p 5693 20
TCP OK - 0.002 second response time on 10.51.0.10 port 5693|time=0.002101s;;;0.000000;10.000000

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 4:44 pm
by katieKatiePants
<a whole bunch of redacted profanity> ... just now looking at the template and found that the "process perf data" button was set to "screw you katie" mode ... hoping this "fixes" it.

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 4:48 pm
by ssax
Ahh, that'll do it. Are you seeing them show up now?

Send the output of these commands as well:

Code: Select all

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

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 4:53 pm
by katieKatiePants
so the

Code: Select all

wc -l
output was 2 for each.

the graphs now say "no data to display" but now w/a time series axes so hoping that it'll start making pretty graphs starting "now"ish

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 4:55 pm
by ssax
That's correct, wait about 15 and let us know. Time plus multiple checks is what it needs.

Re: no uptime graph for custom alive check

Posted: Thu Apr 16, 2020 4:56 pm
by katieKatiePants
looks like the _HOST_.rrd file hasn't been modified since the day when i brought it to life ... is that expected?