greedy regular experssion nrpe
shadih rahman
shadhin71 at gmail.com
Wed Mar 31 21:38:12 CEST 2010
Assaf,
Thank you for your help. Just wanted to add. Escaping with '\' did not
work but it work when I use '$'. Thanks
On Wed, Mar 31, 2010 at 12:32 PM, Assaf Flatto <nagios at flatto.net> wrote:
> shadih rahman wrote:
> > Asif,
> > Thanks for your response. I am attaching the actual plugin in this
> > email. However the actual regular expression line is below.
> >
> > if ($_=~ qr/$xgrep/mo){
> > $returnstring= "We have found $xgrep in $opfile";
> >
> >
> > nrpe definition is something like this
> >
> > command[check_filecontent_x64]=/usr/lib64/nagios/plugins/check_filetest
> > -n $ARG1$ -G $ARG2$ -c $ARG3$
> >
> >
> > service definition is something like this
> >
> > check_nrpe -H whatever -c check_filecontent_x64 -a filename ".*foo*" 1
> if you want to pass the quotation marks to the test you will need to
> escape them .
> like this [ -a filename \"\.\*foo\*\" 1 ] so nrpe will pass them as part
> of the string to the daemon on the target machine.
>
> Assaf
>
>
>
> --
> Never,Ever Cut A Deal With a Dragon
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
--
Cordially,
Shadhin Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100331/4fb075a3/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list