feat(log-sources): the event channels as the host's log sources (NetOrk/netork#2897)
WindowsLogSourcesMixin.get_log_sources lists every event channel that is switched on and holds records (Get-WinEvent -ListLog *) as a source of kind eventlog, named by its channel, with its .evtx file, size and last write. Analytic and debug channels are left out. README and CHANGELOG describe the services, host events and log sources readings.
This commit is contained in:
1 parent
21a21383ff
commit
89a52db1a5
7 files changed
+262
-2
No files matched your search
+9
-1
@@ -15,7 +15,14 @@ import getpass
|
||||
import pathlib
|
||||
import time
|
||||
|
||||
from napalm_windows import WindowsDriver, host_events, scheduled_tasks, services, time_sync
|
||||
from napalm_windows import (
|
||||
WindowsDriver,
|
||||
event_channels,
|
||||
host_events,
|
||||
scheduled_tasks,
|
||||
services,
|
||||
time_sync,
|
||||
)
|
||||
from napalm_windows import windows as mod
|
||||
|
||||
SCRIPTS = {
|
||||
@@ -29,6 +36,7 @@ SCRIPTS = {
|
||||
"scheduled_tasks": scheduled_tasks._PS_SCHEDULED_TASKS,
|
||||
"time_sync": time_sync._PS_TIME_SYNC,
|
||||
"host_events": host_events.host_events_script(time.time() - 7 * 86400),
|
||||
"event_channels": event_channels._PS_EVENT_CHANNELS,
|
||||
}
|
||||
|
||||
OUT = pathlib.Path(__file__).parent / "harvest-out"
|
||||
|
||||
Reference in new issue
Block a user