check_snmp with regular expression

Martin Melin mmelin at gmail.com
Thu Dec 10 16:34:40 CET 2009


It looks like you're trying to match "some string", no matter where it
appears in the document. In that case, anchoring to line beginning and end
is just extra work. Simply match on "some string", and you're good to go.

The asterisk is a modifier to the dot, so it needs to come after that. So
the regex you pasted should probably be "^.*some string.*$", but this is
functionally equivalent to "some string".

Regards,
Martin Melin

On Thu, Dec 10, 2009 at 4:18 PM, shadih rahman <shadhin71 at gmail.com> wrote:

> List,
>    I am trying to use check_snmp plugin with the following regular
> expression and I am getting an error, can someone point out what am I doing
> wrong.  Thanks
>
>
>
> /usr/lib64/nagios/plugins/check_snmp -H hostname -C community -o
> .1.3.6.1.2.1.1.6.0 -r "^*.some string*$"
>
> Could Not Compile Regular Expressioncheck_snmp: Could not parse arguments
>
>
>
>
> --
> Cordially,
> Shadhin Rahman
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091210/7c2bd93c/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
-------------- 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