From 4715e2663a29c1d9e369eaaeee132bdf88cbba67 Mon Sep 17 00:00:00 2001 From: Bill Glick Date: Mon, 2 Dec 2024 16:51:58 -0600 Subject: [PATCH] SVCPLAN-6652: Add syslog class to track specific GitLab logs via syslog --- manifests/syslog.pp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/manifests/syslog.pp b/manifests/syslog.pp index 0b7cb20..cd644d6 100644 --- a/manifests/syslog.pp +++ b/manifests/syslog.pp @@ -5,28 +5,31 @@ class profile_gitlab::syslog { include rsyslog + $rsyslog_input_params = { + confdir => $rsyslog::confdir, + priority => $rsyslog::input_priority, + target => '/etc/rsyslog.d/75_gitlab.conf', + type => 'imfile', + } + # Define the rsyslog configuration rsyslog::component::input { 'gitlab-access': - config => [ + 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', + }, + tag => 'gitlab-access', + * => $rsyslog_input_params, } rsyslog::component::input { 'gitlab-shell': - config => [ + 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', + }, + tag => 'gitlab-shell', + * => $rsyslog_input_params, } }