skip to main content
Third party configuration import : Import configuration
   
Import configuration
To import a nagios 3 configuration we need to prepare the nagios configuration files first, after that we can use the import script to import the files into op5 Monitor.
Preparing nagios configuration
Log in to the nagios server via ssh or locally.
Create a new file called templates.cfg in which you manually add both your host-templates and your service-templates. These are usually located in hosts.cfg and services.cfg.
Create a nagios pre-cache file by stopping nagios and start it with the -p option. this is done from you nagios binary directory, usually β€œ/usr/local/nagios/bin/”.
# service nagios stop
# ./nagios -pv <path to your nagios.cfg>
This will create a file called objects.precache in your β€œvar” directory under your nagios installation.
Import nagios configuration
Make sure op5 monitor is stopped
# mon stop
Copy the files to the correct directory on your op5 Monitor server.
File
To folder
objects.precache
/opt/monitor
templates.cfg
/opt/monitor
nagios.log
/opt/monitor/var/
log archive
/opt/monitor/var/archives
Run the import script
# php /opt/monitor/op5/nacoma/import-reduce.php --cfg-file=/opt/monitor/templates.cfg --object-cache=/opt/monitor/objects.precache
Do a config-test on the imported configuration
# service monitor configtest
If you have any errors these needs to be resolved before we can continue with starting the op5 monitor service.
When there are no issues left start the monitor service
# mon start