Page 1 of 1
Moving Nagios to different directory
Posted: Thu Aug 25, 2016 12:04 pm
by tah7004
Hello,
Is there away to move Nagios from the default /usr/local/ to somewhere like /opt/?
Re: Moving Nagios to different directory
Posted: Thu Aug 25, 2016 4:04 pm
by tmcdonald
Nothing that we have documented, but usually a symlink will suffice.
There are some things you will need to change in
/usr/local/nagiosxi/html/config.inc.php if you truly wish to move it all over, like the following:
Code: Select all
// base root directory where XI is installed
$cfg['root_dir'] = "/usr/local/nagiosxi";
// directory where scripts are installed
$cfg['script_dir'] = "/usr/local/nagiosxi/scripts";
$cfg['xidpe_dir'] = '/usr/local/nagios/var/spool/xidpe/';
$cfg['perfdata_spool'] = '/usr/local/nagios/var/spool/perfdata/';
// nom checkpoints
$cfg['nom_checkpoints_dir'] = "/usr/local/nagiosxi/nom/checkpoints/nagioscore/";
You will also likely need to change some paths in the Core side of things as well if you are planning on moving the entire codebase.
I will also point out that this is not strictly guaranteed or supported, since we do not have this documented and have not tested this internally.