Page 1 of 1

Generate graph from deleted host rrd files

Posted: Thu Feb 09, 2017 3:41 am
by monit_burb
Hi

I deleted a server recently that was going to be decommissioned but now they are requesting if I can get some graph of the last month of the server activity. I tried to re-create the host hopping it will use the same rrd files but sadly, it didn't. I was thinking that maybe I used a different template back then when I added for the first time and the CPU and RAM checks that I'm interested in had different settings.

I do have the original rrd files and xml files of the host but don't know how to generate a graph with them.

Any ideas?

Re: Generate graph from deleted host rrd files

Posted: Thu Feb 09, 2017 12:03 pm
by mcapra
Prior to touching anything, I would suggest making a backup of the existing performance data if you're not totally sure of things. Running /usr/local/nagiosxi/scripts/backup_xi.sh should be more than sufficient.

You could try to leverage @box293's Performance Data Tool component and merge the old data in:
https://exchange.nagios.org/directory/A ... ol/details

Although, that's a pretty tricky thing to accomplish due to the lossy nature of RRDs. You could probably set up a dummy set of hosts+services to represent the decommissioned host and bring the data in that way.

What I did is cleared out my existing RRDs for the machine's services, allowed fresh ones to re-generate (takes about 15 minutes), then used the Performance Data Tool to merge a previous backup's RRDs into the fresh files. This worked on data that was 4 days stale, but your results may vary. A screenshot of the process:
2017_02_09_10_59_51_Tools_Nagios_XI.png
Before merging:
2017_02_09_11_02_06_Nagios_XI.png
After merging:
2017_02_09_11_03_13_Nagios_XI.png