How to Setup NCPA on Elementary OS for Nagios XI


Nagios NCPA (Nagios Cross-Platform Agent) is a robust monitoring tool for elementary OS when integrated with Nagios XI. It efficiently tracks system metrics such as CPU usage, memory, disk space, and network performance, providing real-time data to ensure optimal system reliability and efficiency. This guide will walk you through the steps to set up NCPA on elementary OS for use with Nagios XI.
Prerequisites
The things you’ll need before starting your setup:
- A device running elementary OS.
- Require admin privileges to change important things.
- Have a Nagios XI instance installed on your system.
- Internet capable to download software packages.
Step 1: Download the NCPA Package
Using a terminal, open the following command and run it to install the package. NCPA Downloads page and download the appropriate DEB package for your system.

Step 2: Install the NCPA Package
Using a terminal, open the following command and run it to install the package.
sudo dpkg -i ncpa_latest-1.deb
Step 3: Configure NCPA
Edit the NCPA configuration file using a text editor that is located in /usr/local/ncpa/etc/ncpa.cfg.
sudo nano /usr/local/ncpa/etc/ncpa.cfg
Change the value of the mytoken in the community string, which will be used for authentication with Nagios XI, and then save the file.
community_string = mytoken

Step 4: Start and Enable NCPA Service
You can start and enable the NCPA service by using the following command.
sudo systemctl start ncpa
sudo systemctl enable ncpa
Step 5: Firewall Configuration
It is recommended to use UFW to allow NCPA traffic if your firewall is running.
sudo ufw allow 5693/tcp
sudo ufw reload
Step 6: Accessing the NCPA Webpage
You can test if NCPA is working by going to the webpage and entering the URL from the address bar. Switch NCPA_IP_Address to your IP address of your elementary OS system or use 0.0.0.0. The port number is defaulting to 5693.
https://<NCPA_IP_Address>:5693/
After you enter your URL, a security warning will pop up about the site being not secure. You can get around this by clicking Technical Information and pressing Accept Risk and Proceed to the website.

You will then see the NCPA login page, where you enter the token you set in the NCPA configuration file.

Once you’re in, you can explore the many features of the NCPA web interface.

Step 7: Add NCPA to Nagios XI
Open up your Nagios XI server and log in to the Nagios XI web interface.

In Nagios XI, go to Configure > Configuration Wizards and then find Linux Server in the wizard list.

Enter the host details by providing the IP address of your device. Next, specify the port number if it differs from the default of 5693. Finally, input the authentication token you configured in your NCPA file.

Complete the wizard by configuring the remaining settings listed, and then finalize the configuration once you are done.

Step 8: Verify the Setup
Once you finish the configuration, check to see if the NCPA agent is communicating with Nagios XI by checking the status of the host and services for your elementary OS system.

Conclusion
This guide concludes the steps to set up NCPA on elementary OS for use with Nagios XI. You have successfully integrated a powerful monitoring tool that provides real-time insights into system metrics, ensuring optimal performance and reliability. If you have additional questions or other support-related questions, please visit us at our Nagios Support Forum, Nagios Knowledge Base, or Nagios Library.
Share:
On this page
Tags
Related Articles
- How to Install Nagios Cross-Platform Agent (NCPA) on macOS Monterey
- Monitoring Void Linux with NCPA in Nagios XI: A Step-by-Step Guide
- Sending Logs from RHEL 9 to Nagios Log Server R2
- Comprehensive Guide to Monitoring NixOS with NCPA in Nagios XI
- Efficient Server Monitoring with NCPA and Nagios XI on RHEL 9