Practice: wildcards, ranges and networks
14 min · 2 ejercicio(s)
Cheat sheet
| You want | KQL |
|---|---|
| Starts with | process.parent.name: WINWORD* |
| Field exists | file.path: * |
| Numeric range | http.response.body.bytes > 50000 |
| Inclusive range | http.response.status_code >= 500 |
| Date window | @timestamp >= "2026-03-11T02:00:00Z" and @timestamp < "2026-03-11T03:00:00Z" |
| IP network (CIDR) | source.ip: 10.10.0.0/16 |
| Windows path | file.path: C\:\\Windows\\Temp\\* |
Escaping
In KQL these characters are special: \ ( ) : < > " *. Escape them with a backslash when they are part of the value. A Windows path therefore needs double backslashes and an escaped colon: C\:\\Users\\*.
Dates
Use ISO 8601 with a time zone (Z for UTC). Without a zone, Kibana uses the browser time zone, which makes shared queries ambiguous. Prefer half-open windows (>= start, < end) so events exactly on the boundary are not counted twice.
Performance
Leading wildcards (*powershell) are expensive on large indices and are disabled in many clusters. Prefer a trailing wildcard, a wildcard field type, or ES|QL string functions.