Nagios to Pandora FMS
Migration guide from NAGIOS 2.x to PANDORA FMS 1.3
Nagios and Pandora FMS have similar goals, but their respective approaches are different. While Nagios is monolithic and event oriented, Pandora FMS is modular and data oriented.
This guide will try to help you replicate your Nagios 2.x setup using an installed Pandora FMS v1.3. This entails some basic knowledge of both tools. Take a look at Pandora FMS documentation.
One of Nagios' main disadvantages is its text based configuration, and the fact that any change requires a complete service restart.
For a large Nagios setup, going through all the configuration files may be a lengthy process. There is a Perl script that hopefully will help you to automate the process, you may find it here:
It is in early development and far from being perfect, so any questions, comments or corrections are more than welcome. Please send them to [email protected]
Hosts, Groups and Services
There are at least three options to replicate the Nagios host and service setup:
- If the number of hosts to monitor is small enough, you may manually create an agent for each host and a module for each service. You may even define a network template and assign it to each agent.
- If you want to monitor a network range, you may create a new recon task, define a network template, and let Pandora FMS's Recon Server do all the work.
- If you have a large, custom setup for clients, you may use the helper script to help you automate the process. There is more information in the next chapter.
If you are not using the helper script, you will have to manually create any new groups you want, but chances are Pandora FMS default groups will suit your needs.
Using the helper script
First of all, edit the script and change the variables $db_name, $db_host, $db_port, $db_user and $db_pass to access Pandora FMS database.
Run the script to see all the options:
The script takes any Nagios configuration files that have templates, host, group, service or command definitions.
Run the script with the following options and check the output. Pandora FMS database will be left untouched:
$ ./n2p.pl -s -v <nagios_cfg_file> [nagios_cfg_file] ...
File order is important for it to work properly. If a host uses a host template, the file containing the template should be passed to the script first.
If your Nagios setup was detected correctly, run the script again. This time Pandora FMS database will change to replicate your setup:
$ ./n2p.pl -v -a <nagios_cfg_file> [nagios_cfg_file] ...
Now you may login to Pandora FMS web console and check the new setup. If you want to undo any changes made by the script to the database, execute it with the following options:
$ ./n2p.pl -v -u <nagios_cfg_file> [nagios_cfg_file] ...
Nagios notifications are equivalent to Pandora FMS alerts.
Now the helper script only creates 'Internal audit' type alerts. Any other alerts, such as 'eMail' or 'SMS Text', have to be manually added.