Page 1 of 1
Windows Process Monitor
Posted: Mon Jun 01, 2020 11:03 am
by lance.peterson
I have a server we already monitor for drive space etc. But we have a service coldfusion.exe we want to get a notification if it goes over say 65% of the CPU for more than 5 minutes. What's the best way to go about this?
Re: Windows Process Monitor
Posted: Tue Jun 02, 2020 9:35 am
by ssax
The only problem with this is the "for more than 5 minutes part", I'm unable to find a plugin that does that.
How are you currently monitoring them? (WMI, SNMP, NCPA, NSClient++)
NCPA and NSClient++ agents should support process percentage checking but not the "for more than 5 minutes part".
Here's one for NCPA as an example:
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H X.X.X.X -t '<your token>' -M 'processes' -c 1 -q 'name=coldfusion.exe,cpu_percent=95'
Re: Windows Process Monitor
Posted: Tue Jun 02, 2020 10:00 am
by lance.peterson
I use NSClient++.
I can be fine with not getting the 5-minute thing as I should be able to just not send the notification for 5 minutes if it is over 65% I would think.
So how would I set this up without it? Can I go through a configuration manager or another way?
Re: Windows Process Monitor
Posted: Tue Jun 02, 2020 4:40 pm
by ssax
This should work:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 30 -c check_process -a process=notepad.exe "crit=user > 65"
Just go into
Configure > Core Config Manager > Services and copy an existing service (or create a new one, use another service on the same host as an example of how it should be setup):
- Make sure check_command is
check_nrpe
- Set $ARG1$ to:
check_process
- Set $ARG2$ to:
-a process=explorer.exe "warn=user > 65"
- Test, Save, Apply Config
See here if you have questions:
https://assets.nagios.com/downloads/nag ... gement.pdf
Let us know the results.
Thank you!
Re: Windows Process Monitor
Posted: Fri Jun 05, 2020 12:51 pm
by lance.peterson
Here is what I got. Not sure exactly where I went wrong looks like what you suggested.
Re: Windows Process Monitor
Posted: Fri Jun 05, 2020 3:36 pm
by ssax
Please edit your nsclient.ini and make sure you have this set under your
[/settings/NRPE/server] section:
Then restart the nsclient++ service and try again.