Overview

This help documentation explains the inner workings of NCPA as well as providing a reference for configuring and setting up NCPA instances. If you've never used NCPA before, and have not yet installed it on a machine - you can take a look at the getting started guide available on the NCPA website, which will go through the initial installation admin setup, and show you how start monitoring with passive or active checks using either Nagios XI or Nagios Core.

This help documentation is geared towards those who have already installed NCPA and are looking at more advanced configuration and setup using this help as a reference. More guides and documentation can be found on the NCPA website .

NCPA 3.x Single Service

In previous versions, NCPA ran as two separate services:

  • NCPA Listener
  • NCPA Passive
The NCPA Listener service would listen for active checks coming from a Nagios Core or Nagios XI system.
The NCPA Passive service would send service check results back to a Nagios Core or Nagios XI system.

With the relase of NCPA 3.0, the passive functionality has been rolled into a single NCPA service. By default, the service will run as the nagios user and group. This can be changed by modifying the uid and gid (for user and group, respectively) settings in the ncpa.cfg file.

NCPA Service

The NCPA service does the following:

  • Serves and handles connections to the web GUI
  • Handles external API requests (including those for active checks)
  • Provides API for live graphing and top processes
  • Provides an "offline" internal API for the NCPA Passive process
  • Runs passive checks defined in the [passive checks] configuration section
  • Connects and sends passive check results to the defined NRDP URL

Restarting the NCPA Service

You will need to restart the NCPA service whenever a configuration change is made.

You can also view the services in the Windows services administration panel, but you can also do it easily from CMD.

net stop ncpa
net start ncpa

You can also affect services through Powershell. The verbs will be Start, Stop, and Restart. Start will start a service that is not running. Stop will stop a service that is not running. Restart will stop and then start a service if it is running, or just start a service if it is not running. The Powershell cmdlets can be found below.

Start-Service ncpa
Stop-Service ncpa
Restart-Service ncpa

This example should work for all supported Linux distros. If you are running v3+ on an older distro (it may run, even if not supported), you may need to use chkconfig or service commands vs. systemctl.

systemctl restart ncpa
sudo launchctl stop com.nagios.ncpa
sudo launchctl start com.nagios.ncpa

Change Log

You can view the full changelog on the NCPA GitHub repository .

Troubleshooting

Sometimes when setting up NCPA things don't work out the first time. We've compiled a few troubleshooting tips and things that could happen that might give people headaches.

Checking for problems in the logs

Typically if there is an error you will always see that error logged, no matter what your log level since error is the most filtered log level available. However, sometimes Python errors will occur before logging starts in Windows systems. You can normally find these errors in the log files located in the same directory as the .exe files in the Windows Program Files directory that you installed NCPA into.

That being said, a good habit to get into is setting your loglevel to debug when you are running into trouble where something is not working correctly. If you do this, and restart your NCPA services, we can get a better idea of what is going on and when it's going in the code. If you can't figure out the issue from reading the debug log, post it in an issue on GitHub and the developers can take a look.

Make sure your checks do not use api node

For both passive and active checks, when you are configuring them, do not use the api section when specifying the endpoint to run. Examples below:

./check_ncpa.py -H <ncpa server> -t '<your token>' -M 'disk/logical/C:|' --units G
%HOSTNAME%|<service name> = disk/logical/C:| --units G

Note that the disk/logical/C:| does not have the api portion applied. Remember that checks do not need a beginning forward slash. A good way to avoid using the wrong path is by viewing an example check for the endpoint you are making a check for from the API tab.