Table of Contents

Easily Run a Plugin on Your Machine Using NCPA

Picture of Zachary Robinson
Zachary Robinson
Plugins

Introduction

Running your plugin on a remote machine can be quite tricky without the proper tools. Nagios provides a solution to this issue through the Nagios Cross-Platform Agent, or NCPA. If the machine you are looking to run the plugin on does not have NCPA installed, visit this article to learn how to download and install it.

Prerequisites

  • Ensure NCPA is installed on your host machine
  • Have a plugin ready to run

Step 1: Getting the Plugin Ready on Your Machine

To get your plugin ready to monitor with Nagios XI, you will first need to navigate to the NCPA plugins folder. The default path is as follows:

Windows
C:\Program Files\Nagios\NCPA\plugins

Linux
/usr/local/ncpa/plugins/

Add your plugin to this directory.

Your plugin should now be ready to run!

NCPA Plugins folder containing file my_plugin.py
NCPA Plugins folder on Windows 11

*Note: If you are using a shell script on Linux, you will need to make it executable using the following command:

chmod +x <pluginname>

Step 2: Add Remote Plugin NCPA Configuration Wizard to Nagios XI

In order to use the Remote Plugin NCPA Configuration Wizard, you will first need to download it here. Once it has been downloaded, navigate to the Admin page on Nagios XI. From the admin screen, click on System Extensions -> Manage Config Wizards

Screenshot 2025 01 27 111039
System Extensions ->Manage Config Wizards

From this screen, upload the wizard by clicking the ‘Browse’ button at the top of the screen, adding remote_plugin_ncpa.zip, and hitting the upload icon.

Step 3: Running the Configuration Wizard in Nagios XI

On Nagios XI, hover over the gear icon on the left bar, and click on ‘Configuration Wizards.’ Once on the Configuration Wizards page, locate Remote Plugin NCPA, and click on it.

Configuration Wizards page displaying Remote Plugin NCPA
Search for Remote Plugin NCPA

On the next page, you will be prompted to input the following information

  • The name you would like for your host
  • The plugin for your machine to run
  • The token for the NCPA host
  • Any arguments needed to run the plugin
  • The port used for NCPA.

After adding all required information, you can configure Nagios XI settings for the host, or click “Finish with defaults”

Conclusion

You are now ready to monitor using a plugin on a remote host with Nagios XI. A new host and service are now being monitored, and can be viewed from the Nagios XI home page.

Share this post