salt.modules.win_event_viewer

Gives SaltStack access to Windows event log Charles McMarrow <cmcmarrow@saltstack.com>

class salt.modules.win_event_viewer.TimeTuple(year, month, day, hour, minute, second)
day

Alias for field number 2

hour

Alias for field number 3

minute

Alias for field number 4

month

Alias for field number 1

second

Alias for field number 5

year

Alias for field number 0

salt.modules.win_event_viewer.clear_log(log_name, target_computer=None)

Clears event log. A clear log event will be add it after the log was clear.

log_name

str

target_computer

None or str

salt.modules.win_event_viewer.get_event_filter_generator(log_name, target_computer=None, all_requirements=True, **kwargs)

Will find events that meet the requirements

log_name

str

target_computer

None or str

all_requirements

bool True: all requirements most be meet False: only a single requirement most be meet

kwargs

requirements for the events

return

dict

salt.modules.win_event_viewer.get_event_generator(log_name, target_computer=None, raw=False)

Will get all log events one by one. Events are not in exact order.

log_name

str

target_computer

None or str

raw

bool True: PyEventLogRecord False: dict

return

PyEventLogRecord or dict

salt.modules.win_event_viewer.get_event_sorted_by_info_generator(log_name, target_computer=None)

Makes keys to event

log_name

str

target_computer

None or str

return

dict

salt.modules.win_event_viewer.get_events(log_name, target_computer=None, raw=False)

Convert pywinypes.datetime into a TimeTuple.

log_name

str

target_computer

None or str

raw

bool True: PyEventLogRecord False: dict

return

tuple

salt.modules.win_event_viewer.get_events_filter(log_name, target_computer=None, all_requirements=True, **kwargs)

Find events that meet the requirements.

log_name

str

target_computer

None or str

all_requirements

bool True: all requirements most be meet False: only a single requirement most be meet

kwargs

requirements for the events

return

list

salt.modules.win_event_viewer.get_events_sorted_by_info(log_name, target_computer=None)

Make dict of sorted events

log_name

str

target_computer

None or str

return

dict

salt.modules.win_event_viewer.get_number_of_events(log_name, target_computer=None)

Gets the number of events in a log.

log_name

str

target_computer

None or str

return

int

salt.modules.win_event_viewer.log_event(application_name, event_id, **kwargs)

Adds event to application log.

application_name

str

event_id

int

kwargs

parts of event

salt.modules.win_event_viewer.make_event_dict(event)

Will make a PyEventLogRecord into a dict.

event

PyEventLogRecord

return

dict