CLIENT AREACall Us 1-800-383-5193


Call Us 1-800-383-5193


Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Import Config Files From Nagios Core into Nagios XI

by | May 9, 2021

We Import Config Files From Nagios Core where we wish to import configurations from existing Nagios Core installations.

Importing configuration files automates setting up existing Hosts, Services, Hostgroups, etc in our Nagios XI installation.

As part of our Server Management Services, we assist our customers with several Nagios queries.

Today, let us see how to migrate and import Nagios Core configuration files into Nagios XI.


Import Config Files From Nagios Core into Nagios XI

Before importing, our Support Techs recommend that we use the Nagios XI config import prep tool.

Example Import

For example, we can import a command, hostgroup, host and service … in that order.

Here is a few example configs in the /usr/local/nagios/etc/cfgprep/orig/ directory:

define command {
command_name check_nrpeversion
command_line $USER1$/check_nrpe -H $HOSTADDRESS$

define hostgroup {
hostgroup_name Windows-Common
alias Windows-Common

define host {
use windows-server
host_name server01
hostgroups Windows-Common

define service {
use generic-service
hostgroup_name Windows-Common
service_description NSClient++ Version
check_command check_nrpeversion

Once we run the xiprepimport.php tool, the files will save into the /usr/local/nagios/etc/cfgprep/ directory. All the files will have the same name.

However, the windows_example_service.cfg will be empty and another file, _multiple_hosts.cfg will generate with its content.

These configs demonstrate the need to import the configurations in a specific order.

Navigate to the Core Config Manager (CCM)

There are different ways to access CCM. One way is to, Hover over the Configure button, then select Core Config Manager

Import Configuration Files

We access the Import Interface from the Import Config Files menu option under Tools.

Initially, we will have a popup message that explains the order in which we need to impost the configuration files.

It will command > hostgroup > host > service.

However, we are doing host and hostgroup in the opposite order. In our example, the host is added to a hostgroup. So it needs to exist first.

We can close the popup once we finish reading the message.

Here we can see a list of files available for import.

We can use CTRL or SHIFT on the keyboard to select multiple files to import. In this example, we will be importing the files one at a time.

The first file to import will be:


We can select the file and click the Import button.

Once done, we will receive a success message.

Every time, we ensure the import was a success. In CCM, navigate to Commands and search for check_nrpeversion.

Post Import Actions

Before Applying Configuration, it is best to validate that the configuration files are valid.

For that, 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.

Here, we can check the creation of the host and service config files and the updates of the existing hostgroups and commands config files.

Then we proceed to the Verify Files button.

If our output shows any CRITICAL error messages, the background color will be red.

We can resolve them by going to the respective configuration area in CCM. We retry the write/verify process until the verify is successful.

Apply Configuration

After the configuration, our Support Techs recommend that we use the Apply Configuration function. This will restart Nagios core with the new configuration.

To access this option we select the Apply Configuration menu item and click the Apply Configuration button.

This configuration feature will perform the following steps:

  • Export the database configuration to disk
  • Verify the configuration files
  • Restart Nagios Core
  • Create a new configuration snapshot

Another option is to use the Restart Nagios Core button on the Config File Management page.

However, this option will not create a snapshot like the Apply Configuration button.

Once the import completes, we require additional steps.

These steps include:

  • Upload missing plugins or event handlers to Nagios XI
  • Creating user accounts in Nagios XI

[Find it hard? We are happy to keep you going]



In short, we saw an effective method our Support Techs employ to Import Config Files From Nagios Core into Nagios XI.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


Submit a Comment

Your email address will not be published. Required fields are marked *