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
Windows process memory check
Re: Windows process memory check
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.
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.
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.
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'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'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!
Be sure to check out our Knowledgebase for helpful articles and solutions!