Maybe one of these options to check_procs would help:<br>
<br>
-a, --argument-array=STRING<br> Only scan for processes with args that contain STRING.<br> --ereg-argument-array=STRING<br> Only scan for processes with args that contain the regex STRING.<br> -C, --command=COMMAND<br>
Only scan for exact matches of COMMAND (without path).<br><br>Looks like the " --ereg-argument-array=" might be what you need to catch the REGEX you're trying to pass in.<br><br>Good Luck!<br><br>-Philip<br>
<br><br><div class="gmail_quote">On Thu, Aug 13, 2009 at 12:29 PM, Brian Dold <span dir="ltr"><<a href="mailto:brian.dold@chicagotrading.com">brian.dold@chicagotrading.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p>Hi all:</p>
<p> </p>
<p>I have a problem with greedy matching in check_procs.
I receive alerts for two processes running when someone looks at a core file on
our system. </p>
<p> </p>
<p>Definition:</p>
<p>command[check_process_by_fullpath]=/usr/lib/nagios/plugins/check_procs
-c 1:1 --metric PROCS --argument-array "$ARG1$"</p>
<p> </p>
<p>Service Description:</p>
<p>define service {</p>
<p>
use uschi12tv02-proc-template</p>
<p> service_description PROCESS: TV Server
Process</p>
<p>
check_period
uschi12tv02-tvserver-hours</p>
<p> notification_period
uschi12tv02-tvserver-hours</p>
<p>
check_command
check_nrpe!check_process_by_fullpath!"/ctc/tv/bin/linux32/tvserverd"</p>
<p>}</p>
<p> </p>
<p>When someone runs the following to look at core files, we
get a false alert that two processes are running because the binary is in the
core command:</p>
<p>gdb /ctc/tv/bin/linux32/tvserverd
/ctc/cores/core.tvserverd.22217.11</p>
<p> </p>
<p>I need to match similar to below (although this doesn’t
work):</p>
<p>check_command
check_nrpe!check_process_by_fullpath!"^/ctc/tv/bin/linux32/tvserverd$"
- (note the ^ and $)</p>
<p> </p>
<p>Does anyone know how to do this?</p>
<p> </p>
<p>Thank you,</p>
<p> </p>
<p>Brian Dold</p>
</div>
<p></p><p><font size="1">This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited.</font><font size="1"> If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.</font><font size="1"> Neither CTC Holdings nor any affiliates (CTC) are responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity that may be attached to or contained in this communication. CTC accepts no liability for any content contained in the email, or any errors or omissions arising as a result of e-mail transmission.</font><font size="1"> Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. CTC London Limited is authorized and regulated by the Financial Services Authority.</font></p>
</div>
<br>------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what's new with<br>
Crystal Reports now. <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>_______________________________________________<br>
Nagiosplug-help mailing list<br>
<a href="mailto:Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>
::: Please include plugins version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
<br></blockquote></div><br>