Skip to content

Commit babf9a0

Browse files
authored
add replay doc for windows evt log (#686)
1 parent 1be5799 commit babf9a0

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

crowdsec-docs/docs/data_sources/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Name | Type | Stream | One-shot
2424
[Kubernetes Audit](/data_sources/kubernetes_audit.md) | expose a webhook to receive audit logs from a Kubernetes cluster | yes | no
2525
[Loki](/data_sources/loki.md) | read logs from loki | yes | yes
2626
[syslog service](/data_sources/syslog_service.md) | read logs received via syslog protocol | yes | no
27-
[Windows Event](/data_sources/windows_event_log.md)| read logs from windows event log | yes | no
27+
[Windows Event](/data_sources/windows_event_log.md)| read logs from windows event log | yes | yes
2828

2929
## Common configuration parameters
3030

crowdsec-docs/docs/data_sources/windows_event_log.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,51 @@ You can refer to the Windows documentation for more informations: https://docs.m
6565

6666
Pretty name to use for the datasource in the metrics (`cscli metrics`).
6767

68-
This parameter is optional, but strongly recommanded, as by default the full xpath query will be displayed in the metrics, which can be hard to read.
68+
This parameter is optional, but strongly recommanded, as by default the full xpath query will be displayed in the metrics, which can be hard to read.
69+
70+
## DSN and command-line
71+
72+
This module supports acquisition directly from the command line, to replay content from event files.
73+
74+
A single wineventlog URI is accepted with the `-dsn` parameter:
75+
76+
```bash
77+
crowdsec -type sysmon -dsn wineventlog://C:\\path\\to\\file.evtx
78+
```
79+
80+
### Supported parameters
81+
82+
#### `log_level`
83+
84+
Change the log level for the acquisition:
85+
86+
```bash
87+
crowdsec -type sysmon -dsn wineventlog://C:\\path\\to\\file.evtx?log_level=debug
88+
```
89+
90+
#### `event_id`
91+
92+
Only process events with this ID.
93+
94+
This parameter can be specified multiple times to filter on multiple IDs.
95+
96+
```bash
97+
crowdsec -type sysmon -dsn wineventlog://C:\\path\\to\\file.evtx?event_id=1&event_id=2
98+
```
99+
100+
#### `event_level`
101+
102+
Only process events with this level.
103+
104+
Must be a number between 0 and 5.
105+
106+
The mapping between the number and the textual representation of the level is:
107+
108+
Text | Number
109+
------|-----------
110+
INFORMATION | 0
111+
CRITICAL | 1
112+
ERROR | 2
113+
WARNING | 3
114+
INFORMATION | 4
115+
VERBOSE | 5

0 commit comments

Comments
 (0)