On Wed, 31 Jul 2013, Xu, Shouxin wrote:
Hi, all
I want to modify the PRI or FACILITY for the specific message.
For example, I call syslog API with params that FACILITY equals SECURITY,
could rsyslog change it to LOCAL0(according to custom rules) then send to the
destination? (I compared syslog-ng which could modify MESSAGE, HOST, etc, but
could not modify FACILITY, LEVEL which is syslog API's params.)
If it could, how to write the rsyslog configuration file?
Yes you can (indire ctly), there are several possible ways to do this.
In any case, you will need to create a different template to output the message.
With earlier versions, you will need to create a set of templates, one for each
severity level, and then output with the correct template.
With version 7 you can use the variables that you can define to calculate the
new pri value and have that in the template for the outbound message
Could also recommend some reference about using rsyslog except its doc. Thank
you!
I'm not aware of a lot of other references other than the documentation
included with the packages and on the website, what sort of thing are you
looking for?
David Lang
_______________________________________________
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.