From cf7c90f8c3d02894a2bf359bdabefd0a678e9d40 Mon Sep 17 00:00:00 2001 From: Bill Glick Date: Mon, 2 Dec 2024 16:38:05 -0600 Subject: [PATCH] SVCPLAN-6652: Add syslog class to track specific GitLab logs via syslog --- manifests/syslog.pp | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/manifests/syslog.pp b/manifests/syslog.pp index 3608ae7..0b7cb20 100644 --- a/manifests/syslog.pp +++ b/manifests/syslog.pp @@ -6,21 +6,27 @@ include rsyslog # Define the rsyslog configuration - rsyslog::component::input { 'gitlab-shell': - type => 'imfile', - file => '/var/log/gitlab/gitlab-shell/gitlab-shell.log', - tag => 'gitlab-shell', - severity => 'info', - facility => 'local0', - target => '/etc/rsyslog.d/75_gitlab.conf', + rsyslog::component::input { 'gitlab-access': + config => [ + facility => 'local0', + file => '/var/log/gitlab/nginx/gitlab_access.log', + severity => 'info', + ], + confdir => $rsyslog::confdir, + tag => 'gitlab-access', + target => '/etc/rsyslog.d/75_gitlab.conf', + type => 'imfile', } - rsyslog::component::input { 'gitlab-access': - type => 'imfile', - file => '/var/log/gitlab/nginx/gitlab_access.log', - tag => 'gitlab-access', - severity => 'info', - facility => 'local0', - target => '/etc/rsyslog.d/75_gitlab.conf', + rsyslog::component::input { 'gitlab-shell': + config => [ + facility => 'local0', + file => '/var/log/gitlab/gitlab-shell/gitlab-shell.log', + severity => 'info', + ], + confdir => $rsyslog::confdir, + tag => 'gitlab-shell', + target => '/etc/rsyslog.d/75_gitlab.conf', + type => 'imfile', } }