I have moved to a new nagios
installation (new server). I have transfered the data from the original server (/var/log/nagios2/archives
) to my new server (/var/log/nagios3/archives
) (I think they have compatible format). Now I would like to regenerate the pnp4nagios graphs using this historical data.
This is the command I have to process data on the fly:
/usr/lib/pnp4nagios/libexec/process_perfdata.pl --bulk=/var/lib/pnp4nagios/perfdata/host-perfdata
But this is just processing new data in /var/lib/pnp4nagios/perfdata/host-perfdata
.
I have several questions:
- Where does pnp4nagios store the processed data (graphs)?
- How can I force pnp4nagios to regenerate all graphs?
Best Answer
process_perfdata.pl
writes the data to XML files and stored them in RRD files. The path is defined by$conf['rrdbase']
in the config file (config.php
):In your case, maybe it is:
If both servers have the same architecture (I mean 32bit or 64bit), copy the RRD files to the corresponding folders should work. If not, you may get the below error:
In this case, you need to use
rrdtool dump
to write the content of an RRD in plain ASCII, then copy them to your new server and restore withrrdtool restore
.More details: http://www.linuz.in/?p=254