Last active
August 29, 2015 13:55
-
-
Save mishok13/8707503 to your computer and use it in GitHub Desktop.
RSyslog configuration with dynamic path and overwritten message format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$template TestFormat,"Message: %msg%\n" | |
$template TestFile,"/tmp/test_%$year%%$month%%$day%%$hour%.log" | |
# Writes matching messages to path defined by TestFile template in TestFormat format | |
:syslogtag, contains, "test" -?TestFile;TestFormat | |
# Drops messages matching this syslog tag | |
:syslogtag, contains, "test" ~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment