Skip to content

Commit

Permalink
SVCPLAN-6652: Add syslog class to track specific GitLab logs via syslog
Browse files Browse the repository at this point in the history
  • Loading branch information
billglick committed Dec 2, 2024
1 parent cf7c90f commit 4715e26
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions manifests/syslog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

0 comments on commit 4715e26

Please sign in to comment.