Defined Type: rsyslog::rule::local
- Defined in:
- manifests/rule/local.pp
Overview
Add a rule targeting writing local system logs
NOTE: Any option that is not explicitly documented here
matches the ruleset
options in the Rsyslog documentation.
In general, the order will be:
-
Data Source Rules
-
Console Rules
-
Drop Rules
-
Remote Rules
-
Other/Miscellaneous Rules
-
Local Rules
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 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 |
# File 'manifests/rule/local.pp', line 91
define rsyslog::rule::local (
String $rule,
Optional[Stdlib::Absolutepath] $target_log_file = undef,
Boolean $stop_processing = false,
Optional[String] $dyna_file = undef,
Optional[String] $template = undef,
Stdlib::Compat::Integer $dyna_file_cache_size = '10',
Stdlib::Compat::Integer $zip_level = '0',
Boolean $very_robust_zip = true,
Stdlib::Compat::Integer $flush_interval = '0',
Boolean $async_writing = false,
Boolean $flush_on_tx_end = true,
Optional[Stdlib::Compat::Integer] $io_buffer_size = undef,
Optional[String] $dir_owner = undef,
Optional[Stdlib::Compat::Integer] $dir_owner_num = undef,
Optional[String] $dir_group = undef,
Optional[Stdlib::Compat::Integer] $dir_group_num = undef,
Optional[String] $file_owner = undef,
Optional[Stdlib::Compat::Integer] $file_owner_num = undef,
Optional[String] $file_group = undef,
Optional[Stdlib::Compat::Integer] $file_group_num = undef,
String $file_create_mode = '0644',
String $dir_create_mode = '0700',
Boolean $fail_on_chown_failure = true,
Boolean $create_dirs = true,
Boolean $sync = false,
Optional[String] $sig_provider = undef,
Optional[String] $cry_provider = undef,
Optional[Stdlib::Absolutepath] $queue_filename = undef,
Optional[Stdlib::Absolutepath] $queue_spool_directory = undef,
Optional[Stdlib::Compat::Integer] $queue_size = undef,
Stdlib::Compat::Integer $queue_dequeue_batch_size = '16',
Optional[Stdlib::Compat::Integer] $queue_max_disk_space = undef,
Optional[Stdlib::Compat::Integer] $queue_high_watermark = undef,
Stdlib::Compat::Integer $queue_low_watermark = '2000',
Optional[Stdlib::Compat::Integer] $queue_full_delay_mark = undef,
Optional[Stdlib::Compat::Integer] $queue_light_delay_mark = undef,
Stdlib::Compat::Integer $queue_discard_mark = '9750',
Stdlib::Compat::Integer $queue_discard_severity = '8',
Optional[Stdlib::Compat::Integer] $queue_checkpoint_interval = undef,
Boolean $queue_sync_queue_files = false,
Enum['FixedArray','LinkedList','Direct','Disk'] $queue_type = 'Direct',
Stdlib::Compat::Integer $queue_worker_threads = '1',
Stdlib::Compat::Integer $queue_timeout_shutdown = '0',
Stdlib::Compat::Integer $queue_timeout_action_completion = '1000',
Stdlib::Compat::Integer $queue_timeout_enqueue = '2000',
Stdlib::Compat::Integer $queue_timeout_worker_thread_shutdown = '60000',
Stdlib::Compat::Integer $queue_worker_thread_minimum_messages = '100',
String $queue_max_file_size = '1m',
Boolean $queue_save_on_shutdown = false,
Stdlib::Compat::Integer $queue_dequeue_slowdown = '0',
Optional[Stdlib::Compat::Integer] $queue_dequeue_time_begin = undef,
Optional[Stdlib::Compat::Integer] $queue_dequeue_time_end = undef
) {
if !($dyna_file or $target_log_file) {
fail('You must specify one of $dyna_file or $target_log_file')
}
$_safe_name = regsubst($name,'/','__')
rsyslog::rule { "99_simp_local/${_safe_name}.conf":
content => template("${module_name}/rule/local.erb")
}
}
|