[azure logs] Make routing.category field available to pipelines#16610
[azure logs] Make routing.category field available to pipelines#16610
Conversation
Now the `logs-azure.events@custom` pipeline can use the
`routing.category` field to optionally override the routing.
Here's a simple example:
```
PUT _ingest/pipeline/logs-azure.events@custom
{
"processors": [
{
"set": {
"field": "event.dataset",
"value": "azure.whatever",
"if": "ctx.routing?.category == \"Whatever\""
}
}
]
}
```
🚀 Benchmarks reportTo see the full report comment with |
| description: "Parses the message field as JSON and stores it in a temporary field to identify the event dataset." | ||
|
|
||
| - rename: | ||
| field: tmp_json.category |
There was a problem hiding this comment.
Do we need to consider CategoryValue, category, Catetory?
There was a problem hiding this comment.
Yeah, this pipeline is the entry point for all integrations, so it must take into account all the existing variation of fields containing the category name.
We currently cover:
categoryCategoryCategoryValue
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
|
Note for reviewers: I think the |
packages/azure/data_stream/events/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
💚 Build Succeeded
History
cc @zmoog |
|
Package azure - 1.33.0 containing this change is available at https://epr.elastic.co/package/azure/1.33.0/ |
Proposed commit message
Support for custom log event routing in the Azure Logs v2 integration.
The Azure Logs v2 default pipeline now extracts the
routing.categoryfield from the log event and makes it available to custom pipelines, allowing users to apply custom routing logic.For example,
SQLSecurityAuditEventswould normally be routed to theazure.platformlogsdataset because Synapse log events are not yet supported natively.By creating the
logs-azure.events@custompipeline with the following content:Users can now route these events to a dedicated
azure.synapsedataset, or an existing dataset, likeazure.activitylogs.Checklist
changelog.ymlfile.I have verified that Kibana version constraints are current according to guidelines.I have verified that any added dashboard complies with Kibana's Dashboard good practicesHow to test this PR locally
Define the
logs-azure.events@customwith custom routing logic:Send a sample log event:
Search for the results:
Results
{ "took": 1, "timed_out": false, "_shards": { "total": 1, "successful": 1, "skipped": 0, "failed": 0 }, "hits": { "total": { "value": 1, "relation": "eq" }, "max_score": 1, "hits": [ { "_index": ".ds-logs-azure.synapse-default-2025.12.18-000001", "_id": "AZswXwsnopg1bPjToWtL", "_score": 1, "_source": { "@timestamp": "2025-12-17T06:15:26.000Z", "data_stream": { "dataset": "azure.synapse", "namespace": "default", "type": "logs" }, "ecs": { "version": "8.11.0" }, "event": { "dataset": "azure.synapse", "kind": "event" }, "message": """{"category":"SQLSecurityAuditEvents"}""", "routing": { "category": "SQLSecurityAuditEvents" } } } ] } }Related issues
Screenshots
Documentation: