目次

Nagios から Pandora FMS へのマイグレーション

Migration guide from NAGIOS 2.x to PANDORA FMS 1.3

Introduction

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:

/usr/share/pandora_server/util/n2p.pl

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@artica.es.

Hosts, Groups and Services

There are at least three options to replicate the Nagios host and service setup:

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:

$ ./n2p.pl

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] ...

Notifications

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.

Other Configuration Options

There are some Nagios configuration options that do not have an equivalent in Pandora FMS or are not processed by the helper script. Again, feel free to send any request or suggestions to rnovoa@artica.es.