How to Install Nagios Cross-Platform Agent (NCPA) on Ubuntu 14.04 LTS

The Nagios Cross-Platform Agent (NCPA) is a versatile, open-source tool that simplifies system monitoring across multiple platforms, including Ubuntu 14.04 LTS. This guide details the installation and configuration of NCPA on Ubuntu 14.04 LTS, with optional integration into Nagios XI for centralized oversight of system metrics like CPU, memory, and disk usage.
Prerequisites
Before beginning the installation, ensure the following requirements are met:
- An Ubuntu 14.04 LTS system (64-bit recommended).
- sudo or root privileges.
- A stable internet connection for package downloads.
Verify your Ubuntu version by running the command:
lsb_release -a
Example Output:
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
Step 1: Download the NCPA Package
To download the latest NCPA package for your Ubuntu system, open a terminal and run:
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest-trusty.amd64.deb
Step 2: Install the NCPA Package
Once the package is downloaded, install it using the following command:
sudo dpkg -i ncpa-latest-trusty.amd64.deb
If you encounter dependency errors, resolve them by running:
sudo apt-get install -f
Step 3: Configure NCPA
After installation, configure NCPA by editing the configuration file to set your API token:
sudo nano /usr/local/ncpa/etc/ncpa.cfg
Locate the line:
community_string = mytoken
Replace mytoken
with a secure API token of your choice. Save the file (CTRL + X, then Y and Enter).
Step 4: Restart NCPA Service
To apply the changes, restart the NCPA service:
sudo service ncpa restart
Step 5: Configure Firewall (if enabled)
If you have a firewall enabled on your system, you will need to allow traffic on port 5693, which is used by NCPA.
For Ubuntu 14.04, configure UFW (Uncomplicated Firewall) as follows:
sudo ufw allow 5693/tcp
sudo ufw reload
Troubleshooting: Firewall Not Enabled
If the firewall is inactive, enable it:
sudo ufw enable
sudo ufw reload
Step 6: Test NCPA Installation
Open a web browser and navigate to:
https://<NCPA_IP_Address>:5693/
Bypass the security warning due to self-signed certificates by clicking Advanced and selecting Proceed.
On the NCPA login page, enter the API token you configured earlier and click Log In. Upon successful login, you will be directed to the NCPA Dashboard.
Step 7: Configure Nagios XI (Optional)
To monitor the Ubuntu server using Nagios XI and the NCPA agent:
1. Navigate to the Nagios XI dashboard.
2. Open the NCPA wizard by selecting Configure > Configuration Wizards > NCPA.

3. Enter the required details, including the IP address of the server and the API token you configured during NCPA setup.

4. Complete the wizard setup and apply configuration changes.
Verifying Monitoring Setup
After completing the wizard, Nagios XI should display the monitored host and its services. Navigate to the Service Status page to confirm that the system is being monitored.
For more detailed instructions, refer to the Nagios XI Documentation.
Troubleshooting Common Issues
- Installation Fails with Dependencies
- Symptom: dpkg -i errors out.
- Fix: Run sudo apt-get install -f or manually install missing packages (e.g., sudo apt-get install python).
- Service Won’t Start
- Symptom: systemctl status ncpa_listener shows failed.
- Fix: Check logs (sudo journalctl -u ncpa_listener or /var/log/syslog), verify ncpa.cfg syntax.
- Web Interface Unreachable
- Symptom: Browser times out at https://<IP>:5693/.
- Fix: Ensure the service is running (sudo systemctl status ncpa_listener), port 5693 is open (sudo ufw status), and the IP is correct.”
Conclusion
You’ve installed and configured NCPA on Ubuntu 14.04 LTS, enabling system monitoring with optional Nagios XI integration. Due to Ubuntu 14.04’s EOL status, consider migrating to a supported OS for long-term security. For help, consult the Nagios Support Forum or Nagios Knowledge Base.
Share:
On this page
Related Articles
- How to Monitor RHEL 8 Using NCPA with Nagios XI
- Installing and Configuring Nagios Log Server on SUSE Linux Enterprise Server (SLES) 11
- Easily Install NCPA on CentOS 8 and Monitor with Nagios XI
- Configuring SNMP on Ubuntu 14.04 LTS for Effective Nagios XI Monitoring
- Installing and Monitoring SUSE 11 with SNMP