Puppet Class: rsyslog
- Defined in:
- manifests/init.pp
Summary
Set up Rsyslog 8Overview
The configuration is particularly slanted toward the issues present in the versions of rsyslog included with Enterprise Linux systems. It should still work on other systems but they may have different/other bugs that have not been addressed.
See “rsyslog::config“ for additional, detailed configuration.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'manifests/init.pp', line 127
class rsyslog (
String $service_name = 'rsyslog',
String $package_name = 'rsyslog',
Boolean $read_journald = true,
String $tls_package_name = "${package_name}-gnutls",
Simplib::Netlist $trusted_nets = simplib::lookup('simp_options::trusted_nets', {'default_value' => ['127.0.0.1/32'] }),
Boolean $enable_tls_logging = false,
Simplib::Netlist $log_servers = simplib::lookup('simp_options::syslog::log_servers', { 'default_value' => [] }),
Simplib::Netlist $failover_log_servers = simplib::lookup('simp_options::syslog::failover_log_servers', { 'default_value' => [] }),
Stdlib::Absolutepath $queue_spool_directory = '/var/spool/rsyslog',
Stdlib::Absolutepath $rule_dir = '/etc/rsyslog.simp.d',
Boolean $tcp_server = false,
Simplib::Port $tcp_listen_port = 514,
Boolean $tls_tcp_server = false,
Simplib::Port $tls_tcp_listen_port = 6514,
Boolean $udp_server = false,
String $udp_listen_address = '127.0.0.1',
Simplib::Port $udp_listen_port = 514,
Boolean $logrotate = simplib::lookup('simp_options::logrotate', {'default_value' => false}),
Variant[Boolean,Enum['simp']] $pki = simplib::lookup('simp_options::pki', {'default_value' => false}),
String $app_pki_external_source = simplib::lookup('simp_options::pki::source', {'default_value' => '/etc/pki/simp/x509'}),
Stdlib::Absolutepath $app_pki_dir = '/etc/pki/simp_apps/rsyslog/x509',
Hash $rules = {},
) {
if $facts['rsyslogd'] and versioncmp($facts['rsyslogd']['version'], '8.24.0') < 0 {
warning("${module_name}: Rsyslog version ${facts['rsyslogd']} not supported. Use ${module_name} version 7.6.4 instead")
}
contain 'rsyslog::install'
contain 'rsyslog::config'
contain 'rsyslog::service'
# lint:ignore:arrow_on_right_operand_line
Class['rsyslog::install'] ->
Class['rsyslog::config'] ~>
Class['rsyslog::service']
# lint:endignore
if $logrotate {
contain 'rsyslog::config::logrotate'
Class['rsyslog::service'] -> Class['rsyslog::config::logrotate']
}
$rules.each |$key, $value| {
rsyslog::rule { $key:
* => $value,
}
}
}
|