You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `hub_spec`: which Hub items to install (collections/parsers/scenarios, etc.). Unknown item types are preserved and passed through.
38
-
- `acquisition_spec`: how to generate a per‐service acquisition file:
39
-
- `filename`: base name (no slashes). The actual path will be `acquis.d/setup.<filename>.yaml`.
40
-
- `datasource`: a map validated against the selected `source` (e.g., `file`, `journalctl`, `docker`, `wineventlog`, `cloudwatch`, `kinesis`, …). Required fields vary per source; the CLI validates them for you.
82
+
The content of `datasource` will be validated (syntax, required fields depending on the datasource configured) and be written as-is to the file.
41
83
42
-
Examples
84
+
## Examples
43
85
44
86
Basic OS / Hub only:
45
87
@@ -49,7 +91,8 @@ detect:
49
91
when:
50
92
- Host.OS == "linux"
51
93
hub_spec:
52
-
collections: [crowdsecurity/linux]
94
+
collections:
95
+
- crowdsecurity/linux
53
96
```
54
97
55
98
`journalctl` source with a filter:
@@ -61,12 +104,14 @@ detect:
61
104
- Systemd.UnitInstalled("caddy.service")
62
105
- len(Path.Glob("/var/log/caddy/*.log")) == 0
63
106
hub_spec:
64
-
collections: [crowdsecurity/caddy]
107
+
collections:
108
+
- crowdsecurity/caddy
65
109
acquisition_spec:
66
110
filename: caddy.yaml
67
111
datasource:
68
112
source: journalctl
69
-
labels: {type: caddy}
113
+
labels:
114
+
type: caddy
70
115
journalctl_filter:
71
116
- "_SYSTEMD_UNIT=caddy.service"
72
117
```
@@ -76,45 +121,22 @@ Windows event log:
76
121
```yaml
77
122
detect:
78
123
windows_auth:
79
-
when: [ Host.OS == "windows" ]
124
+
when:
125
+
- Host.OS == "windows"
80
126
hub_spec:
81
-
collections: [crowdsecurity/windows]
127
+
collections:
128
+
- crowdsecurity/windows
82
129
acquisition_spec:
83
130
filename: windows_auth.yaml
84
131
datasource:
85
132
source: wineventlog
86
133
event_channel: Security
87
-
event_ids: [4625, 4623]
134
+
event_ids:
135
+
- 4625
136
+
- 4623
88
137
event_level: information
89
-
labels: {type: eventlog}
138
+
labels:
139
+
type: eventlog
90
140
```
91
141
92
142
93
-
## Expression Helpers Reference
94
-
95
-
Expressions run against an environment that exposes helpers and facts via these names:
96
-
97
-
- Host — host facts from gopsutil/host.InfoStat. See https://pkg.go.dev/github.com/shirou/gopsutil/host#InfoStat
0 commit comments