Page 1 of 2

service check not graphing

Posted: Mon Feb 15, 2016 10:17 am
by psteam
Hi there,
I build a custom script and it needs to graph. I have built other scripts and it should graph
Here is the output from the CLI

VmSizemb:978 | VmRSS:621 VmSizemb:978

Also I noticed in the service details Nagios seams to pick up the performance data correctly

However it’s not graphing. Below are some settings I have set in the service details

Re: service check not graphing

Posted: Mon Feb 15, 2016 11:12 am
by gormank
Have a look at the related <servicename>.rrd files. See if the files exist and have a current (as of the last check) timestamp. If the timestamp is old remove/rename the .rrd files. You might keep an eye on the <servicename>.xml files as well.

Re: service check not graphing

Posted: Mon Feb 15, 2016 1:18 pm
by psteam
something is odd
there is no file for that service
tbv1nagios8 pdc2app109]$ ls -ltr
total 1504
-rw-rw-r-- 1 nagios nagios 2993 Feb 15 13:11 _HOST_.xml
-rwxrwxr-x 1 nagios nagios 1534768 Feb 15 13:11 _HOST_.rrd
[ajdazeve@tbv1nagios8 pdc2app109]$ pwd
/vol0/nagios/share/perfdata/pdc2app109

Re: service check not graphing

Posted: Mon Feb 15, 2016 2:45 pm
by rkennedy
I don't believe your perfdata is being generated properly. It should follow a structure similar to this -

Code: Select all

time=0.745068s;;;0.000000 size=65844B;;;0
See this link for a bit more information about performance data -
https://nagios-plugins.org/doc/guidelines.html#AEN200

Re: service check not graphing

Posted: Mon Feb 15, 2016 4:01 pm
by psteam
i readed the doc and changed my ouput to come out like so

/mdf_jms_check4.sh -u ust -a JMS
VmSizemb:978 | VmRSS:665MB VmSizemb:978MB


however it still dosent graph ..is there a way to force this in nagios to reset something and re-create the rdd files?

Re: service check not graphing

Posted: Mon Feb 15, 2016 4:34 pm
by rkennedy
I believe you will need to use equal signs, and not colons.

If you don't have any previous RRD files created in the directory, you should be fine.

Check out this directory, /usr/local/nagios/share/perfdata/hostname/service.rrd/xml/hosthere - replace hosthere with the host which this check is running under.

Re: service check not graphing

Posted: Mon Feb 22, 2016 9:12 am
by psteam
This worked thank you very much.
I have another small question.
Currently we have one nagios per datacenter.
What I was wondering is if there’s a way to gather all perfdata in one location (ie: nfs share drive) mounted on each Nagios and have perfdata dump in there.. Would I be able to grab a Nagios and pull reports on hosts not setup in that Nagios?
Is there another solution that I could put in place?

Re: service check not graphing

Posted: Mon Feb 22, 2016 2:51 pm
by rkennedy
Would I be able to grab a Nagios and pull reports on hosts not setup in that Nagios?
You could pull the RRD data - but, you would need to display it elsewhere. XI will not be able to just "read" all of the data with no associations made. It will only display for the hosts it has.

I wouldn't recommend writing to NFS as the read / write is pretty high for perfdata. If anything, you could always download it all once a day.

What are you looking to accomplish specifically?

Re: service check not graphing

Posted: Mon Feb 22, 2016 4:34 pm
by psteam
for example we have a an application with 4 different app servers.
2 in one Datacenter and 2 in the other...
now i can pull lets says cpu graphs on each nagios ( per datacenter0
what i would like to do is pull a graph with all app servers on the same graph.


i was thinking perhaps i could put all perf data in the same nfs share but how to read it

Re: service check not graphing

Posted: Tue Feb 23, 2016 2:35 pm
by tmcdonald
You might be able to use this:

https://exchange.nagios.org/directory/A ... ol/details

Though I am not sure if, like XI itself, you can read arbitrary RRD data or just that which is associated with a host/service already. Toss all the RRD data you want to read in an XI machine with the rest and test it out!