Running a plugin using NCPA on windows

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Running a plugin using NCPA on windows

Post by snapon_admin »

Just looking for some assitance on getting this plugin to run using NCPA. Here's the error I'm getting when I try:

Code: Select all

[root@keno-ngos-01-pv ~]# /usr/local/nagios/libexec/check_ncpa.py -H <HOST> -t '<TOKEN>' -P 5693 -M 'plugins/check_process.pl' -q 'args=-C CPU,RAM'
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
And with no arguments:

Code: Select all

[root@keno-ngos-01-pv ~]# /usr/local/nagios/libexec/check_ncpa.py -H <HOST> -t '<TOKEN>' -P 5693 -M 'plugins/check_process.pl'
UNKNOWN: An error occured connecting to API. (HTTP error: '500')
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Running a plugin using NCPA on windows

Post by vtrac »

Hi,
You should use option "-a", if you want to pass in argument for your "check_process.pl" plugin.
You might need a proper perl modules installed on your WIndows as well.

I believe you must have picked up "check_process.pl" from Nagios Exchange.

Here's an article for how to use plugins in NCPA:
https://support.nagios.com/kb/article/n ... a-722.html

Here are example of check_ncpa.py:

Code: Select all

cd /usr/local/nagios/libexec
./check_ncpa.py -H x.x.x.x -t "YourToken" -M "cpu/percent" -w 10 -c 20

Check virtual memory:
./check_ncpa.py -H x.x.x.x -t "YourToken" -M "memory/virtual" -w 40 -c 50

Regards,
Vinh
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Running a plugin using NCPA on windows

Post by snapon_admin »

Alright, I'm going to try having our server team look into installing the proper perl module. In the meantime, yes I did find this on the exchange, but I was wondering if there might be another plugin you'd recommend that monitors which windows processes are causing high CPU and/or RAM usage or if there's an easy way to do that built into NCPA?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Running a plugin using NCPA on windows

Post by vtrac »

Hi,
The check_ncpa.py can check if CPU or memory for the windows VM is normal or high based on the "-w" and "-c" values.

However, based on the URL below, the check_processes takes a list of allowed processes and returns warning and critical based on thresholds if processes NOT on the list are running. I'm not sure this is what you want.
https://exchange.nagios.org/directory/P ... s)/details

Please feel free to search the Nagios Exchange and see which one works for you:
https://exchange.nagios.org/


Regards,
Vinh
Locked