[Nagiosplug-help] problem with check_procs on HPUX and command arguments

Frost, Mark {PBG} mark.frost1 at pepsi.com
Tue Jul 8 18:20:13 CEST 2008


Hello. I've been asked to check that certain processes are running on an
HPUX 11.23 box here.  The processes all have the following form:

	/usr/bin/ksh /foo/bar/blaz/stuff/scripts/start_polljobs_JMS.ksh
an_arg another_arg one_more_arg

This would be a pretty easy perl script, but rather than having to roll
by my own, I'd like to use check_procs for this.  (I'm using the 1.4.12
plugins).

According to the help output, check_procs seems to give me two possible
options:

	 -a, --argument-array=STRING
	   Only scan for processes with args that contain STRING.
	 --ereg-argument-array=STRING
	   Only scan for processes with args that contain the regex
STRING.


However, every configuration I've tried using these arguments fails.  I
would like to specify large portions of the command argument list to
either of these two options.

I expected to be able to say something like

	$ check_procs -a
'/foo/bar/blaz/stuff/scripts/start_polljobs_JMS.ksh'
or
	$ check_procs -a
'/foo/bar/blaz/stuff/scripts/start_pulljobs_JMS.ksh an_arg another_arg
one_more_arg'

and it would work

What's interesting is that short versions of these strings seem to work.
That is

	$ check_procs -a 'start_polljobs'
	PROCS OK: 1 process with args 'start_polljobs'
	$ check_procs -a 'start_polljobs_JMS.ksh'
	PROCS OK: 0 processes with args 'start_polljobs_JMS.ksh'
	$ check_procs -a 'start_polljobs_JMS\.ksh'
	PROCS OK: 0 processes with args 'start_polljobs_JMS\.ksh'

I'm at a loss as to what to do with the --ereg-argument-array command

	$ ./check_procs --ereg-argument-array='start_polljobs_JMS.ksh'
	PROCS OK: 0 processes with regex args 'start_polljobs_JMS.ksh'
	$ ./check_procs --ereg-argument-array='start_polljobs_JMS\.ksh'
	PROCS OK: 0 processes with regex args 'start_polljobs_JMS\.ksh'
	$ ./check_procs --ereg-argument-array='start_polljobs'
	PROCS OK: 1 process with regex args 'start_polljobs'
	$ ./check_procs --ereg-argument-array='start_polljobs_JMS'
	PROCS OK: 0 processes with regex args 'start_polljobs_JMS'

While I'm not sure what the regex format the --ereg-argument-array
command uses (perl regex's? are they delimited by /'s?), it appears to
be hit by the same limit as the -a command.

I'm getting the impression that there might be no getting out of my own
perl script to regex commands/args from processes on this server, but
I'd like to not have to do that.

Any help is greatly appreciated.

thanks

Mark





More information about the Help mailing list