Share this post

Table of Contents

How to Monitor SUSE 12 with Nagios Cross-Platform Agent (NCPA)

|

Picture of Tucker Falen
Tucker Falen

Do you want to monitor your SUSE server with ease? Nagios Cross-Platform Agent (NCPA) is a powerful and flexible monitoring agent that allows you to track system performance, services, and processes seamlessly. NCPA provides a simple yet effective way to integrate with Nagios Core or Nagios XI for real-time monitoring.

Important Note: If you’re using SUSE/SLES 12, you must install NCPA 2, as NCPA 3 only supports SUSE/SLES 15 and later. NCPA 3 introduces a new architecture with improved API performance, Python 3 support, and better security, but it is not backward-compatible with SLES 12. For this reason, NCPA 2 remains the best choice for monitoring on SUSE 12.

In this guide, we’ll walk you through the installation and configuration of NCPA 2 on SUSE/SLES 12, ensuring your server is set up for efficient monitoring. By the end, you’ll have a fully operational agent ready to send performance data to your Nagios monitoring system.

Prerequisites

Before beginning your installation of NCPA make sure you have met the following requirements

  • An internet connection
  • A system running SUSE 12
  • Root/sudo privileges

Step 1: Download and Install NCPA

Use the rpm command to install the latest NCPA package from Nagios:

sudo rpm -Uvh https://assets.nagios.com/downloads/ncpa/ncpa-latest.sle12.x86_64.rpm

This will download and install NCPA on your SUSE/SLES 12 system.

Step 2: Configure NCPA

Open the NCPA configuration file in a text editor (such as vi) with this command:

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

Find the community_string = mytoken line and change it to a stronger token for security. Press i to switch to insert mode and once you have made your changes press esc to get out of insert mode and then type :wq to save your changes and exit the editor.

Screenshot 2025 02 11 105914
ncpa.cfg file to edit

Apply the changes by restarting the NCPA listener service:

sudo systemctl restart ncpa_listener.service

Step 3: Verify Installation

To confirm that NCPA is running, open a web browser and visit: https://<system IP>:5693

You should see the NCPA web interface, where you can log in using the token configured in ncpa.cfg

Screenshot 2025 02 11 114151
NCPA GUI Example

Troubleshooting Tips:

If you are unable to access the site you may need to allow port 5693 through your firewall by running this command on your SUSE machine: sudo /usr/sbin/SuSEfirewall2 open EXT TCP 5693 and then sudo systemctl restart SuSEfirewall2.service to apply the rule.

Step 4: Monitoring with Nagios

Now that you have NCPA installed and configured on your SUSE/SLES 12 system, it’s time to integrate it with Nagios for real-time monitoring. Nagios Core or Nagios XI can use NCPA to check system metrics such as CPU usage, memory utilization, disk space, and running processes.

From your Nagios GUIs home page click on Run a Wizard.

Screenshot 2025 02 11 102801

Next, pick the NCPA wizard.

Screenshot 2025 02 11 102857

Enter your SUSE machines IP address in the address bar and leave the port as 5693. The token will be whatever you changed it to in the ncpa.cfg file. For System select SLES, Hit Next

Screenshot 2025 02 11 103046

Now you can change any monitoring settings depending on your needs, or click finish with default settings.

Screenshot 2025 02 11 135250

Congratulations! You have successfully integrated SUSE/SLES 12 with Nagios using NCPA. Your Nagios server is now continuously monitoring system performance and will notify you of any issues.