Pandora: Nagios to Pandora
1 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, and assumes that you have a basic knowledge of both tools. You should have read Pandora FMS's documentation by now :-)
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 can be a lengthy process. We have written a Perl script that we hope will help you to automate the process, you can find it in:
It is in early development and far from being perfect so any questions, comments or corrections are more than welcome. Please send them to rnovoa AT artica DOT es.
1.2 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 can manually create an agent for each host and a module for each service. You can even define a network template and assign it to each agent.
- If you want to monitor a network range, you can 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 can use the helper script to help you automate the process. We'll explain more about that 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's default groups will suit your needs.
1.3 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's 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 as input.
Run the script with the following options and check the output. Pandora FMS's database will be left untouched:
$ ./n2p.pl -s -v <nagios_cfg_file> [nagios_cfg_file] ...
File order is important for inheritance to work. 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's database will change to replicate your setup:
$ ./n2p.pl -v -a <nagios_cfg_file> [nagios_cfg_file] ...
Now you can login to Pandora FMS's web console and check the new setup. If you want to undo any changes made by the script to the database, just execute it with the following options:
$ ./n2p.pl -v -u <nagios_cfg_file> [nagios_cfg_file] ...
Nagios notifications are equivalent to Pandora FMS's alerts.
Now the helper script only creates 'Internal audit' type alerts. Any other alerts, like 'eMail' or 'SMS Text', have to be manually added.
1.5 Other Configuration Options
There are some Nagios configuration options that do not have an equivalent in Pandora FMS or are not treated by the helper script. Again, feel free to send any request or suggestions to rnovoa AT artica DOT es.