Third party configuration import
Introduction
Op5 Monitor has the capability to import the configuration from any nagios installation.
To do follow this manual basic knowledge in linux and nagios is necessary.
Pre-requirements
A running nagios 3.x installation and op5 Monitor.
Limitations
There are some of limitations of the import script.
•The import-script does not work with a nagios 1 or 2 installation.
•Host and service history can not be imported, but can be copied manually.
•Graph history can not be imported.
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