[Nagiosplug-help] check_procs matching problem

Philip Marcus pmarcus at factual.com
Mon Jul 27 19:34:45 CEST 2009


I ran into some similar problems when using the check_procs command
and it wasn't matching the expression I told it to.
The problem on my end turned out to be the "spaces". they weren't
actually spaces but tab characters, so I had to match on those and not
a regular space. Try that out.

Good luck,

-Philip


On Mon, Jul 27, 2009 at 1:46 AM, <Ralph.Grothe at itdz-berlin.de> wrote:
> Hi,
>
> I wonder why my usage of the check_procs plug-in does match on
> Linux boxes but doesn't on HP-UX.
>
> On HP-UX I use these versions:
>
> $ uname -srv
> HP-UX B.11.11 U
>
> $ /usr/local/nagios/libexec/check_procs -V
> check_procs (nagios-plugins 1.4) 1.43
>
>
> and I want to monitor this process
>
>
> $ UNIX95= ps -C dsmc -o args=
> /opt/tivoli/tsm/client/ba/bin/dsmc schedule
>
>
> but somehow this doesn't work
>
>
> $ /usr/local/nagios/libexec/check_procs -c 1:1 -p 1 -a
> '/opt/tivoli/tsm/client/ba/bin/dsmc schedule'
> PROCS CRITICAL: 0 processes with PPID = 1, args
> '/opt/tivoli/tsm/client/ba/bin/dsmc schedule'
>
> neither this
>
> $ /usr/local/nagios/libexec/check_procs -c 1:1 -p 1 -a 'dsmc
> schedule'
> PROCS CRITICAL: 0 processes with PPID = 1, args 'dsmc schedule'
>
> but only this
>
> $ /usr/local/nagios/libexec/check_procs -c 1:1 -p 1 -a dsmc
> PROCS OK: 1 process with PPID = 1, args 'dsmc'
>
> But this is too ambiguous because there can be more dsmc
> processes be running but only one as the scheduler
> (well, ok probably only the scheduler will have a PPID == 1, but
> anyway)
>
>
> On the other hand on Linux this seems to work
>
> $ uname -sri
> Linux 2.6.18-8.el5 i386
>
> $ /usr/lib/nagios/plugins/check_procs -V
> check_procs (nagios-plugins 1.4.9) 1.58
>
> $ ps -C dsmc -o args=
> dsmc schedule
> dsmc help
>
> $ /usr/lib/nagios/plugins/check_procs -c 1:1 -p 1 -a dsmc\
> schedule
> PROCS OK: 1 process with PPID = 1, args 'dsmc schedule'
>
>
>
> I know that the plug-ins' releases differ slightly
> but do you have an idea why the proc table parsing does work on
> Linux but fails on HP-UX?
>
>
> It would be easy for this trivial check to write a custom script
> plug-in for HP-UX
> but I wanted to use the official plug-ins where possible to save
> redundant work and because they are well tested.
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>




More information about the Help mailing list