windows_eventlog
: Manage Windows Event Logs
Manage windows event logs including the size, rotation and retention
windows_eventlog { 'Application':
log_path => '%SystemRoot%\system32\winevt\Logs\Application.evtx',
log_size => '2048',
max_log_policy => 'overwrite'
}
windows_eventlog { ['Custom1', 'Custom2', 'Custom3']:
log_path_template => 'C:\Logs\%%NAME%%.evtx'
}
The following parameters are available in the windows_eventlog
defined type:
Data type: Optional[String[1]]
The path to the log file that you want to manage
Default value: undef
Data type: Integer
The max size of the log file
Default value: 1028
Data type: Enum['overwrite', 'manual', 'archive']
The retention policy for the log
Default value: 'overwrite'
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'
Data type: String[1]
The root path of the registry key of which prepends this defined type
Default value: 'HKLM\System\CurrentControlSet\Services\Eventlog'