Alert when Windows process IS running
-
hillhealthcenter
- Posts: 174
- Joined: Fri Sep 21, 2012 7:45 am
- Location: New Haven, CT
Alert when Windows process IS running
I'm monitoring some Windows servers. I need to be alerted when a process IS running instead of when the process is not running. How do I do that?
Thanks so much,
Tom
Tom
Re: Alert when Windows process IS running
Assuming NSClient++ is already on the machine, with NRPE enabled, you can use check_process and just match the ok. For example -
The first check is when the process isn't running, and the second is after opening iexplore.exe. Is that what you were looking for?
Code: Select all
[root@localhost libexec]# ./check_nrpe -H 192.168.5.47 -c check_process -a "process=iexplore.exe" "critical=count>1" "ok=count=0" "warning=count>1"
OK: all processes are ok.|'count'=1;1;1
[root@localhost libexec]# ./check_nrpe -H 192.168.5.47 -c check_process -a "process=iexplore.exe" "critical=count>1" "ok=count=0" "warning=count>1"
CRITICAL: iexplore.exe=started|'count'=2;1;1
Former Nagios Employee
-
hillhealthcenter
- Posts: 174
- Joined: Fri Sep 21, 2012 7:45 am
- Location: New Haven, CT
Re: Alert when Windows process IS running
Yes. However, I am getting an error when I test the command from the XI command line.
[root@nagiosxi libexec]# ./check_nrpe -H 192.168.102.95 -c check_process -a "process=iexplore.exe" "critical=count>1" "ok=count=0" "warning=count>1"
Request command contained illegal metachars!
[root@nagiosxi libexec]#
[root@nagiosxi libexec]# ./check_nrpe -H 192.168.102.95 -c check_process -a "process=iexplore.exe" "critical=count>1" "ok=count=0" "warning=count>1"
Request command contained illegal metachars!
[root@nagiosxi libexec]#
Thanks so much,
Tom
Tom
Re: Alert when Windows process IS running
You will need to configure your NSClient++ to accept the metachars:
http://docs.nsclient.org/0.4.2/faq/inde ... characters
Include the following definitions in your NSClient++ configuration:
If the [/settings/NRPE/server] or [/settings/external scripts] section already exist, just add the allow nasty characters=true definition under them. These definitions might also be slightly different between NSClient++ versions. If you run into issues, please share your NSClient++ version with us.
http://docs.nsclient.org/0.4.2/faq/inde ... characters
Include the following definitions in your NSClient++ configuration:
Code: Select all
[/settings/NRPE/server]
allow nasty characters=true
[/settings/external scripts]
allow nasty characters=true
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
hillhealthcenter
- Posts: 174
- Joined: Fri Sep 21, 2012 7:45 am
- Location: New Haven, CT
Re: Alert when Windows process IS running
I have a different error now.
"Unknown: Ne handler for that command."
We're using NSClient++ version 0.4.0.172
"Unknown: Ne handler for that command."
We're using NSClient++ version 0.4.0.172
Thanks so much,
Tom
Tom
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Alert when Windows process IS running
I'm pretty sure you need a newer version of NSClient++, the version you have is very old and I suspect that command is not implemented. Update to the latest 0.4.4.x version:
http://nsclient.org/download/
http://nsclient.org/download/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
hillhealthcenter
- Posts: 174
- Joined: Fri Sep 21, 2012 7:45 am
- Location: New Haven, CT
Re: Alert when Windows process IS running
Thanks Troy,
We'll get the NSClient++ updated. However, it seems that the "check_process" coommand isn't on our XI server. Can you send me the link? Or, point in the right direction?
We'll get the NSClient++ updated. However, it seems that the "check_process" coommand isn't on our XI server. Can you send me the link? Or, point in the right direction?
Thanks so much,
Tom
Tom
Re: Alert when Windows process IS running
You don't need a check_process command defined on your XI server, you'll just be using check_nrpe, and defining 'check_process' in the $ARG#$ variable that corresponds after -a. check_process is built into newer versions of NSClient++, so after updating it should work as expected.hillhealthcenter wrote:Thanks Troy,
We'll get the NSClient++ updated. However, it seems that the "check_process" coommand isn't on our XI server. Can you send me the link? Or, point in the right direction?
Were you able to get it working the way you'd like it to?
Former Nagios Employee
-
hillhealthcenter
- Posts: 174
- Joined: Fri Sep 21, 2012 7:45 am
- Location: New Haven, CT
Re: Alert when Windows process IS running
It might be a bit before I have a chance to test. We'd like to possibly use your recommendation to trouble a company-wide problem. I'm trying to push your recommendation through our change management process.
Thanks so much,
Tom
Tom
Re: Alert when Windows process IS running
Let us know if there's any updates!
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/