Step-by-Step Guide: Monitoring Oracle Linux 8 with NCPA in Nagios XI
Maintaining the health and performance of Linux servers is crucial for ensuring seamless IT operations. The Nagios Cross-Platform Agent (NCPA) offers a streamlined monitoring solution for Oracle Linux 8, delivering real-time insights into critical system metrics such as CPU usage, memory consumption, and disk activity. By leveraging NCPA, administrators can proactively detect and resolve potential issues before they impact performance.
In this guide, we’ll walk you through the step-by-step process of installing and configuring NCPA on Oracle Linux 8, enabling seamless integration with Nagios XI for proactive monitoring and management.
Prerequisites
Before starting, ensure you have:
- A system running Oracle Linux 8 with root or sudo privileges.
- Nagios XI installed and accessible, with the NCPA Wizard enabled.
- A stable internet connection for downloading necessary packages.
Step 1: Install NCPA on Oracle Linux
There are two methods to install NCPA on Oracle Linux 8: using the Nagios repository or manually installing the RPM package.
Method 1: Using the Nagios Repository (Recommended)
To install NCPA using the Nagios repository, follow these steps:
1. Install the repository:
sudo rpm -Uvh https://repo.nagios.com/nagios/8/nagios-repo-8-2.el8.noarch.rpm2. Enable required repositories:
sudo yum install epel-release -y sudo yum config-manager --set-enabled ol8_codeready_builder3. Update your package list:
sudo yum update -y4. Install NCPA:
sudo yum install ncpa -y5. Verify the installation:
rpm -q ncpaMethod 2: Manual RPM Installation
If you prefer to install NCPA manually, follow these steps:
1. Download the latest NCPA RPM package:
cd /tmp wget https://assets.nagios.com/downloads/ncpa3/ncpa-latest.rpm2. Install the package using RPM:
sudo rpm -ivh /tmp/ncpa-latest.rpmStep 2: Configure NCPA
After installation, configure NCPA by setting the API token:
1. Edit the NCPA configuration file:
sudo nano /usr/local/ncpa/etc/ncpa.cfg2. Set the API token: Locate the line:
community_string = mytokenReplace mytoken with a secure token of your choice, for example:
community_string = Str0ngT0k3n3. Save and close the file.
Step 3: Enable and Start the NCPA Service
Ensure that NCPA starts on boot and is running:
1. Enable NCPA to start on boot:
sudo systemctl enable ncpa2. Start the NCPA service:
sudo systemctl start ncpa3. Verify the service status:
sudo systemctl status ncpaStep 4: Configure Firewall Rules
If a firewall is enabled, allow traffic on the NCPA port (default is 5693):
1. Open port 5693:
sudo firewall-cmd --zone=public --add-port=5693/tcp --permanent2. Reload the firewall to apply changes:
sudo firewall-cmd --reload3. Confirm the port is open:
sudo firewall-cmd --list-ports Ensure that 5693/tcp is listed.
Step 5: Test NCPA Installation
Verify that NCPA is functioning correctly:
1. Access the NCPA web interface: Open a web browser and navigate to:
https://<Oracle_Linux_8_IP>:5693/2. Handle security warning: Since NCPA uses a self-signed certificate, your browser may display a security warning. Proceed by clicking Advanced and then Accept the Risk and Continue.
3. Log in to NCPA: Enter the API token you configured earlier and click Log In. You should see the NCPA dashboard displaying system information.
Step 6: Add Oracle Linux 8 Host to Nagios XI Using NCPA Wizard
1. Log in to Nagios XI.
2. Navigate to the NCPA wizard: Go to Configure > Run a configuring wizard, search for NCPA, and select it.

3. Enter host details: Provide the IP address of the Oracle Linux 8 server and the API token.

4. Select services to monitor: Choose the metrics you wish to monitor, such as CPU usage, memory usage, disk usage, and network interfaces.
5. Finalize the configuration: Complete the wizard and apply the configuration. Nagios XI will start monitoring the Oracle Linux 8 host using NCPA.
Common Issues & Troubleshooting
NCPA Service Not Running
- Check service status:
sudo systemctl status ncpa- Restart the service if it’s not running:
sudo systemctl start ncpaFirewall Blocking NCPA Port
- Verify firewall settings:
sudo firewall-cmd --list-ports- Ensure port 5693 is open. If not, add it and reload the firewall:
sudo firewall-cmd --zone=public --add-port=5693/tcp --permanent
sudo firewall-cmd --reloadUnable to Access NCPA Web Interface
- Check if NCPA is listening on the correct port:
sudo netstat -tuln | grep 5693- Ensure there are no network issues preventing access.
Conclusion
By following this guide, you have successfully installed and configured NCPA on Oracle Linux 8 for monitoring with Nagios XI. This setup enables comprehensive monitoring of system performance metrics, aiding in proactive system management.
For further assistance, refer to the Nagios Support Forum or the Nagios Knowledgebase.



