Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?
share|improve this question
add comment

1 Answer

  • Where does pnp4nagios store the processed data (graphs)?

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):

grep -B2 rrdbase /usr/local/pnp4nagios/etc/config.php
# Directory where the RRD Files will be stored
#
$conf['rrdbase'] = "/usr/local/pnp4nagios/var/perfdata/";

In your case, maybe it is:

/usr/lib/pnp4nagios/var/perfdata/
  • How can I force pnp4nagios to regenerate all graphs?

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:

ERROR: This RRD was created on another architecture

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 with rrdtool restore.

More details: http://www.linuz.in/?p=254

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.