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
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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'manifests/rule/local.pp', line 115
define rsyslog::rule::local (
Optional[String] $rule = undef,
Optional[Stdlib::Absolutepath] $target_log_file = undef,
Boolean $stop_processing = false,
Optional[String] $dyna_file = undef,
Optional[String] $template = undef,
Integer[0] $dyna_file_cache_size = 10,
Integer[0,9] $zip_level = 0,
Boolean $very_robust_zip = true,
Integer[0] $flush_interval = 0,
Boolean $async_writing = false,
Boolean $flush_on_tx_end = true,
Optional[Integer[0]] $io_buffer_size = undef,
Optional[String] $dir_owner = undef,
Optional[Integer[0]] $dir_owner_num = undef,
Optional[String] $dir_group = undef,
Optional[Integer[0]] $dir_group_num = undef,
Optional[String] $file_owner = undef,
Optional[Integer[0]] $file_owner_num = undef,
Optional[String] $file_group = undef,
Optional[Integer[0]] $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[Integer[0]] $queue_size = undef,
Integer[0] $queue_dequeue_batch_size = 16,
Optional[Integer[0]] $queue_max_disk_space = undef,
Optional[Integer[0]] $queue_high_watermark = undef,
Integer[0] $queue_low_watermark = 2000,
Optional[Integer[0]] $queue_full_delay_mark = undef,
Optional[Integer[0]] $queue_light_delay_mark = undef,
Integer[0] $queue_discard_mark = 9750,
Integer[0] $queue_discard_severity = 8,
Optional[Integer[0]] $queue_checkpoint_interval = undef,
Boolean $queue_sync_queue_files = false,
Enum['FixedArray','LinkedList','Direct','Disk'] $queue_type = 'Direct',
Integer[0] $queue_worker_threads = 1,
Integer[0] $queue_timeout_shutdown = 0,
Integer[0] $queue_timeout_action_completion = 1000,
Integer[0] $queue_timeout_enqueue = 2000,
Integer[0] $queue_timeout_worker_thread_shutdown = 60000,
Integer[0] $queue_worker_thread_minimum_messages = 100,
String $queue_max_file_size = '1m',
Boolean $queue_save_on_shutdown = false,
Integer[0] $queue_dequeue_slowdown = 0,
Optional[Integer[0]] $queue_dequeue_time_begin = undef,
Optional[Integer[0]] $queue_dequeue_time_end = undef,
Optional[String] $content = undef
) {
unless ($rule or $content) {
fail('You must specify "$rule" if you are not specifying "$content"')
}
$_safe_name = regsubst($name,'/','__')
if $content {
$_content = $content
}
else {
if !($dyna_file or $target_log_file) {
fail('You must specify one of $dyna_file or $target_log_file')
}
$_content = template("${module_name}/rule/local.erb")
}
rsyslog::rule { "99_simp_local/${_safe_name}.conf":
content => $_content
}
}
|