From b29e9c0e458446307a11578f57ad5a00d7889976 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Fri, 30 Apr 2021 16:49:00 +0200 Subject: [PATCH] Configure a disk-assisted queue for output actions --- roles/rsyslog_common/defaults/main.yml | 1 + .../templates/10-common.conf.j2 | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/roles/rsyslog_common/defaults/main.yml b/roles/rsyslog_common/defaults/main.yml index e5e6024..f175014 100644 --- a/roles/rsyslog_common/defaults/main.yml +++ b/roles/rsyslog_common/defaults/main.yml @@ -1,3 +1,4 @@ --- rsyslog_outputs: [] +rsyslog_high_density: false ... diff --git a/roles/rsyslog_common/templates/10-common.conf.j2 b/roles/rsyslog_common/templates/10-common.conf.j2 index 36cd4dc..74969ac 100644 --- a/roles/rsyslog_common/templates/10-common.conf.j2 +++ b/roles/rsyslog_common/templates/10-common.conf.j2 @@ -91,6 +91,28 @@ ruleset(name="sendLogsToRemote") { port="{{ output.port }}" {% endif %} + queue.type="LinkedList" + queue.spoolDirectory="/var/spool/rsyslog" + queue.fileName="queue_{{ loop.index }}" + queue.saveOnShutdown="on" + +{% if rsyslog_high_density %} + queue.highWatermark="20000" + queue.lowWatermark="5000" + queue.checkpointInterval="10000" + queue.maxDiskSpace="4g" +{% else %} + queue.highWatermark="500" + queue.lowWatermark="100" + queue.checkpointInterval="200" + queue.syncqueuefiles="on" + queue.maxDiskSpace="500m" +{% endif %} + + action.resumeRetryCount="-1" + action.reportSuspension="on" + action.reportSuspensionContinuation="on" + {% if loop.index > 1 and output.fallback %} action.execOnlyWhenPreviousIsSuspended="on" {% endif %}