Page 1 of 1

Running a plugin using NCPA on windows

Posted: Fri Mar 05, 2021 12:57 pm
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')

Re: Running a plugin using NCPA on windows

Posted: Mon Mar 08, 2021 2:58 pm
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

Re: Running a plugin using NCPA on windows

Posted: Thu Mar 11, 2021 12:04 pm
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?

Re: Running a plugin using NCPA on windows

Posted: Thu Mar 11, 2021 5:49 pm
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