0

I need to store Syslog messages to a database like MySQL for one of my application. but i only want to store those messages which contains a specific pattern. I don't want to store all the lines which are logged to Syslog. Is it possible to specify the regular expressions in rsyslog configuration which filters out certain messages ?

Ankit Kumar
  • 1,433
  • 1
  • 16
  • 24

1 Answers1

2

After little more searching on Internet, I found a good article on how regular expression can be used with rsyslog. the link to the article is : http://www.rsyslog.com/regex/

basically rsyslog uses POSIX ERE expressions and the above page helps in writing regular expressions for rsyslog daemon which can be included in rsyslog.conf file.

Ankit Kumar
  • 1,433
  • 1
  • 16
  • 24