Page 1 of 1
Graph data problem
Posted: Thu Nov 14, 2013 11:05 am
by snapon_admin
So we're using check_mem.pl for our Unix (Solaris) memory check on all our servers. I don't know if this is the default plugin for memory for Unix or what, but it has been the default service check since we started using Nagios about a year ago. The only issue we've had with this plugin is that it reports mem usage in terms of KB, and all of our servers have many gigs of ram so this would just result in massive numbers on our graphs. Well, we finally decided to modify the plugin to report in GB, and that's working perfectly, but now all the graphs have stopped updating. I had somewhat expected this, but I also am not entirely sure how to fix it. I'm doing some digging now to find out what I need to do on the Nagios server to fix the graph data, but figured I'd post here too, and see if I can get an answer quicker than I would be able to on my own.
For reference, I've attached a screenshot of the graphs so you can see what we're looking at.
Re: Graph data problem
Posted: Thu Nov 14, 2013 11:14 am
by yancy
snapon_admin,
now that you've updated the plugin, have you tried removing the old host and re-adding? The RRDs for this host are probably no longer valid.
Re: Graph data problem
Posted: Thu Nov 14, 2013 11:23 am
by snapon_admin
I am trying that now. Is there any way to fix this issue without removing/re-adding the hosts?
EDIT: Removing and re-adding the host didn't change anything. I removed, applied config, re-added, and applied config. All changes made in web GUI, not CLI.
Re: Graph data problem
Posted: Thu Nov 14, 2013 11:28 am
by abrist
You may have to remove the old rrds. Is retention of the old historical data a requirement?
Re: Graph data problem
Posted: Thu Nov 14, 2013 11:31 am
by snapon_admin
It would be nice, but i wasn't expecting to be able to retain that data so no it's not required.
Re: Graph data problem
Posted: Thu Nov 14, 2013 11:52 am
by abrist
If the preservation of historical data is not a requirement, you could just remove the old rrds and XI will generate new ones. You will find them at:
Code: Select all
/usr/local/nagios/share/perfdata/<host>/<service>.rrd
There are ways to preserve the data, but as the metrics have been decreased by a factor of one million, you will have to fix up the xml before you recreate the rrd.
Edit the XML.
Code: Select all
rrdtool restore new_file.xml my_new.rrd
http://osdir.com/ml/db.rrdtool.user/200 ... 00115.html
http://www.docum.org/drupal/sites/defau ... rd.pl_.txt
http://stackoverflow.com/questions/1347 ... isting-rrd
Re: Graph data problem
Posted: Thu Nov 14, 2013 12:07 pm
by snapon_admin
Do i have to delete the XML and the RRD files in that directory, or just the RRD? Also, I imagine it doesn't re-create the RRD instantly, so about how long can I expect to wait before it re-creates the file after I delete it?
Re: Graph data problem
Posted: Thu Nov 14, 2013 12:12 pm
by yancy
I suggesting moving them all to /tmp (not deleting).
in any case, it could take 15 or 20 minutes to see results in XI.
Re: Graph data problem
Posted: Thu Nov 14, 2013 12:22 pm
by snapon_admin
K, and both the XML and RRD, or just the RRD?
Re: Graph data problem
Posted: Thu Nov 14, 2013 1:23 pm
by abrist
Both.