Iniciar sesión

Event categorization

14 min · 2 ejercicio(s)

Four fields describe what kind of event a document is, independent of the product that produced it. Their values come from a fixed list, so they work across all sources:

Field Question it answers Allowed values (selection)
event.kind What type of information? event, alert, metric, state, signal
event.category Which big bucket? authentication, process, network, file, web, malware, iam, intrusion_detection, …
event.type What sub-type? start, end, connection, creation, deletion, access, allowed, denied, …
event.outcome Did it work? success, failure, unknown

A failed SSH logon is category: authentication, type: start, outcome: failure, whether it comes from sshd, Windows or a VPN appliance. A process start is category: process, type: start.

Why this is powerful

With categorization you can ask questions about all your data without knowing every source:

FROM lab-auth, lab-endpoint, lab-web
| STATS events = COUNT(*) BY event.category
| SORT events DESC
event.category: authentication and event.outcome: failure

event.action, event.dataset, event.module

Next to the four fixed fields there are free-text fields:

  • event.action: the source's own name for the action, e.g. logon, process_started, file_deleted.
  • event.dataset: which data set the event belongs to, e.g. lab.auth, nginx.access.
  • event.module: the integration or module that collected it.

Use the categorization fields for broad questions and detection logic, event.action when you need the exact source event.

Categorization drives EQL

EQL's event category (process where …, file where …) is read from event.category. That's ECS at work: the EQL track's queries ran because the lab data is categorized correctly.

🔎 Profundiza: funciones, errores habituales y práctica

Valid combinations

Not every event.type makes sense with every category. The ECS reference lists the expected types per category, e.g. process → start, end, info, change; file → creation, deletion, change, access. Stick to the list: the Security app's views and many rules filter on these combinations.

event.kind: signal and alert

Detection engines write their findings as documents too. An alert from an EDR has event.kind: alert, an alert generated by the Elastic detection engine has event.kind: signal. Filtering on event.kind: event keeps raw telemetry and leaves alerts out.

event.outcome is not severity

event.outcome: failure means the action did not succeed. It does not mean "bad". A blocked malware execution is a failure of the malware and a success of your defences. For severity use event.severity or the alert's own fields.

Ejercicios prácticos de esta lección

Resuelve estos ejercicios con una consulta en el laboratorio Elasticsearch real. Inicia sesión gratis para acceder al laboratorio, las pistas y la corrección automática.

  1. 1. Categorize a failed logon

    These raw lines are failed SSH logons:

    Mar 11 02:14:03 srv-web-01 sshd[2211]: Failed password for root from 185.220.101.47 port 51234 ssh2

    Set the four ECS categorization fields event.kind, event.category, event.type and event.outcome. One line per field, e.g. event.kind = ….

  2. 2. Categorize web requests

    Categorize the nginx access lines:

    85.129.181.102 - - [09/Mar/2026:06:21:05 +0000] "GET /cart HTTP/1.1" 200 30665 "-" "Mozilla/5.0 …"

    Set event.kind, event.category and event.type (the outcome depends on the status code and is set elsewhere).