Page 1 of 1

CPU and memory monitoring of process

Posted: Fri Feb 19, 2021 10:41 am
by deek
Hi ,

What check can be used to monitor the CPU and Memory of a process on a windows server .
I would appreciate if we could use check_nrpe .

Re: CPU and memory monitoring of process

Posted: Fri Feb 19, 2021 4:25 pm
by benjaminsmith
Hi,

The Check Library on our knowledgebase is a good resource for example commands with NSClient and check_nrpe.

Memory Checks

Code: Select all

./check_nrpe -H 10.25.14.10 -c check_memory -a 'warn=free<20%' 'crit=free<10%'
Load Checks

Code: Select all

./check_nrpe -H 10.25.14.10 -c check_cpu -a 'warn=load>80' 'crit=load>90' show-all
Try running those directly from the command line to test them out, and then add them to your configurations in Nagios XI using the Core Config Manger or let me know if you need any assistance.

Reference
Nagios XI - How To Test Check Commands From The Command-line

Re: CPU and memory monitoring of process

Posted: Tue Feb 23, 2021 4:58 am
by deek
Hi ,

I wanted to check the cpu and memory consumed by a process/windows service in a windows server .

Re: CPU and memory monitoring of process

Posted: Wed Feb 24, 2021 9:54 am
by benjaminsmith
Hi Deek,

Looking over the documentation for NSClient, I do not see a filter parameter for that metric.

NCPA does have a filter parameter for the memory used by the process, so for example it's possible to create a check on number of the process by an application going over a specific CPU value. For example:

Code: Select all

./check_ncpa.py -H 192.168.x.x  -t '<your token>' -M 'processes' -w 5 -c 10 -q 'name=chrome.exe,mem_percent=50''
--Benjamin