Installing Nagios Cross-Platform Agent on Fedora 39 Workstation

Nagios is a popular open-source monitoring system that helps in tracking the status of various network services, servers, and other systems in an IT infrastructure. To extend Nagios’ functionality to non-Linux systems or to gain deeper insights into systems beyond basic SNMP or HTTP checks, you can use the Nagios Cross-Platform Agent (NRDP).
In this article, we will walk through the process of installing and configuring the Nagios Cross-Platform Agent (NRDP) on a Fedora 39 workstation. This allows your system to communicate with the Nagios monitoring server, reporting on its health, system performance, and other monitored services.
Prerequisites
Before we start, ensure that you have:
- A Fedora 39 workstation up and running.
- Root or sudo privileges on the machine.
- Internet access to download necessary packages.
- A basic understanding of Linux commands and networking.
Steps to Install Nagios Cross-Platform Agent on Fedora 39 Workstation
Step 1: Install Required Dependencies
First, ensure that your system is up-to-date and has all the required dependencies to install Nagios NCPA.
Update the System
Open a terminal and run the following command to update the system:
sudo dnf update -y
Install Required Dependencies
Next, install the necessary packages for compiling and running Nagios NCPA:
sudo dnf install -y gcc make git zlib-devel openssl-devel python3 python3-pip
Step 2: Download Nagios NCPA
Nagios provides a precompiled version of NCPA for various Linux distributions, including Fedora. To download the latest stable release of NCPA, follow these steps:
Navigate to the NCPA Downloads Page
Visit the NCPA Downloads Page to find the link to the latest version. Alternatively, you can use the wget
command to fetch the .rpm
package directly.
wget https://github.com/NagiosEnterprises/ncpa/releases/download/v2.3.0/ncpa-2.3.0-1.x86_64.rpm
(Ensure you replace the URL with the latest version number available on the website.)
Step 3: Install Nagios NCPA
Once the .rpm
package is downloaded, you can install it using the dnf
package manager.
Install the NCPA Package
Run the following command to install NCPA:
sudo dnf install ./ncpa-2.3.0-1.x86_64.rpm
This will install the NCPA agent on your Fedora 39 workstation.
Step 4: Configure Nagios NCPA
After the installation is complete, you’ll need to configure NCPA to allow Nagios Core or any monitoring system to communicate with the agent. NCPA is controlled via a configuration file that allows you to define settings such as the API token, listening ports, and more.
Edit the NCPA Configuration File
The NCPA configuration file is located at /usr/local/ncpa/etc/ncpa.cfg
. Open the configuration file in a text editor like nano
or vi
:
sudo nano /usr/local/ncpa/etc/ncpa.cfg
Inside the configuration file, you can customize the following:
- API Token: NCPA uses an API token for authentication. By default, it will be set to a random value during installation. You can change it to something more secure and memorable. Find the line that starts with
api_token
and change its value:
api_token = your_secure_token_here
- Listen Address and Port: By default, NCPA listens on
127.0.0.1:5693
. You may want to configure it to listen on all network interfaces or a specific address. To allow access from any machine, change thebind_address
value to0.0.0.0
:
bind_address = 0.0.0.0
- Additional Configuration: You can configure other options like logging, plugins, and security settings as needed.
Once you’re done editing, save and close the file. Press “CTRL and X ” then press Y to confirm your changes and hit Enter to save everything.
Enable and Start the NCPA Service
Now, you’ll need to enable and start the NCPA service to run it in the background:
sudo systemctl enable ncpa
sudo systemctl start ncpa
Check the status of the service to ensure that it’s running correctly:
sudo systemctl status ncpa
You should see output indicating that the NCPA service is active and running. If your screen looks similar to the one below then you can skip Step 5. If not continue to Step 5.

Step 5: Configure Firewall (if applicable)
If your Fedora 39 workstation has a firewall enabled, you may need to allow traffic on the port that NCPA is using (default is 5693
).
To allow NCPA traffic through the firewall, run:
sudo firewall-cmd --add-port=5693/tcp --permanent
sudo firewall-cmd --reload
This will open port 5693
for TCP traffic.
Step 6: Verify NCPA Installation
At this point, NCPA should be installed and running on your Fedora 39 workstation. To verify the installation, you can try to access the NCPA web interface.
Open a web browser and navigate to:
http://<your_fedora_ip>:5693
You should see the NCPA web interface login page. Use the api_token
you set in the configuration file to log in. You can also use the NCPA command-line interface (CLI) to query the agent’s status or get system metrics. To test the API locally, you can use the following curl command:
curl -k -u api_token:your_secure_token_here http://127.0.0.1:5693/api/v1/status
This should return a JSON object with the current status of NCPA.
Step 7: Configure NCPA on Nagios XI
1. Log into Nagios XI and hover your mouse over the gear icon & select Configuration Wizards. Or click the gear icon & then click Configuration Wizards. If you’re using light or dark mode the buttons might be in different locations.
2. In the search bar above like in the picture below look for NCPA and select it

3. Enter the IP address, API token and system you are using (select Generic option)
4. Fill in the rest of the information to your liking and click Finish or Finish w/Defaults

5. After you are finished click the home icon on the far left and select the green host bar in the middle of the screen like in the picture below.

6. Select the name of the NCPA agent you just created & you will see Host Status Details

Refer to the Nagios documentation for instructions on how to add NCPA checks in Nagios Core.
Conclusion
You have successfully installed and configured Nagios NCPA on your Fedora 39 workstation. Now you can monitor your system’s metrics like CPU usage, memory, disk space, and more, either locally or remotely using Nagios Core or any other compatible monitoring tool.
NCPA simplifies the monitoring process and integrates well with both open-source and enterprise Nagios systems. You can further customize and fine-tune the NCPA configuration according to your specific needs.
For additional customization and advanced features, refer to the official NCPA documentation.
Additional Resources
Visit Our Website: https://www.nagios.com
Visit Nagios Support: https://support.nagios.com/
Visit Nagios Exchange: https://exchange.nagios.org/