#471 closed defect (fixed)

CheckProcState [CheckSystem.dll] regular expression match and cmdLine option not working

Reported by: abarbieri Owned by: mickem
Priority: 1 Milestone: 0.4.0
Component: CheckSystem Version: 0.3.9
Severity: Bugs Keywords:
Cc:

Description

Hello,

I'm using the stable release 0.3.9 and I have noticed the problem reported in the Forum help topic #805 (http://nsclient.org/nscp/discussion/topic/805) is still present.

it is not possible to match a regular expression pattern in the whole command line, only within the process name arg[0].

in NSCP.ini
alias_process_test1=CheckProcState match=regexp cmdLine ShowAll "$ARG1$"

check_nrpe -H 127.0.0.1 -c alias_process_test1 -a ".*svchost.exe *"
OK: svchost.exe: 13|'svchost.exe'=13;0;0

check_nrpe -H 127.0.0.1 -c alias_process_test1 -a ".*svchost.exe -k.*"
CRITICAL: .*svchost.exe -k.*: stopped (critical)|'.*svchost.exe -k.*'=0;0;0

thanks

Change History (2)

comment:1 Changed 22 months ago by abarbieri

not working for match=substr either :(

alias_process_test2=CheckProcState match=substr cmdLine ShowAll "$ARG1$"

check_nrpe -H 127.0.0.1 -c alias_process_test2 -a "svchost"
OK: svchost.exe: 13

check_nrpe -H 127.0.0.1 -c alias_process_test2 -a " -k"
CRITICAL: -k: stopped (critical)
check_nrpe -H 127.0.0.1 -c alias_process_test2 -a "-k"
CRITICAL: -k: stopped (critical)

all of the svchost processes have been started with a -k xxx argument but CheckProcState with cmdLine enabled does not match them.

comment:2 Changed 15 months ago by mickem

  • Milestone set to 0.4.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 0.4.0

Note: See TracTickets for help on using tickets.