Nagios XI monitors hosts, network services, and application metrics across Linux and Windows environments, alerting administrators when checks enter warning or critical states. Built on top of the Nagios Core scheduling engine, Nagios XI adds a web-based configuration manager (Core Config Manager), performance graphing, dashboards, and built-in passive/active monitoring wizards.

This guide covers:

  1. Installing Nagios XI on CentOS/RHEL.
  2. Configuring passive monitoring with NRDP (Nagios Remote Data Processor) and NRDS (Nagios Remote Data Sender) on Linux and Windows clients.
  3. Isolating host visibility by team using static contact and contactgroup definitions.
  4. Active Windows monitoring with NSClient++ (check_nt).

1. Installing Nagios XI

Download the Nagios XI source archive (for example, Nagios XI 5.2.9) onto a clean, freshly installed CentOS/RHEL server, extract it, and run ./fullinstall as root:

cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.2.9.tar.gz
tar xzf xi-*.tar.gz
cd nagiosxi
sudo ./fullinstall

The fullinstall script automatically configures required YUM repositories, installs Apache (httpd), PHP, MySQL/PostgreSQL, Nagios Core, NDOUtils, PNP4Nagios, and NRDP. Once the installer completes, open http://<nagios-server-ip>/nagiosxi in your browser to finish the initial admin setup.

Running Full Install:

Running full install

Installation Complete:

Installation Complete

Initial Web Configuration Complete:

Initial configuration done


2. Passive Monitoring with NRDP and NRDS

NRDP (Nagios Remote Data Processor) is an HTTP/HTTPS web endpoint on the Nagios XI server that accepts passive check results authenticated via shared tokens. NRDS (Nagios Remote Data Sender) runs on monitored clients via cron (Linux) or Task Scheduler (Windows), pulls check definitions and plugins from the Nagios XI server, and posts passive check results back to /nrdp.

Step 2.1: Verify the NRDP Endpoint

Browse to http://<nagios-server>/nrdp/ to test submitting a sample passive check payload:

submit a query

Confirm the XML response reports <status>0</status> and <message>OK</message>:

Response

Any passive check submitted for a host or service that has not yet been defined in Nagios XI appears automatically under Admin → Monitoring Config → Unconfigured Objects, where you can import it into monitoring with a few clicks:

Unconfigured Objects

Step 2.2: Configure Inbound NRDP Authentication Tokens

Navigate to Admin → Check Transfers → Inbound Transfers and configure an authentication token under the NRDP tab:

Inbound NRDP Configuration

(Note: While an NSCA tab is also available for legacy passive checks, NRDP over HTTPS is strongly preferred over NSCA.)

Inbound NSCA Configuration

Step 2.3: Create an NRDS Client Configuration

Navigate to Admin → Monitoring Config → NRDS Config Manager and create a configuration profile for Linux or Windows clients:

1. Select OS Type (Linux):

Config for Linux

2. Assign the NRDP Token and Define Check Commands:

setting up info

3. Save the NRDS Configuration:

Config Complete


3. Installing the NRDS Client on Linux

On each target Linux host, run the following commands as root. The NRDS installer will:

  • Install the NRDS client scripts.
  • Create the nagios user and group.
  • Download check plugins from the Nagios XI NRDP endpoint.
  • Register a cron job that runs checks and posts results back to Nagios XI at the specified interval.
cd /tmp
wget -O new_linux_config.tar.gz "http://<nagios_server_url>/nrdp/?cmd=nrdsgetclient&token=<YOUR_NRDP_TOKEN>&configname=new_linux_config"
gunzip -c new_linux_config.tar.gz | tar xf -
cd clients

# Syntax: ./installnrds <HOSTNAME> <INTERVAL_IN_MINUTES>
sudo ./installnrds linux-server 5

Once the first cron execution completes, visit Admin → Unconfigured Objects in Nagios XI to import linux-server and its passive services:

nrds_testing


4. Installing the NRDS Client on Windows

  1. Download the NRDS Windows client installer from NRDS Config Manager on the Nagios XI server:

    Config Complete

  2. Accept the license agreement:

    Agreement

  3. Enter the Nagios XI NRDP URL (http://<nagios-server>/nrdp/), NRDP token, configuration name, hostname, and check interval in minutes:

    Config

  4. Complete the wizard to generate config.ini and register the Windows Scheduled Task:

    ini file

    Install

  5. Import the newly reported host from Admin → Unconfigured Objects:

    testing


5. Role-Based Host Visibility Using Static Contact Groups

In multi-team environments (for example, separate Linux and Windows administration teams), you often want a user account (windowsnagiosadmin) to see and receive alerts only for Windows hosts.

In Nagios XI, static Nagios Core configuration files can be placed inside /usr/local/nagios/etc/static/ (which Nagios Core loads alongside Core Config Manager database objects).

Step 5.1: Inspect /usr/local/nagios/etc

┌─[zahmed][localhost][/usr/local/nagios/etc]
└─▪ ls
cgi.cfg               hosttemplates.cfg  servicedependencies.cfg
commands.cfg          import             serviceescalations.cfg
contactgroups.cfg     nagios.cfg         serviceextinfo.cfg
contacts.cfg          ndo2db.cfg         servicegroups.cfg
contacttemplates.cfg  ndomod.cfg         services
hostdependencies.cfg  nrpe.cfg           servicetemplates.cfg
hostescalations.cfg   nsca.cfg           static
hostextinfo.cfg       pnp                timeperiods.cfg
hostgroups.cfg        resource.cfg       hosts
send_nsca.cfg

Step 5.2: Define the Contact, Contact Group, and Host

  1. Create /usr/local/nagios/etc/static/windows-server-contact.cfg:
    define contact {
        contact_name                    windowsnagiosadmin
        alias                           Windows Nagios Administrator
        host_notification_period        nagiosadmin_notification_times
        service_notification_period     nagiosadmin_notification_times
        host_notification_options       d,u,r,f,s
        service_notification_options    w,u,c,r,f,s
        host_notification_commands      xi_host_notification_handler
        service_notification_commands   xi_service_notification_handler
        email                           admin@example.com
    }
    
  2. Create /usr/local/nagios/etc/static/windows-server-contactgroup.cfg:
    define contactgroup {
        contactgroup_name               windowsadmins
        alias                           Windows Nagios Admin Group
        members                         windowsnagiosadmin
    }
    
  3. Bind the host to contact_groups windowsadmins in /usr/local/nagios/etc/static/nagios-test-windows.cfg:
    define host {
        host_name                       nagios-test-windows
        use                             xiwizard_passive_host
        address                         nagios-test-windows
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        contact_groups                  windowsadmins
        notification_interval           60
        notification_period             xi_timeperiod_24x7
        stalking_options                n
        icon_image                      passiveobject.png
        statusmap_image                 passiveobject.png
        _xiwizard                       passiveobject
        register                        1
    }
    

Step 5.3: Validate and Restart Nagios

Always validate the Nagios configuration syntax before restarting the daemon:

sudo service nagios checkconfig
sudo service nagios restart

Step 5.4: Create the Matching Nagios XI Web User

In the Nagios XI web UI (Admin → Users → Manage Users), create a user with the exact username windowsnagiosadmin (without granting global “Can see all objects” privileges):

windows_user

  • View when logged in as nagiosadmin (sees both Linux and Windows hosts):

    login

  • View when logged in as windowsnagiosadmin (sees only hosts associated with windowsadmins):

    loggedin


6. Active Windows Monitoring with NSClient++ (check_nt)

Step 6.1: Install NSClient++ on the Windows Host

Download the MSI installer from nsclient.org/download and install it on the Windows server:

install

During setup, specify the Nagios XI server IP in Allowed hosts, set a shared password, and enable check_nt (TCP port 12489) and NRPE:

config

Complete the installer and verify that the NSClient++ (nscp) Windows service is running:

complete

service check

Step 6.2: Configure the Host, Services, and Command on Nagios XI

Create /usr/local/nagios/etc/static/new-windows-test-command.cfg to define the check_nt_test command (replace REPLACE_WITH_NSCLIENT_PASSWORD with your NSClient++ password, or reference a macro defined in /usr/local/nagios/etc/resource.cfg):

define command {
    command_name    check_nt_test
    command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s REPLACE_WITH_NSCLIENT_PASSWORD -v $ARG1$ $ARG2$
}

Next, create /usr/local/nagios/etc/static/new-windows-test.cfg with the host and service definitions (ensure host_name matches across the host and service blocks):

define host {
    use                     windows-server
    host_name               winservertest
    alias                   My Windows Server
    address                 172.2.2.35
    max_check_attempts      10
    check_interval          5
    retry_interval          1
    check_period            24x7
    contacts                nagiosadmin
    notification_interval   30
    notification_period     24x7
    notification_options    d,r
    register                1
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     NSClient++ Version
    check_command           check_nt_test!CLIENTVERSION
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     Uptime
    check_command           check_nt_test!UPTIME
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     CPU Load
    check_command           check_nt_test!CPULOAD!-l 5,80,90
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     Memory Usage
    check_command           check_nt_test!MEMUSE!-w 80 -c 90
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     C:\ Drive Space
    check_command           check_nt_test!USEDDISKSPACE!-l c -w 80 -c 90
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     W3SVC
    check_command           check_nt_test!SERVICESTATE!-d SHOWALL -l W3SVC
}

define service {
    use                     generic-service
    host_name               winservertest
    service_description     Explorer
    check_command           check_nt_test!PROCSTATE!-d SHOWALL -l Explorer.exe
}

Validate the configuration and restart Nagios:

sudo service nagios checkconfig
sudo service nagios restart

Step 6.3: Verify in the Nagios XI Dashboard

Confirm that winservertest appears on the dashboard and begins reporting status and performance graphs:

service check

service check

service check

References