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:
- Installing Nagios XI on CentOS/RHEL.
- Configuring passive monitoring with NRDP (Nagios Remote Data Processor) and NRDS (Nagios Remote Data Sender) on Linux and Windows clients.
- Isolating host visibility by team using static
contactandcontactgroupdefinitions. - 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:
Installation Complete:
Initial Web Configuration Complete:
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:
Confirm the XML response reports <status>0</status> and <message>OK</message>:
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:
Step 2.2: Configure Inbound NRDP Authentication Tokens
Navigate to Admin → Check Transfers → Inbound Transfers and configure an authentication token under the NRDP tab:
(Note: While an NSCA tab is also available for legacy passive checks, NRDP over HTTPS is strongly preferred over NSCA.)
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):
2. Assign the NRDP Token and Define Check Commands:
3. Save the NRDS Configuration:
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
nagiosuser and group. - Download check plugins from the Nagios XI NRDP endpoint.
- Register a
cronjob 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:
4. Installing the NRDS Client on Windows
-
Download the NRDS Windows client installer from NRDS Config Manager on the Nagios XI server:
-
Accept the license agreement:
-
Enter the Nagios XI NRDP URL (
http://<nagios-server>/nrdp/), NRDP token, configuration name, hostname, and check interval in minutes: -
Complete the wizard to generate
config.iniand register the Windows Scheduled Task: -
Import the newly reported host from Admin → Unconfigured Objects:
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
- 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 } - Create
/usr/local/nagios/etc/static/windows-server-contactgroup.cfg:define contactgroup { contactgroup_name windowsadmins alias Windows Nagios Admin Group members windowsnagiosadmin } - Bind the host to
contact_groups windowsadminsin/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):
-
View when logged in as
nagiosadmin(sees both Linux and Windows hosts): -
View when logged in as
windowsnagiosadmin(sees only hosts associated withwindowsadmins):
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:
During setup, specify the Nagios XI server IP in Allowed hosts, set a shared password, and enable check_nt (TCP port 12489) and NRPE:
Complete the installer and verify that the NSClient++ (nscp) Windows service is running:
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: