Hi Team ,
We use Nagios xi 5.2.2. Currently we monitor Windows processes as below.
COMMAND: /usr/local/nagios/libexec/check_nt -H <Windows_Host> -s "Password" -p 12489 -v PROCSTATE -l Rundbb.exe -d SHOWALL
OUTPUT: rundbb.exe: Running
But the "rundbb.exe" process is running in different names in Windows server (attached screenshot). We need to monitor each rundbb processes separately .
Please assist.
Nagios to monitor multiple windows processes with same name
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Nagios to monitor multiple windows processes with same name
You do not have the required permissions to view the files attached to this post.
Re: Nagios to monitor multiple windows processes with same n
This community post covers that:
http://forums.nsclient.org/t/check-proc ... ent/3665/2
FYI I wasn't able to get this working on the latest version of NSClient++. Had to use 0.4.3:
One thing you will need to change is to use check_nrpe and the NSClient++ NRPEServer rather than check_nt. Here's an example using Java processes:
But maybe I want to match something like this with the arg1 specifically:
NSClient++ offers the filter argument to do that sort of thing. Like so:
Which can target my special process specifically.
http://forums.nsclient.org/t/check-proc ... ent/3665/2
FYI I wasn't able to get this working on the latest version of NSClient++. Had to use 0.4.3:
Code: Select all
[root@xi-stable ~]# /usr/local/nagios/libexec/check_nrpe --host 192.168.67.99
I (0.4.3.143 2015-04-29) seem to be doing fine...Code: Select all
[root@xi-stable ~]# /usr/local/nagios/libexec/check_nrpe --host 192.168.67.99 --command check_process -a "process=javaw.exe"
OK: all processes are ok.|'javaw.exe state'=1;0;0 'javaw.exe state'=1;0;0 'count'=2;0;0
NSClient++ offers the filter argument to do that sort of thing. Like so:
Code: Select all
[root@xi-stable ~]# /usr/local/nagios/libexec/check_nrpe --host 192.168.67.99 --command check_process -a process="javaw.exe" "filter=command_line like 'arg1'"
OK: all processes are ok.|'javaw.exe state'=1;0;0 'count'=1;0;0
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Re: Nagios to monitor multiple windows processes with same n
Hi ,
Thanks for the response. We tried to execute the same.
Manual execution:
nagios@nagios_server:~$ /usr/local/nagios/libexec/check_nrpe --host 10.x.x.x --command check_process -a process="rundbb.exe" "filter=command_line like 'WF_EmailSms'"
OK: all processes are ok.|'rundbb.exe state'=1;0;0 'count'=1;0;0
nagios@nagios_server:~$ /usr/local/nagios/libexec/check_nrpe --host 10.x.x.x --command check_process -a process="rundbb.exe" "filter=command_line like 'WF_EmailSms'"
OK: No processes found|'count'=0;0;0
Also, we tried to implement the same command in Nagios xi web interface. please find the screenshot attached
Defined command :
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_process -a process="$ARG1$" "filter=command_line like '$ARG2$'"
in GUI, insted of "Critical" its showing "Unknown". Please assist.
Thanks for the response. We tried to execute the same.
Manual execution:
nagios@nagios_server:~$ /usr/local/nagios/libexec/check_nrpe --host 10.x.x.x --command check_process -a process="rundbb.exe" "filter=command_line like 'WF_EmailSms'"
OK: all processes are ok.|'rundbb.exe state'=1;0;0 'count'=1;0;0
nagios@nagios_server:~$ /usr/local/nagios/libexec/check_nrpe --host 10.x.x.x --command check_process -a process="rundbb.exe" "filter=command_line like 'WF_EmailSms'"
OK: No processes found|'count'=0;0;0
Also, we tried to implement the same command in Nagios xi web interface. please find the screenshot attached
Defined command :
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_process -a process="$ARG1$" "filter=command_line like '$ARG2$'"
in GUI, insted of "Critical" its showing "Unknown". Please assist.
You do not have the required permissions to view the files attached to this post.
Re: Nagios to monitor multiple windows processes with same n
To get the check to return a critical instead of an unknown status, you would have to add the empty-state option to your command.
When the check is run and no processes are matched, it is considered an empty state and that option will return a critical status instead of an unknown.
http://forums.nsclient.org/t/check-proc ... cal/4022/3
https://docs.nsclient.org/0.4.4/referen ... mpty-state
Code: Select all
/usr/local/nagios/libexec/check_nrpe --host 10.x.x.x --command check_process -a process="rundbb.exe" "filter=command_line like 'WF_EmailSms'" empty-state=criticalhttp://forums.nsclient.org/t/check-proc ... cal/4022/3
https://docs.nsclient.org/0.4.4/referen ... mpty-state
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Re: Nagios to monitor multiple windows processes with same n
Thanks for the assistance. It works fine. Kindly close