[rsyslog-notify] Forum Thread: Re: Converting default rules to RainerScript - (Mode 'reply')
noreply at adiscon.com
noreply at adiscon.com
Mon May 4 06:14:53 CEST 2015
User: kamermans
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25472#p25472
Message:
----------
Thanks for the quick, helpful response!
I'm setting up a replacement for the stock Ubuntu rsyslog.conf, as it is
using the legacy syntax, and that makes it difficult to understand what
syntax to use where.
Here's the file I'm working on:
[url:1fdxuo75]https://gist.github.com/kamermans/3a999f3dd727f8ebfcf3[/url:1fdxuo75],
I figure it might be good to have a port of the stock config around to
point to.
Looking through the documentation, it seems the only thing I can move to
the global object in my config is $WorkDirectory, so I suppose I'll leave
it legacy with the other params.
I've also tested setting the omfile defaults via the load statement, but it
did not seem to work in my testing:
<!-- m --><a class="postlink"
href="https://gist.github.com/kamermans/3a999f3dd727f8ebfcf3/464494a542b155b3d24b31b93aef6e0a17ea7833#file-rsyslog-conf-L70">https://gist.github.com/kamermans/3a999
... g-conf-L70</a><!-- m -->
[code:1fdxuo75]
module( load="builtin:omfile"
# Use traditional timestamp format.
# To enable high precision timestamps, use the following line:
# template="RSYSLOG_FileFormat"
template="RSYSLOG_TraditionalFileFormat"
# Set the default permissions for all log files.
fileOwner="syslog"
fileGroup="adm"
dirOwner="syslog"
dirGroup="adm"
fileCreateMode="0640"
dirCreateMode="0755"
)
[/code:1fdxuo75]
The syntax checking passed and rsyslog was functional, but when I changed
the [b:1fdxuo75]fileCreateMode[/b:1fdxuo75] and caused rsyslog to write a
new file, the mode was unaffected. I repeated this test, commenting the
omfile changes out and adding the global method, and it worked as expected.
More information about the rsyslog-notify
mailing list