diff --git a/manifests/syslog.pp b/manifests/syslog.pp index a5bcbbd..a6a6109 100644 --- a/manifests/syslog.pp +++ b/manifests/syslog.pp @@ -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, } }