Skip to content

Latest commit

 

History

History
86 lines (50 loc) · 2.02 KB

REFERENCE.md

File metadata and controls

86 lines (50 loc) · 2.02 KB

Reference

Table of Contents

Defined types

Defined types

windows_eventlog

Manage windows event logs including the size, rotation and retention

Examples

Manage the size of the Application log:
windows_eventlog { 'Application':
  log_path       => '%SystemRoot%\system32\winevt\Logs\Application.evtx',
  log_size       => '2048',
  max_log_policy => 'overwrite'
}
Manage several custom event logs under C:\Logs:
windows_eventlog { ['Custom1', 'Custom2', 'Custom3']:
  log_path_template => 'C:\Logs\%%NAME%%.evtx'
}

Parameters

The following parameters are available in the windows_eventlog defined type:

log_path

Data type: Optional[String[1]]

The path to the log file that you want to manage

Default value: undef

log_size

Data type: Integer

The max size of the log file

Default value: 1028

max_log_policy

Data type: Enum['overwrite', 'manual', 'archive']

The retention policy for the log

Default value: 'overwrite'

log_path_template

Data type: String[1]

A template for log_path, where "%%NAME%%" will be replaced with the log name

Default value: '%SystemRoot%\system32\winevt\Logs\%%NAME%%.evtx'

root_key

Data type: String[1]

The root path of the registry key of which prepends this defined type

Default value: 'HKLM\System\CurrentControlSet\Services\Eventlog'