Jump to content

WIPRO - Nagios Core to Nagios XI Migration Document

From TetraWiki


Please find below Environment Setup Details:-


  1. VM Ware details:


# OS details:



DC Nagios Server: 10.10.15.160 (dcprdnag01)


Red Hat Enterprise Linux Server release 7.3 (Maipo)


OS Partition details PFB.




Take backup of Nagios core server and transfer to Nagios XI and then migration done.


  1. Take backup of all plugins form /usr/local/nagios/libexec/
  2. Take backup of configuration files from /usr/local/nagios/etc/


Purpose:


This document describes the basic steps involved in migrating an existing Nagios Core installation to Nagios XI.


Target Audience:


This document is intended for use by Nagios administrators who have existing Nagios Core installations.


Steps Involved:


Migrating from a Nagios Core installation to Nagios XI involves several steps including:
• Deploying a new Nagios XI instance
• Uploading plugins and scripts to Nagios XI
• Migrating Nagios Core configuration files to Nagios XI
• Adding user accounts to the Nagios XI server
• Testing the XI server
• De-commissioning the old Nagios Core server



Platform Support:


As of the time of writing, Nagios Enterprises is only able to officially provide support for installing Nagios XI on the following Linux Distributions:


• RHEL 6.x 32-bit and 64-bit, RHEL 7.x


Installation Prerequisites:


  1. Internet should be enable on NAGIOS XI server.
  2. EPEL Repository should be enable on server.
  3. Redhat Subscription should be work on server.



Enable EPEL repo:



rpm -ivh epel-release-latest-7.noarch.rpm


Manual Download:


Alternatively, you can install Nagios XI by issuing the following commands in your terminal session:


cd /tmp



tar xzf xi-latest.tar.gz


cd nagiosxi


./fullinstall


Nagios XI Installation Complete!
---------------------------------------------


You can access the Nagios XI web interface by visiting:




Nagios XI comes with the most common plugins already pre-installed.


If you have additional or custom plugins installed on your Nagios Core system, you will need to install these on the Nagios XI server.


Plugins and scripts can be placed in the /usr/local/nagios/libexec directory.


You may upload plugins to Nagios XI using a web interface which can be accessed under the Admin menu.




Using The Config Import Prep Tool:
To use the config import prep tool, follow the steps below.


Establish a terminal session to your Nagios XI server as the root user.


Step 1: Create a temporary directory for holding the converted configuration files. This directory must be located beneath the /usr/local/nagios/etc directory structure. Example:


mkdir /usr/local/nagios/etc/cfgprep


Step 2: Create a subdirectory for holding the original source configuration files you wish to prep for import:


mkdir /usr/local/nagios/etc/cfgprep/orig


Step 3: Upload (via SSH, etc.) your original source configuration files from your Nagios Core instance to this directory (/usr/local/nagios/etc/cfgprep/orig)


Step 4: Once you've uploaded the source files, change to the the config prep directory you created (/usr/local/nagios/etc/cfgprep).


cd /usr/local/nagios/etc/cfgprep


ls -al orig


Step 5: cd /usr/local/nagios/etc/cfgprep


for f in orig/* ; do /usr/local/nagiosxi/tools/xiprepimport.php $f ; done


After you finishing running the config prep tool, list the contents of the current directory.


ls -al


Importing Config Files From Nagios Core Into Nagios XI


Navigating to the Core Config Manager (CCM)


There are multiple ways to access CCM:


• Hovering the Configure button in the top menu bar you can select Core Config Manager


• On the Configure tab you can select Core Config Manager from the left pane or from the main screen



Import config file:


Go to the import config file and import files.



Here you can see a list of files available for import, you can see the ones highlighted are the ones being imported in this example:
The import interface will allow you to import one or more configuration files, you can use CTRL or SHIFT on the keyboard to assist selecting multiple files. In this example we will be importing the files
one at a time.
We will get after import files as below.



Post Import Actions:


Once you've imported all the necessary Nagios Core configuration files, before Applying Configuration it's best to validate that the configuration files are valid.


In CCM expand Tools and select Config File Management.



Click the Write Configs button to create / update the config files on the Nagios XI server.


You can see in the screenshot to the right that the host and service config files were created and the existing hostgroups and commands config files were updated.


Now click the Verify Files button.


Apply Configuration:


Once you have successfully verified the configuration, it is recommended that you use the Apply Configuration function to restart Nagios core with the new configuration.


You can access this option by selecting the Apply Configuration menu item and clicking the Apply Configuration button.