How to Setup Linux Mint for NCPA

Monitoring a Linux Mint system with Nagios Cross-Platform Agent (NCPA) using Nagios XI can be used for maintaining performance and reliability. It allows tracking of key metrics like CPU, memory, disk usage, and network traffic, enabling proactive issue resolution and efficient resource management. In this guide, we’ll walk you through the process of setting up NCPA on Linux Mint with Nagios XI to monitor your system.
Prerequisites
Before you begin, make sure you have the following:
- Linux Mint System
- Administrative Privileges
- Nagios XI Instance
- Internet connection to download packages
Step 1: Download the NCPA Package
First, you can download the NCPA package for Debian-based systems, which Linux Mint is based on, through the NCPA download website.
Alternately, you can also download through the command on the terminal.
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest.deb
Open the terminal to add the Nagios repository.
echo "deb https://repo.nagios.com/deb/$(lsb_release -cs) /" | sudo tee /etc/apt/sources.list.d/nagios.list
Add the GPG key.
wget -qO - https://repo.nagios.com/GPG-KEY-NAGIOS-V3 | apt-key add -
Step 2: Install the NCPA Package
Update your repositories.
sudo apt-get update
Install the package using dpkg.
sudo dpkg -i ncpa-latest.deb
If there are any dependency issues, resolve them with this command.
sudo apt-get install -f
If you download the NCPA package from the website, you can install the package from your downloads from your file system.
Step 3: Configure NCPA
After installation, you need to configure NCPA through your terminal.
Open the configuration file in any text editor.
sudo nano /usr/local/ncpa/etc/ncpa.cfg
Find the community string that is around the [api] area and change mytoken to your desire secure token for authentication.
community_string = mytoken
Save it and restart the NCPA service to apply the changes.
sudo systemctl restart ncpa
Step 4: Firewall Configuration
If you have a firewall enabled, make sure to allow traffic on the NCPA port (5693 by default).
sudo ufw allow 5693/tcp
Step 5: Accessing the NCPA Webpage
You can access the NCPA web interface to ensure everything is set up correctly.
Open a web browser and enter the following URL in the address bar, replacing your_machine_ip with 0.0.0.0 or with the IP address of your Linux Mint machine.
http://your_machine_ip:5693
The default port for NCPA is 5693. If you changed this port in the configuration file /usr/local/ncpa/etc/ncpa.cfg, use the updated port number.
Once you put your URL for the webpage, you will encounter a security message of an unknown site.

Bypass this by clicking on Advanced and continuing to your webpage.
After that, you will see the NCPA login page. Use the token you set in the NCPA configuration file to log in.

Now that you’re logged in to the NCPA webpage, you successfully got your NCPA working on Linux Mint.

Step 6: Connecting NCPA to Nagios XI
Open your web browser and log in to your Nagios XI page.

Navigate to the top menu and go to Configure > Configuration Wizards from the dropdown menu.

In the Configuration Wizards page, find the Linux Server wizard from the list to begin the NCPA configuration process.

In the wizard, fill in the necessary information, such as the IP address or hostname of your Linux Mint machine. Enter the token you set in the ncpa.cfg file. Specify the port number if you changed it from the default (5693).

Select the services you want to monitor on your Linux Mint machine. Review the configuration settings you have made and click Finish to complete the wizard. After finishing the wizard, apply the configuration to save and apply the changes. Go to the Home dashboard to check the status of the newly added host and services to ensure they are being monitored correctly.

Conclusion
Once you analyze this guide, you will have successfully completed the setup of NCPA for Linux Mint with Nagios XI. This will enable you to monitor your system’s performance and reliability effectively, ensuring proactive issue resolution and efficient resource management. If you have additional questions or other support-related questions, please visit us at our Nagios Support Forum, Nagios Knowledge Base, or Nagios Library.