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 b32dcc3 commit 3ae01af
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions manifests/syslog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,39 @@
class profile_gitlab::syslog {
include rsyslog

rsyslog::component::module { 'imload':
priority => $rsyslog::module_load_priority,
$rsyslog_default_params = {
target => '75_gitlab.conf',
confdir => $rsyslog::confdir,
#config = {},
#type = 'external',
#format = '<%= $content %>',
}

$rsyslog_input_params = {
confdir => $rsyslog::confdir,
priority => $rsyslog::input_priority,
target => '75_gitlab.conf',
type => 'imfile',
# Define the rsyslog module
rsyslog::component::module { 'imfile':
priority => $rsyslog::module_load_priority,
* => $rsyslog_default_params,
}

# Define the rsyslog configuration
# Define the rsyslog inputs
rsyslog::component::input { 'gitlab-access':
config => {
config => {
facility => 'local0',
file => '/var/log/gitlab/nginx/gitlab_access.log',
severity => 'info',
tag => 'gitlab-access',
},
tag => 'gitlab-access',
* => $rsyslog_input_params,
priority => $rsyslog::input_priority,
type => 'imfile',
* => $rsyslog_default_params,
}

rsyslog::component::input { 'gitlab-shell':
config => {
config => {
facility => 'local0',
file => '/var/log/gitlab/gitlab-shell/gitlab-shell.log',
severity => 'info',
tag => 'gitlab-shell',
},
tag => 'gitlab-shell',
* => $rsyslog_input_params,
priority => $rsyslog::input_priority,
type => 'imfile',
* => $rsyslog_default_params,
}
}

0 comments on commit 3ae01af

Please sign in to comment.