Table of Contents

How to Install Nagios Cross-Platform Agent (NCPA) on SLES 15

Picture of Tucker Falen
Tucker Falen
suse

Nagios Cross-Platform Agent (NCPA) is a flexible and modern monitoring agent designed for Nagios Core and Nagios XI. It allows administrators to monitor system metrics, processes, services, and custom plugins with ease.

In this guide, we’ll walk through the steps to install and configure NCPA on SUSE Linux Enterprise Server (SLES) 15. Please note that a registered copy of SLES 15 is required to access official SUSE repositories and install dependencies.

Prerequisites

Before proceeding with the installation, ensure that you meet the following requirements:

  • A registered copy of SLES 15 (required for package installation).
  • Root or sudo privileges for installation and configuration.
  • An active Nagios Core or Nagios XI server to receive monitoring data.

Step 1: Register Your SLES 15 System

If your system is not registered, you must register it with SUSE Customer Center (SCC) to access the necessary repositories. Run the following command to register:

sudo SUSEConnect --registration-url https://scc.suse.com

Enter your SUSE Customer Center credentials when prompted.

Once registered, refresh the repositories to ensure they are up to date:

sudo zypper refresh

Step 2: Download the NCPA Package

Nagios does not provide NCPA in SUSE’s official repositories, so you need to download the NCPA package manually from the official Nagios website.

  1. Navigate to the Nagios NCPA Downloads page.
  2. Select the latest version for SUSE Linux Enterprise Server 15 (x86_64).
  3. Download the package using wget (replace the URL with the latest available version):
wget https://assets.nagios.com/downloads/ncpa/ncpa-latest-1.x86_64.rpm

Step 3: Install NCPA on SLES 15

Once the package is downloaded, install it using the rpm command:

sudo rpm -ivh ncpa-latest-1.x86_64.rpm

If you encounter missing dependencies, use zypper to install them (insserv-compat):

sudo zypper install <dependency name>

After installing dependencies, re-run the RPM installation command if necessary.

Step 4: Start and Enable the NCPA Agent

Once installed, enable and start the NCPA agent so that it runs on boot:

sudo systemctl enable ncpa

Start the services:

sudo systemctl start ncpa

Check the service status to confirm that it is running:

sudo systemctl status ncpa

Step 5: Configure NCPA

5.1 Edit the NCPA Configuration File

The NCPA configuration file is located at:

sudo nano /usr/local/ncpa/etc/ncpa.cfg

Modify the following settings as needed:

  • API Token: This is required for secure communication with Nagios. Update the community_string field to something that you can remember:
community_string = Str0ngT0k3n!
Screenshot 2025 02 11 105914 1
ncpa.conf file
  • Allowed IPs: Restrict access to trusted Nagios servers by adding their IP addresses:
allowed_hosts = <Nagios IP address>

Save the file and exit (CTRL+X, then Y, then Enter).

Restart the NCPA service to apply changes:

sudo systemctl restart ncpa

Step 6: Verify NCPA Installation

6.1 Check the NCPA Web Interface

By default, NCPA runs on port 5693. You can access the web interface by opening a web browser and navigating to:

https://<your_sles_server>:5693

Log in using the API token you configured earlier.

6.2 Test NCPA with Nagios

To check if your Nagios server can communicate with the NCPA agent, run the following command from your Nagios monitoring server:

curl -k https://<your_sles_server>:5693/api

You should see a JSON response indicating the system’s status.

Step 7: Add NCPA to Nagios

On your Nagios XI web GUI navigate to Run a Wizard

Screenshot 2025 02 11 102801 4
Nagios XI main page

Click NCPA

Screenshot 2025 02 11 102857 1
Wizards page

Now, fill out the IP address of your SLES system and enter the token you created in the conf file. Hit Next.

Screenshot 2025 02 11 103046 1
NCPA page

Now, you can pick any system metrics you want to monitor or just leave everything as default, hit Next, and then Finish with Defaults.

Screenshot 2025 02 11 135250 1
NCPA options

By following these steps, you have successfully installed Nagios Cross-Platform Agent (NCPA) on SLES 15. This allows your Nagios monitoring server to collect system metrics and monitor your SLES instance in real time.

Share this post