Page 1 of 1

Check_procs: check every process cpu consumption

Posted: Thu Jul 05, 2018 9:29 pm
by paulofrancisco
Hi,
I'm looking for ways to use check_procs or check_ncpa.py to show critical if the process reached the max threshold inculding the process/service name.



./check_ncpa.py -H ip_add-P 5693 -t 'pass' -M cpu/percent -w 80 -c 90
CRITICAL: Percent was 1.00 %, 1.00 %, 1.00 %, 0.00 %, 0.00 %, 100.00 %, 0.00 %, 0.00 % | 'percent_0'=1.00%;80;90; 'percent_1'=1.00%;80;90; 'percent_2'=1.00%;80;90; 'percent_3'=0.00%;80;90; 'percent_4'=0.00%;80;90; 'percent_5'=100.00%;80;90; 'percent_6'=0.00%;80;90; 'percent_7'=0.00%;80;90;

Re: Check_procs: check every process cpu consumption

Posted: Fri Jul 06, 2018 9:25 am
by lmiltchev
The "cpu/percent" will not show you the CPU usage per process.

What kind of systems are you monitoring - Windows, Linux, etc.? You could create your own, custom script for CPU utilization per process, and call it via check_ncpa.py. You can also find such scripts online. For example, there are some 3rd party scripts on the Nagios Exchange that you could try:

https://exchange.nagios.org/index.php?o ... %20process

Once you test the script from the command line, and make sure it works for you, you could create a command and a service in Nagios XI by following the steps, outlined in the document below:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf