Transfering old Nagios 3 configuration to new Nagios 4

Well, since service as such is working, I need to transfer configuration from old to new server.
Where are the files
In my old configuration (Nagios 3.2) conf files are in /etc/nagios folder.
If Nagios 4.0.2 is installed as in my previous post, conf files are in : /usr/local/nagios/etc.
Plug-in-s and PL scripts on Nagios 4.0.2 are in /usr/local/nagios/libexec folder.
Which configuration files need to be copied
From /etc/nagios to /usr/local/nagios/etc :
command-plugins.cfg
commands.cfg
contactgroups.cfg
contacts.cfg
hosts.cfg
ncsa.cfg
send_ncsa.cfg
services.cfg
From /var/nagios to /usr/local/nagios/var :
objects.cache
After transfering configuration files, restart the service, and look in /usr/local/nagios/var log!!
Which configuration files need changing
File /usr/local/nagios/etc/nagios.cfg, and what to change in it :
…..
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
cfg_file=/usr/local/nagios/etc/services.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
…..
nagios_group=nagcmd
What is missing, and needs to be added
Aside from installing standard plug-in-s, a heap of PL scripts will probably be missing. They can be just copied from old server to the new one (from folder /usr/lib/nagios/plugins) to new, in folder : /usr/local/nagios/libexec.

In the end
After transfering configuration files and theire change, restart the service, and see the command output and log file /usr/local/nagios/var/nagios.log, as well as the debug log /usr/local/nagios/var/nagios.debug!!

This entry was posted in Linux and tagged , . Bookmark the permalink.

Comments are closed.