Changing the Path of Nagios


I am new to both Linux and Nagios, but I am learning pretty quick. I have just installed the Nagios. Everything is fine so far, but i have a lil problem. This is where Nagios is located /usr/local/nagios; however, I wanted to change it to /var/opt.

When I just do the following:

mv /usr/local/nagios/ /var/opt/nagios service nagios status Executable file /usr/local/nagios/bin/nagios not found. Exiting.

I also tried to try to verify the Nagios configration files which gave me following error.

Error: Cannot open resource file '/usr/local/nagios/etc/resource.cfg' for reading! Error in configuration file '/var/opt/nagios/etc/nagios.cfg' - Line 447 (Check result path is not a valid directory)

As I said, I only want to change the Nagios directory and put it under /var/opt . But seems like cant do it. Any help would be helpful. Thanks



Changing to another path requires a recompile of the Nagios source, preceeded by a configure run where you specify the path.

It’s actually quite straight forward if you follow the directions in the Nagios documentation.