From cc681e4fac07edf929a6161ee0f5e032b70872eb Mon Sep 17 00:00:00 2001 From: Jeltz Date: Fri, 30 Apr 2021 16:39:52 +0200 Subject: [PATCH 1/3] Add an inventory group for routers. --- hosts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts b/hosts index 0f1c61a..c302267 100644 --- a/hosts +++ b/hosts @@ -503,6 +503,18 @@ pacaterie_unifi ############################################################################### # Groups by service +[routeur] +routeur-fleming.adm.auro.re +routeur-fleming-backup.adm.auro.re +routeur-pacaterie.adm.auro.re +routeur-pacaterie-backup.adm.auro.re +routeur-edc.adm.auro.re +routeur-edc-backup.adm.auro.re +routeur-gs.adm.auro.re +routeur-gs-backup.adm.auro.re +routeur-rives.adm.auro.re +routeur-rives-backup.adm.auro.re + [ldap_replica:children] ldap_replica_fleming ldap_replica_pacaterie -- 2.45.2 From b29e9c0e458446307a11578f57ad5a00d7889976 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Fri, 30 Apr 2021 16:49:00 +0200 Subject: [PATCH 2/3] 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 %} -- 2.45.2 From 604373db0364dc879d67b2c72924f545c8b77bb7 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Fri, 30 Apr 2021 16:49:36 +0200 Subject: [PATCH 3/3] Set rsyslog_high_density for routers --- group_vars/routeur.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 group_vars/routeur.yml diff --git a/group_vars/routeur.yml b/group_vars/routeur.yml new file mode 100644 index 0000000..a670bd3 --- /dev/null +++ b/group_vars/routeur.yml @@ -0,0 +1,3 @@ +--- +rsyslog_high_density: true +... -- 2.45.2