Skip to content

Commit 8c4c49c

Browse files
author
Christopher M. Neill
committed
extremely initial checkin...
notes: rsyslog will have to handle multiple output streams, 1) loggly and 2) an output channel for logrotation example here: http://www.rsyslog.com/doc/v7-stable/tutorials/log_rotation_fix_size.html?highlight=size%20rotation
1 parent 3d5e263 commit 8c4c49c

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

ansible/roles/loggly/templates/21-filemonitoring-app.conf.j2 renamed to ansible/roles/loggly/templates/20-output-syslog.conf.j2

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
$ModLoad imfile
2-
$InputFilePollInterval 10
31
$WorkDirectory /var/spool/rsyslog
42
$PrivDropToGroup adm
53

4+
# start log rotation via outchannel
5+
# outchannel definition
6+
$outchannel log_rotation,/var/log/log_rotation.log, 52428800,/home/me/./log_rotation_script
7+
# activate the channel and log everything to it
8+
*.* :omfile:$log_rotation
9+
# end log rotation via outchannel
10+
611
# {{ name }} access file:
7-
$InputFileName /var/log/{{ name }}.log
8-
$InputFileTag {{ name }}:
9-
$InputFileStateFile stat-{{ name }}
10-
$InputFileSeverity info
11-
$InputFilePersistStateInterval 20000
12-
$InputRunFileMonitor
1312
#Add a tag for {{ name }} events
1413
$template LogglyFormatFile{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [f673760d-e0b3-4a93-a15e-2862ea074f91@41058 tag=\"file\" ] %msg%\n"
1514
if $programname == '{{ name }}' then @@logs-01.loggly.com:514;LogglyFormatFile{{ name }}

0 commit comments

Comments
 (0)