Practice: from raw log to ECS
12 min · 2 ejercicio(s)
Cheat sheet
| Step | ES|QL | Ingest pipeline |
|---|---|---|
| Fixed format | DISSECT message "…" |
dissect processor |
| Variable format | GROK message "…" |
grok processor |
| key=value | DISSECT with every key |
kv processor |
| Rename to ECS | RENAME src AS source.ip |
rename processor |
| Fix types | TO_IP(), TO_INTEGER() |
convert processor |
| Categorize | EVAL event.category = "network" |
set processor |
The firewall log, mapped
| Firewall key | ECS field |
|---|---|
SRC |
source.ip |
DST |
destination.ip |
SPT, DPT |
source.port, destination.port |
PROTO |
network.transport (lowercase: tcp) |
[FW-ALLOW], [FW-BLOCK] |
event.type: allowed / denied, event.action |
IN, OUT |
observer.ingress.interface.name, observer.egress.interface.name |
The firewall itself is the observer: ECS uses observer.* for devices that see traffic without being one of its ends.