Skip to content

Commit 03fadb2

Browse files
committed
Merge pull request #479 from CodeNow/set-rsyslog-queue-types
Set rsyslog queue types
2 parents acc70f6 + 336a331 commit 03fadb2

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

ansible/roles/loggly/files/50-default.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
44

5+
# No buffering
6+
$ActionQueueType Direct
7+
58
#
69
# First some standard log files. Log by facility.
710
#

ansible/roles/loggly/files/rsyslog.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ $KLogPermitNonKernelFacility on
2929
#### GLOBAL DIRECTIVES ####
3030
###########################
3131

32+
#
33+
# Set main message queue to use direct queuing (not queued) mode
34+
#
35+
36+
$MainMsgQueueType Direct
37+
3238
#
3339
# Use traditional timestamp format.
3440
# To enable high precision timestamps, comment out the following line.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
$WorkDirectory /var/spool/rsyslog
22

33
# Rotate per hour
4+
$ActionQueueType Direct
45
$template RotateHourly_{{ name }},"{{ app_log_dir }}/%$YEAR%/%$MONTH%/%$DAY%/%$HOUR%/{{ name }}.log"
56
if $syslogtag contains '{{ name }}' and $syslogfacility-text == 'local7' then { action (type="omfile" DynaFile="RotateHourly_{{ name }}" template="RunnableJSON" dirCreateMode="0755" FileCreateMode="0644") }
67

78
# Loggly: Add a tag for {{ name }} events
8-
$template LogglyFormat_{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %syslogtagid% [{{ loggly_token }}@41058 tag=\"runnable\" tag=\"{{ node_env }}\"] %syslogtag%\n"
9+
$ActionQueueType LinkedList
10+
$template LogglyFormat_{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %syslogtag% [{{ loggly_token }}@41058 tag=\"runnable\" tag=\"{{ node_env }}\"] %msg%\n"
911
if $syslogtag contains '{{ name }}' and $syslogfacility-text == 'local7' then @@logs-01.loggly.com:6514;LogglyFormat_{{ name }}
1012
if $syslogtag contains '{{ name }}' and $syslogfacility-text == 'local7' then stop

0 commit comments

Comments
 (0)