Windows process memory check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.omalley
Posts: 12
Joined: Mon Jan 29, 2018 10:29 am

Windows process memory check

Post by paul.omalley »

Hello!
I have some users that want to check Windows process memory usage.
For example, they have a process named "nautilus.exe". They want to alert if memory usage falls below 10MB.

Can check_ncpa "processes" module do this? Or does it require a custom plugin for NCPA?

Thanks,
Paul
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Windows process memory check

Post by mbellerue »

Right now NCPA only checks for processes that are using too much memory. It's not very often we get people worried about a process using too little memory. :)

But that's not to say that we can't do this. It will just require a couple of twists and turns.

First, let's have NCPA identify the process.

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H remoteserverIP -t 'ASecretToken' -M 'processes' -c 0 -u M -q 'name=nautilus.exe,mem_rss=10'
That will find any instances of nautilus.exe running that is using 10MB or more of memory. If it finds even 1 instance, it will throw a critical. This may look like the exact opposite of what you want to do, and it is. So let's turn it around using the negate plugin.

negate is a wonderful plugin that can change up the status of checks, so we can make CRITICALs OKs, and OKs CRITICALs.

Code: Select all

/usr/local/nagios/libexec/negate --ok=CRITICAL --critical=OK --substitute /usr/local/nagios/libexec/check_ncpa.py -H remoteserverIP -t 'ASecretToken' -M 'processes' -c 0 -u M -q 'name=nautilus.exe,mem_rss=10'
Give that a shot, and let me know if that works out for you. You should then be able to build a command in XI out of that.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked