- Updated 2 weeks ago
When a filesystem fills, a daemon exits, or memory runs short on a Linux server, the first report should not come from a user. Nagios XI checks each Linux host against Warning and Critical thresholds you set and notifies your team the moment a check changes state. The recommended method is the Nagios Cross-Platform Agent (NCPA), which Nagios XI can install for you. SSH, SNMP, and the Nagios Remote Plugin Executor (NRPE) cover hosts where NCPA cannot run.
What Is Linux Monitoring?
Linux monitoring is the scheduled collection of health and performance data from Linux servers, including CPU usage, memory usage, disk usage, network traffic, and the state of services and processes. Each result is compared with a threshold, and a change from OK to Warning or Critical triggers a notification. Log collection and search are a related practice that runs alongside metric checks.
Why Linux Server Monitoring Matters
Monitoring your Linux servers means you can:
- Catch full filesystems early: Linux disk space monitoring raises a Warning while there is still time to clear space or extend a volume.
- Know when a daemon stops: A stopped service turns Critical in Nagios XI instead of surfacing as a support call.
- Explain slowdowns: CPU and memory history shows whether a host is undersized or a single process is consuming it.
- Plan capacity: Every check stores performance data, so growth in disk and memory use is visible over weeks and months.
- Cut notification fatigue: Retry logic confirms a problem across several checks before anyone is paged.
Linux Monitoring Capabilities in Nagios XI
NCPA is the recommended method for Linux hosts. Nagios Log Server adds log collection. SSH, SNMP, and NRPE cover hosts where NCPA cannot be installed or reached.
Linux Server Performance Monitoring with NCPA
- Linux Server Wizard: Enter the host address and NCPA token, select what to monitor, and the wizard creates the Host and its Services.
- System metrics: CPU usage, memory usage, disk usage, and network traffic, each with its own Warning and Critical thresholds.
- Host scanning: The wizard reads drives, services, and processes from the host during configuration, so you select from what is actually running.
- Encrypted, token-based access: NCPA listens on TCP 5693 over HTTPS and accepts requests only with the token you configure.
- Local web interface: NCPA’s own web interface on the host shows real-time graphs and its check API.
- Custom checks: Scripts placed in
/usr/local/ncpa/pluginsrun through NCPA and return results like any built-in check. Call a script in a subdirectory by its relative path, such asplugins/legacy/check_disk.sh. - Process check output: Suppress the list of running processes from process check results to keep output small and limit what a check returns.
- Additive configuration: Run the wizard again with the same Host Name to add Services to an existing Host. The name is case sensitive.
Documentation: How To Monitor Linux With Nagios XI And NCPA | NCPA v3 Agent Installation Instructions
Linux Service and Process Monitoring
- Service checks: Linux service and process monitoring confirms that daemons such as
crondor your web server are running. - Process checks: Alert on the number of running instances of a process, for workers that must stay above a minimum count.
- Automatic restarts: An event handler calls a restart script through NCPA when a Service turns Critical, so a crashed daemon can be running again before anyone logs in.
Documentation: How To Restart Services With NCPA In Nagios XI
Deploying NCPA Across Linux Servers
- Push from the web interface: Configure > Auto Deployment installs NCPA over SSH on a single host or a list of hosts.
- One token for the job: The NCPA Token set in Deployment Settings is applied to every host the job deploys to.
- Straight to monitoring: Select successful hosts and click Run Wizard. Address, port, system, and token are already filled in.
- Older distributions: Choose NCPA v3, or the final NCPA v2 release (2.4.1) for operating systems that v3 does not support.
- Manual installs: Add hosts where NCPA was installed by hand with Add Agent, so every agent is managed in one place.
Documentation: How To Use Auto Deployment In Nagios XI
Passive Linux Monitoring Through Firewalls
- Outbound results: NCPA runs checks on its own schedule and sends results to Nagios XI through the Nagios Remote Data Processor (NRDP), so the host needs no inbound path from your monitoring server.
- Standard ports: Results travel over TCP 80 or 443. Use HTTPS on 443 to encrypt them.
- Remote sites: Passive mode suits hosts behind firewalls, proxies, and private address space.
- Verified certificates: Set
passive_ssl_verificationin the[passive]section ofncpa.cfgto validate the Nagios XI certificate, andca_certto point at your own certificate authority. - Setup in Nagios XI: The NRDP URL and token are under Admin > Check Transfers > Inbound Transfers.
Linux Log Monitoring with Nagios Log Server
Nagios Log Server collects, indexes, and searches Linux system logs. It is a separate solution with its own license.
- Scripted setup: Add Log Source > Linux provides a command that downloads
setup-linux.shfrom your Log Server and configures rsyslog to forward to it. - Default input: The syslog input listens on port 5544, TCP or UDP.
- Manual setup: A second tab shows the rsyslog configuration for hosts where you edit files yourself.
- Verification: Run
loggeron the host and search for its address in Log Server to confirm events arrive. - Alerts in Nagios XI: The Nagios Log Server Wizard turns Lucene or JSON queries into Nagios XI Services, with Warning and Critical thresholds on the number of matches over a set duration.
- Syslog daemons: The same inputs handle rsyslog and syslog-ng monitoring for hosts that already forward logs.
Documentation: Monitoring A New Log Source With Nagios Log Server | How To Monitor Nagios Log Server Queries With Nagios XI
Linux Monitoring over SSH with check_by_ssh
- When to use it: SSH is already open to the host and installing an agent service is not an option.
- SSH Proxy Wizard: Define each command to run on the remote host and the display name its Service will use.
- Key-based authentication: The
nagiosuser on the Nagios XI server logs in with an SSH key, so no password is stored in the check. - Remote requirements: The host needs a
nagiosuser, the Nagios Plugins or your own scripts, and a running SSH daemon. - Matching address: Use the same IP address or DNS name in the wizard that you used when copying the key. A mismatch causes the checks to fail.
Documentation: How To Monitor Hosts Using SSH In Nagios XI
Agentless Linux Monitoring with SNMP
- Linux SNMP Wizard: Polls the net-snmp daemon from the distribution’s own packages, so nothing from Nagios is installed on the host.
- Discovery: The wizard queries the host for disks and processes and lists them for selection.
- Process thresholds: A Warning fires when the process count drops below the Warning value, and a Critical fires at or below the Critical value.
- SNMPv3 support: Use SNMPv3 with authentication and privacy (authPriv) where the host supports it. SNMPv2c relies on a community string alone.
Documentation: How To Monitor Linux Using SNMP In Nagios XI
Legacy Linux Monitoring with NRPE
- When to use it: Legacy operating systems, or environments that already run NRPE on many machines. Use NCPA for new hosts.
- Linux NRPE agent: A packaged build of NRPE, the Nagios Plugins, and preconfigured commands, used with the Linux Server (Legacy) Wizard.
- Scripted install: The
fullinstallscript installs prerequisites, creates users, compiles the agent and plugins, and configures the firewall. - Restricted access: The installer asks for the Nagios server addresses allowed to connect, as single addresses, a list, or a CIDR range.
Documentation: How To Install The Linux NRPE Agent In Nagios XI | How To Monitor Linux Using The Linux Server (Legacy) Wizard In Nagios XI
Linux Alerting and Thresholds
- Per-metric thresholds: Set Warning and Critical values for each metric in Step 2 of the wizard.
- Retry before notifying: By default, a failing check is rechecked every minute, five times, before a notification goes out. Set both values to 1 for hosts that need an immediate alert.
- Notification routing: Step 4 sets the first notification delay, the repeat interval, and the contacts or contact groups to notify.
- Parent Hosts: Set the switch or router in front of a server as its parent. When the parent is Down, the server shows as Unreachable instead of generating its own alerts.
- Grouping: Step 5 adds the Host and its Services to Host groups and Service groups for dashboards and reports.
Documentation: Understanding And Using Configuration Wizards In Nagios XI
Security and Access Control for Linux Monitoring
- Unique NCPA tokens: Replace the default
community_stringin/usr/local/ncpa/etc/ncpa.cfgwith a token such as<NCPA_TOKEN>. Never leave the default in place. - Token rotation without broken checks: Set
backup_community_stringin the[api]section so the previous token keeps answering while you roll the new one out across Hosts. - Encrypted transport: NCPA uses HTTPS on TCP 5693 and supports TLS 1.3. TLS 1.0 and TLS 1.1 are deprecated. Use
ssl_versionandssl_max_versionin the[listener]section to pin the versions you accept, and send passive results to NRDP over HTTPS on 443. - Idle session logout:
gui_session_timeoutin the[listener]section ends inactive NCPA web interface sessions, one hour by default. - Protected SSH keys: The
authorized_keysfile on each host must be readable and writable only by thenagiosuser. - Restricted SNMP and NRPE: Limit SNMP access and NRPE connections to the address of your Nagios XI server.
- Roles: Nagios XI 2026R2 and later assign roles to users to control what each user can do.
- Server isolation: The Nagios XI server stores the tokens and keys for every monitored host. Restrict who can reach and log in to it.
Get Started: NCPA v3 Agent Installation Instructions | How To Monitor Linux With Nagios XI And NCPA
Benefits of Nagios XI Linux Monitoring
One agent for every operating system. NCPA runs on Linux, Windows, macOS, Solaris, and AIX. Windows server monitoring uses the same agent, port, token model, and wizard workflow, so your team learns one method.
Monitoring in place on day one. Auto Deployment installs NCPA across a list of hosts and hands each one to the wizard with connection details filled in.
Problems found before users report them. Warning thresholds give you time to act on disk, memory, and service issues before they become outages.
Logs and metrics in one alert stream. With Log Server, log queries become Nagios XI Services, so log alerts follow the same notification rules, schedules, and contacts as metric checks.
Data that stays on your infrastructure. Nagios XI is self-hosted, so monitoring data and host credentials stay on servers you control.
Linux Monitoring Prerequisites
| Method | Network access | Requirements |
|---|---|---|
| NCPA, active | TCP 5693 from Nagios XI to the Linux host | NCPA installed, a unique token, and a host firewall rule for 5693 |
| NCPA, passive | TCP 80 or 443 from the Linux host to Nagios XI | NRDP URL and token from Admin > Check Transfers > Inbound Transfers |
| Auto Deployment | SSH (TCP 22) from Nagios XI to the Linux host | Password login for root or a user that can become root with sudo |
| check_by_ssh | SSH (TCP 22) from Nagios XI to the Linux host | A nagios user with the Nagios XI public key, plus the Nagios Plugins or your scripts |
| SNMP | UDP 161 from Nagios XI to the Linux host | net-snmp installed, and an SNMPv3 user or a v2c community restricted to the Nagios XI address |
| NRPE | TCP 5666 from Nagios XI to the Linux host | Linux NRPE agent installed with the Nagios XI address allowed |
| Nagios Log Server | Port 5544, TCP or UDP, from the Linux host to Log Server | rsyslog, and a Nagios Log Server license |
Where Nagios XI Fits
Nagios XI measures the state of each Linux host: resource usage, service and process status, and the result of any plugin you run on it. It compares each result with your thresholds, then handles notification, escalation, graphing, and reporting.
Log collection, search, and retention belong to Nagios Log Server. Traffic analysis from NetFlow, sFlow, and IPFIX, along with intrusion detection, belongs to Nagios Network Analyzer. Kernel profiling and per-request application tracing are a different category of tool.
Frequently Asked Questions
What is the best way to monitor Linux servers with Nagios XI?
Install NCPA on each host and configure it with the Linux Server Wizard. NCPA covers metrics, services, processes, and custom scripts, and works in active or passive mode. Use check_by_ssh, SNMP, or NRPE only where NCPA cannot be installed or reached.
What is the Nagios agent for Linux?
NCPA is the Nagios agent for Linux. It installs from the Nagios Repository or as an RPM or DEB package and listens on TCP 5693. The older Nagios XI Linux Agent is a bundle of NRPE, the Nagios Plugins, and preconfigured commands, used with the Linux Server (Legacy) Wizard.
Can Nagios XI monitor Linux without an agent?
Yes. The Linux SNMP Wizard polls net-snmp, which installs from your distribution’s packages. check_by_ssh runs plugins over SSH and needs the Nagios Plugins or your scripts on the host, but no listening agent service.
Which Linux distributions does NCPA support?
Current NCPA v3 builds cover RHEL 8 and later, CentOS Stream 9 and later, Oracle Linux 8 and later, Debian 12 and later, Ubuntu 22.04 and later, openSUSE Leap 15 and later, SLES 15 and later, and Amazon Linux 2, on x86-64. Debian 11 and Ubuntu 20.04 are covered through NCPA 3.5.0, and RHEL 7, CentOS 7, Oracle Linux 7, Debian 10, and Ubuntu 18.04 through NCPA 3.1.0. Older Linux versions use NCPA v2, which Auto Deployment can also install.
How do I change an NCPA token without breaking existing checks?
Set the new token as community_string and the old one as backup_community_string in the [api] section of ncpa.cfg, then restart NCPA. Both tokens are accepted while you update the Hosts and Services that use the old one, and you remove backup_community_string once the rollout is finished.
Should I replace NRPE with NCPA?
Use NCPA for new hosts. It adds a check API, a web interface, active and passive modes, and wizards that scan hosts for drives, services, and processes. NRPE remains an option for legacy operating systems and for environments that already run it on many machines.
How is Nagios XI licensed for Linux monitoring?
Nagios XI is licensed by the number of Nodes (Hosts) you monitor, and each Linux server is a Node. NCPA, NRPE, and the Nagios Plugins are free. Nagios Log Server is licensed separately. See Nagios pricing plans for current options.
Can Nagios XI monitor Linux log files?
Log collection, search, and retention run in Nagios Log Server. The Nagios Log Server Wizard in Nagios XI turns Log Server queries into Services, so log alerts appear alongside your Linux metric checks.
Can Nagios XI restart a failed Linux service automatically?
Yes. An event handler runs a restart script on the host through NCPA when a service check turns Critical. You choose which Services trigger it.
What changed with the check_ncpa plugin?
Since Nagios XI 2026R1.7, NCPA-based Configuration Wizards create checks with a compiled check_ncpa binary that runs faster. Existing checks keep working unchanged. A migration script for existing checks is available from Nagios Support and is not shipped with Nagios XI.
Can I monitor Linux with open-source Nagios Core?
Yes. Nagios Core works with NCPA, NRPE, and the Nagios Plugins, configured through text files. Nagios XI adds Configuration Wizards, Auto Deployment, dashboards, and reporting on the same engine. Compare them in Nagios Core vs. Nagios XI.
Related Solutions
Linux Distributions
- Red Hat Enterprise Linux (RHEL) Monitoring
- Ubuntu Monitoring
- Debian Monitoring
- CentOS Monitoring
- SuSE Monitoring
- Fedora Monitoring
Servers and Operating Systems
Services and Storage
Logs
Ready to Monitor with Nagios XI?
Get comprehensive infrastructure monitoring with our enterprise solution.
