Comprehensive Guide: Monitoring AlmaLinux 9 with NCPA in Nagios XI


The Nagios Cross-Platform Agent (NCPA) is a lightweight, flexible agent that enables centralized monitoring of AlmaLinux 9 from Nagios XI. Whether you’re monitoring CPU, memory, disk, or services, NCPA supports both active checks (pulled by Nagios) and passive checks (pushed via NRDP).
This guide outlines how to install, configure, and connect AlmaLinux 9 with Nagios XI using NCPA 3.x as of March 2025.
Prerequisites
- A Nagios XI instance (latest version)
- AlmaLinux 9 system (fully updated with
sudo dnf update
) - Root/sudo access
- Port 5693 open between AlmaLinux and Nagios XI
- firewalld installed and running
Step 1: Install NCPA on AlmaLinux 9
Option 1: Install via Nagios Repository (Recommended)
- Visit https://repo.nagios.com for the latest instructions tailored to RHEL-based systems.
sudo rpm -Uvh https://repo.nagios.com/nagios/9/nagios-repo-9-1.el9.noarch.rpm
sudo dnf install ncpa -y
Option 2: Manual RPM Installation
cd /tmp
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest-1.x86_64.rpm
sudo rpm -ivh ncpa-latest-1.x86_64.rpm
Ensure dependencies like
python3
are installed if needed.
Step 2: Configure NCPA Token
sudo nano /usr/local/ncpa/etc/ncpa.cfg
Edit:
community_string = Str0ngT0k3n2025
Save and exit.
Step 3: Start and Enable NCPA
sudo systemctl restart ncpa
sudo systemctl enable ncpa
sudo systemctl status ncpa
Ensure status is active (running)
.
Step 4: Open Firewall Port 5693
sudo firewall-cmd --zone=public --add-port=5693/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports
Confirm 5693/tcp
is listed.
Step 5: Verify NCPA Installation
Access the web interface:
https://<AlmaLinux-IP>:5693
Accept the certificate warning and log in using your token Str0ngT0k3n2025
. The dashboard should show system stats.
Step 6: Add Host to Nagios XI
1. Log in to Nagios XI.
2. Go to Configure > Configuration Wizards > NCPA.

3. Enter:
- IP: AlmaLinux IP
- Port: 5693
- Token:
Str0ngT0k3n2025

4. Choose desired checks (CPU, memory, disk, processes).
5. Finish wizard and apply configuration.
Step 7: Optional – Setup Passive Checks (NRDP)
- In Nagios XI, go to Admin > Inbound Transfers > NRDP to get the URL and token.
- Edit
ncpa.cfg
:
[passive checks]
%HOSTNAME%|CPU Usage = cpu/percent --warning 60 --critical 80
- Restart NCPA:
sudo systemctl restart ncpa
Step 8: Troubleshooting Tips
- Check service status:
sudo systemctl status ncpa
journalctl -u ncpa
- Test connectivity:
nc -zv <AlmaLinux-IP> 5693
- View logs:
cat /usr/local/ncpa/var/log/ncpa.log
- Ensure token/IP match in Nagios XI wizard
Conclusion
With NCPA installed and configured on AlmaLinux 9, you’re now monitoring key system metrics in real time from Nagios XI. For advanced setups, explore encrypted transport or plugin-based checks via the NCPA API.
For help, visit: