Easily Install NCPA on CentOS 8 and Monitor with Nagios XI
Nagios Cross-Platform Agent (NCPA) is a robust monitoring agent that allows you to monitor system metrics, services, and processes across different operating systems. This guide will walk you through the steps to install NCPA on CentOS 8.
Prerequisites
- A CentOS 8 system with root or sudo privileges
- Access to the internet
- A running Nagios server
Step 1: Update System Packages
Before installing any software, it’s best to update your system:
sudo dnf update -yStep 2: Download NCPA Package
The official NCPA package for CentOS 8 is available on the Nagios website. You can download it using wget:
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest.el8.x86_64.rpmStep 3: Install NCPA
Use the dnf package manager to install the downloaded RPM package:
sudo dnf install -y ncpa-latest.el8.x86_64.rpmThis command installs NCPA along with its dependencies.
Step 4: Configure NCPA
The main configuration file for NCPA is located at:
/etc/ncpa/ncpa.cfgOpen the file with a text editor, such as nano:
sudo nano /etc/ncpa/ncpa.cfgSet the api_token value to a secure string, as it is required for communication between NCPA and the Nagios server:
api_token = YOUR_SECURE_API_TOKENSave the file and exit.
Step 5: Start and Enable NCPA Service
Once configured, start the NCPA services and enable them to run at boot:
sudo systemctl enable --now ncpa_listener
sudo systemctl enable --now ncpa_passiveStep 6: Configure Firewall Rules (If Applicable)
If you have firewalld enabled, allow NCPA through the firewall:
sudo firewall-cmd --permanent --add-port=5693/tcp
sudo firewall-cmd --reloadStep 7: Verify NCPA Installation
To check if NCPA is running, use the following command:
sudo systemctl status ncpa_listener ncpa_passiveAdditionally, you can test API access via curl:
curl https://localhost:5693/api --insecureIf everything is set up correctly, you should receive a JSON response.
Monitoring with Nagios
On your Nagios web GUI, click Run a wizard and find the NCPA wizard.

Type in the Address of your machine running NCPA. You can leave the Port as default. Enter the Token that you created earlier and click Next, and Finish with Defaults.

Conclusion
You have successfully installed and configured NCPA on CentOS 8. This agent allows you to monitor system performance and services using Nagios. Want Nagios notifications in Slack or Discord? Click to find out how.



