How to Setup NCPA on Elementary OS for Nagios XI

Picture of Steven Phan
Steven Phan
elementary OS Wallpaper 1200x630

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.

NCPA Download EOS
NCPA Download Page

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
NCPA editing file EOS
NCPA File Text Editor

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.

Site Warning EOS
Unsecure Message

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

NCPA Login EOS
NCPA Login

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

NCPA Dashboard EOS
NCPA Dashboard

Step 7: Add NCPA to Nagios XI

Open up your Nagios XI server and log in to the Nagios XI web interface.

XI Login EOS
Nagios XI Login

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

XI Wizard EOS
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.

XI Linux Server Configuration Wizard EOS
Linux NCPA Configuration Wizard

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

XI NCPA Configuration 2 Wizard EOS
More NCPA Configuration

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.

XI NCPA Status EOS 2
Service Status

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: