diff --git a/manifests/init.pp b/manifests/init.pp index e827c5c..6f0bfe2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,45 +12,46 @@ # class { 'rsyslog': } # class rsyslog ( - $rsyslog_package_name = $rsyslog::params::rsyslog_package_name, - $relp_package_name = $rsyslog::params::relp_package_name, - $mysql_package_name = $rsyslog::params::mysql_package_name, - $pgsql_package_name = $rsyslog::params::pgsql_package_name, - $gnutls_package_name = $rsyslog::params::gnutls_package_name, - $package_status = $rsyslog::params::package_status, - $rsyslog_d = $rsyslog::params::rsyslog_d, - $purge_rsyslog_d = $rsyslog::params::purge_rsyslog_d, - $rsyslog_conf = $rsyslog::params::rsyslog_conf, - $rsyslog_default = $rsyslog::params::rsyslog_default, - $rsyslog_default_file = $rsyslog::params::default_config_file, - $run_user = $rsyslog::params::run_user, - $run_group = $rsyslog::params::run_group, - $log_user = $rsyslog::params::log_user, - $log_group = $rsyslog::params::log_group, - $log_style = $rsyslog::params::log_style, - $umask = $rsyslog::params::umask, - $perm_file = $rsyslog::params::perm_file, - $perm_dir = $rsyslog::params::perm_dir, - $spool_dir = $rsyslog::params::spool_dir, - $service_name = $rsyslog::params::service_name, - $service_hasrestart = $rsyslog::params::service_hasrestart, - $service_hasstatus = $rsyslog::params::service_hasstatus, - $client_conf = $rsyslog::params::client_conf, - $server_conf = $rsyslog::params::server_conf, - $ssl = $rsyslog::params::ssl, - $modules = $rsyslog::params::modules, - $preserve_fqdn = $rsyslog::params::preserve_fqdn, - $local_host_name = undef, - $max_message_size = $rsyslog::params::max_message_size, - $system_log_rate_limit_interval = $rsyslog::params::system_log_rate_limit_interval, - $system_log_rateLimit_burst = $rsyslog::params::system_log_rateLimit_burst, - $extra_modules = $rsyslog::params::extra_modules, - $default_template = $rsyslog::params::default_template, - $msg_reduction = $rsyslog::params::msg_reduction, - $non_kernel_facility = $rsyslog::params::non_kernel_facility, - $omit_local_logging = $rsyslog::params::omit_local_logging, - $im_journal_ratelimit_interval = $rsyslog::params::im_journal_ratelimit_interval, - $im_journal_ratelimit_burst = $rsyslog::params::im_journal_ratelimit_burst + $rsyslog_package_name = $rsyslog::params::rsyslog_package_name, + $relp_package_name = $rsyslog::params::relp_package_name, + $mysql_package_name = $rsyslog::params::mysql_package_name, + $pgsql_package_name = $rsyslog::params::pgsql_package_name, + $gnutls_package_name = $rsyslog::params::gnutls_package_name, + $package_status = $rsyslog::params::package_status, + $rsyslog_d = $rsyslog::params::rsyslog_d, + $purge_rsyslog_d = $rsyslog::params::purge_rsyslog_d, + $rsyslog_conf = $rsyslog::params::rsyslog_conf, + $rsyslog_default = $rsyslog::params::rsyslog_default, + $rsyslog_default_file = $rsyslog::params::default_config_file, + $run_user = $rsyslog::params::run_user, + $run_group = $rsyslog::params::run_group, + $log_user = $rsyslog::params::log_user, + $log_group = $rsyslog::params::log_group, + $log_style = $rsyslog::params::log_style, + $umask = $rsyslog::params::umask, + $perm_file = $rsyslog::params::perm_file, + $perm_dir = $rsyslog::params::perm_dir, + $spool_dir = $rsyslog::params::spool_dir, + $service_name = $rsyslog::params::service_name, + $service_hasrestart = $rsyslog::params::service_hasrestart, + $service_hasstatus = $rsyslog::params::service_hasstatus, + $client_conf = $rsyslog::params::client_conf, + $server_conf = $rsyslog::params::server_conf, + $ssl = $rsyslog::params::ssl, + $modules = $rsyslog::params::modules, + $preserve_fqdn = $rsyslog::params::preserve_fqdn, + $local_host_name = undef, + $max_message_size = $rsyslog::params::max_message_size, + $system_log_rate_limit_interval = $rsyslog::params::system_log_rate_limit_interval, + $system_log_rateLimit_burst = $rsyslog::params::system_log_rateLimit_burst, + $extra_modules = $rsyslog::params::extra_modules, + $default_template = $rsyslog::params::default_template, + $msg_reduction = $rsyslog::params::msg_reduction, + $non_kernel_facility = $rsyslog::params::non_kernel_facility, + $omit_local_logging = $rsyslog::params::omit_local_logging, + $im_journal_ratelimit_interval = $rsyslog::params::im_journal_ratelimit_interval, + $im_journal_ratelimit_burst = $rsyslog::params::im_journal_ratelimit_burst, + $im_journal_ignore_previous_messages = $rsyslog::params::im_journal_ignore_previous_messages ) inherits rsyslog::params { class { 'rsyslog::install': } class { 'rsyslog::config': } diff --git a/manifests/params.pp b/manifests/params.pp index 8408397..285fea3 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -110,21 +110,22 @@ class rsyslog::params { $omit_local_logging = false } elsif versioncmp($::operatingsystemmajrelease, '7') >= 0 { - $rsyslog_package_name = 'rsyslog' - $mysql_package_name = 'rsyslog-mysql' - $pgsql_package_name = 'rsyslog-pgsql' - $gnutls_package_name = 'rsyslog-gnutls' - $relp_package_name = 'rsyslog-relp' - $default_config_file = 'rsyslog_default_rhel7' - $modules = [ + $rsyslog_package_name = 'rsyslog' + $mysql_package_name = 'rsyslog-mysql' + $pgsql_package_name = 'rsyslog-pgsql' + $gnutls_package_name = 'rsyslog-gnutls' + $relp_package_name = 'rsyslog-relp' + $default_config_file = 'rsyslog_default_rhel7' + $modules = [ '$ModLoad imuxsock # provides support for local system logging', '$ModLoad imjournal # provides access to the systemd journal', '#$ModLoad imklog # provides kernel logging support (previously done by rklogd)', '#$ModLoad immark # provides --MARK-- message capability', ] - $omit_local_logging = true - $im_journal_ratelimit_interval = '600' - $im_journal_ratelimit_burst = '20000' + $omit_local_logging = true + $im_journal_ratelimit_interval = '600' + $im_journal_ratelimit_burst = '20000' + $im_journal_ignore_previous_messages = 'off' } else { $rsyslog_package_name = 'rsyslog5' $mysql_package_name = 'rsyslog5-mysql' diff --git a/templates/rsyslog.conf.erb b/templates/rsyslog.conf.erb index fb57e3a..15b4fd1 100644 --- a/templates/rsyslog.conf.erb +++ b/templates/rsyslog.conf.erb @@ -71,6 +71,7 @@ $OmitLocalLogging on <% if scope.lookupvar('rsyslog::im_journal_statfile') -%> $IMJournalStateFile <%=scope.lookupvar('rsyslog::im_journal_statfile') %> <% end %> +$IMJournalStateFile <%=scope.lookupvar('rsyslog::im_journal_ignore_previous_messages') %> $imjournalRatelimitInterval <%=scope.lookupvar('rsyslog::im_journal_ratelimit_interval') %> $imjournalRatelimitBurst <%=scope.lookupvar('rsyslog::im_journal_ratelimit_burst') %>