Hi Chris,

I'm not sure if you need regular expressions as a filter
conditio<http://www.rsyslog.com/doc/rsyslog_conf_filter.html>n
(ie: do stuff if a field matches a regex) or as a
property<http://www.rsyslog.com/doc/property_replacer.html>to build a
template <http://www.rsyslog.com/doc/rsyslog_conf_templates.html> (ie:
include this regex match as part of a string that rsyslog would later spit
out to a file or over the network).

Either way, I've only used regex as a filter condition a long time ago and
I'm not really the person to help. But I wanted to point out to the
existing documentation and, perhaps more interestingly, to the online regex
checker:
http://www.rsyslog.com/regex/

I hope this helps. If not, come back here and I'll pray that someone more
knowledgeable will get you further than I did :)

Best regards,
Radu


2013/11/27 Chris Bartram <[email protected]>

>
> Can someone provide me an example of a working regex (has to be regex)
> filter I can use in my v7 rsyslog.conf on a RHEL5 server to ignore/drop
> messages meeting a specific expression?
>
> Examples I've tried didn't work; and I see notes in other forums about
> needing to double-escape characters in the regex?
>
> **It would be extra helpful if the regex example could use perl-like
> syntax? something like  ^kernel\[\d+\] XYZ
>
> Thanks!
> -Chris Bartram
>
>
> "The purpose of life is not to be happy. It is to be useful, to be
> honorable, to be compassionate, to have it make some difference that you
> have lived and lived well". (Ralph Waldo Emerson)
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to