[RHEL6] How do I collerct messages which have specified facility and keyword using rsyslogd?

Solution Verified - Updated -

Issue

  • How to collect messages which have specified facility and keyword using rsyslogd.
  • If a message includes "AAAA" and its facility is local0, then it should be in /var/log/AAAA_local0.log, and if a message includes "BBBB" and its facility is local1, then it should be in /var/log/BBBB_local1.log.

Environment

  • Red Hat Enterprise Linux 6.3
  • rsyslog-5.8.10-2.el6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content