Welcome to docs.opsview.com

Migrating from Nagios® Core to Opsview

There are two methods for migration from Nagios Core to Opsview

  • A full migration where all monitoring is moved into an Opsview system and the Nagios Core server can be decommissioned.
  • A partial migration where the existing Nagios Core server is configured to send all of its result back to an Opsview server. The Nagios Core server remains in use.

Planning your full migration

Overview

We recommend that you provision an Opsview system for the purpose of testing your migration.

Migration checklist:

  1. Check that Opsview is supported on your target platform
  2. Test existing Nagios plugins and copy to Opsview system
  3. Configure required service checks in Opsview
  4. Create Host Templates corresponding to required hardware, operating system and application checks
  5. Create required contacts for Opsview system access and notifications
  6. Confirm that the Opsview migration tool imports your host information correctly
  7. Test whether your Nagios add ons work as expected
  8. Confirm that your existing Nagios agents work correctly
  9. Confirm that SNMP monitoring continues to work correctly

Plugins

Any Nagios plugins used by your existing system should continue to work with Opsview. If you have developed any plugins yourself we recommend that you review the Nagios Plugins developer guidelines.

Plugin Guidelines:

  • Use the plugins supplied with Opsview if there are any duplicates
  • Confirm that your plugins accept the '-h' argument to display help information
  • Confirm that your plugins return performance data if you require performance graphs
  • If you are using third-party supplied plugins we recommend that you upgrade to the latest version

Copy any custom plugins into /usr/local/nagios/libexec on the Opsview server.

Nagios add-ons

We cannot guarantee that Nagios addons will work with Opsview. Our recommendation is that you setup a test Opsview system to confirm correct operation.

Opsview includes some common addons such as MRTG and Nagvis. We strongly recommend that you use the version supplied with Opsview rather than your own.

Nagios Agents

You can use your existing Nagios agents with Opsview so there is no need to update software on your existing monitored hosts. We recommend you follow these guidelines:

  • Opsview has been tested with NRPE, NRPE_NT and NSClient++, you should ask on our forums if you're using another technology
  • Configuration of the Service Checks supplied with Opsview may require changing for use with your own agents
  • Review the Nagios Plugin guidelines above for the Nagios plugins that you are using with your agent.

SNMP

Plugins that use the SNMP protocol should continue to work with Opsview. Guidelines:

  • Confirm access control for your SNMP agent allows queries from your Opsview server's network address
  • Configure SNMP parameters against each Opsview host and then use Macros with your Service Checks

Notification

Your existing Email, Pager and SMS notification facilities should work with Opsview. If you are using another notification method it may be necessary to modify your configuration and notification scripts.

Using the Migration Tool

Compatibility

This tool is compatible with Nagios Core 3

Capabilities

This tool is capable of migrating the following configuration items:

  • Time periods
    • Only weekly definitions
  • Contacts
  • Hosts
    • Parents will be associated. Contact groups will not be imported. Every host will be given the Network - Base host template
  • Host groups
  • Services
    • Only active checks will be imported. Service checks will be put into a service group called “Imported”

Preparation

Copy your Nagios Core configuration to the Opsview server

The migration tool reads the Nagios Core object file which are used by the Nagios Core CGIs. This file is called object.cache, or objects.dat in older versions of Nagios Core. The file is usually located in /usr/local/nagios/var.

Transfer this file to your Opsview server.

Running the migration tool

The migration tool is located within the /usr/local/nagios/installer directory on the Opsview master server. We recommend you take a backup of your existing Opsview configuration database before running the migration tool.

su - nagios
/usr/local/nagios/bin/db_opsview db_backup > /tmp/opsview.db
/usr/local/nagios/installer/migrate_nagios {path to objects.cache file}

This will output information about what changes it has made. Check the output for any warnings.

The tool can be run multiple times without making multiple entries of the same information within Opsview.

Post-migration

  • Review warnings raised in the output
  • Review the hosts that have been imported - check host groups as Opsview only allows a host in a single host group
  • Review the service checks that have been imported. Can move the service checks into appropriate service groups
  • Review the contacts imported - set permissions based on host group and service group and the appropriate notification options
  • Review contact groups - set permissions based on host groups and service groups
  • Do a reload and start monitoring!

Support

We are always looking to enhance our migration tools, but the migration tools heavily depend on the initial Nagios Core configuration.

If it has not imported data as you expect, please contact us on the mailing lists with the version of Opsview, your objects.cache file and what the issue is.

Troubleshooting

Error messages during migration

These error messages will stop the migration process.

Unrecognised method=notify-by-carrier-pigeon

A notification method has been defined that Opsview doesn't recognise. You can should remove these from the object.cache file for the particular contact to continue.

Inconsistent check_interval, retry_check_interval or max_check_attempts

Opsview uses common check interval, retry_check_interval and max_check_attempts for services with the same name. The migration tool will fail if these attributes for a service does not match the service check's definition.

You can either:

  • change the objects.cache file to match the database information
  • update the service check definition in Opsview
  • rename the service description to a different name, thus creating a different service check definition

Warning messages during migration

These warning messages could appear in the migration output.

Changed service description ....

Opsview has reserved some characters from being used in a service description. This warning just tells you that the name has been changed.

Inconsistent check_period

Opsview uses common check periods for services with the same name. The migration tool will fail if the check_interval specified for a service does not match the service's check interval definition.

Opsview has a feature where if the service has no check_period set, it will inherit from the host's check_period - this could account for the discrepency.

Inconsistent notification options

Opsview uses common notification options for services with the same name. The migration tool will flag any services that have the same name but the notification options do not match.

Opsview has a feature where if the host has no notifications set, then the service will also not have any notification options - this could account for the discrepancy.

Navigation
Print/export
Toolbox