Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Platform Logs: rename identity as identity_name when the value is a string #33654

Merged
merged 7 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]
- Fix splitting array of strings/arrays in httpjson input {issue}30345[30345] {pull}33609[33609]
- Fix Google workspace pagination and document ID generation. {pull}33666[33666]
- Fix PANW handling of messages with event.original already set. {issue}33829[33829] {pull}33830[33830]
- Rename identity as identity_name when the value is a string in Azure Platform Logs. {pull}33654[33654]

*Heartbeat*
- Fix broken zip URL monitors. NOTE: Zip URL Monitors will be removed in version 8.7 and replaced with project monitors. {pull}33723[33723]
Expand Down
10 changes: 10 additions & 0 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3001,6 +3001,16 @@ type: keyword
ActivityId


type: keyword

--

*`azure.platformlogs.identity_name`*::
+
--
Identity name


type: keyword

--
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/azure/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions x-pack/filebeat/module/azure/platformlogs/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
type: keyword
description: >
ActivityId
- name: identity_name
type: keyword
description: |
Identity name
- name: properties
type: flattened
description: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ processors:
- json:
field: message
target_field: azure.platformlogs
- rename:
field: azure.platformlogs.identity
target_field: azure.platformlogs.identity_name
ignore_missing: true
description: 'Rename the field to `identity_name` to avoid conflicts with the `identity` containing a JSON object.'
if: "ctx.azure?.platformlogs?.identity instanceof String"
- date:
field: azure.platformlogs.time
target_field: '@timestamp'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Cloud":"AzureCloud","Environment":"prod","category":"kube-audit","ccpNamespace":"5e4bf4baee195b00017cdbfa","identity":"Michael Dell","operationName":"Microsoft.ContainerService/managedClusters/diagnosticLogs/Read","properties":{"log":"{\"kind\":\"Event\"}","pod":"kube-apiserver-666bd4b459-hjgdc"},"resourceId":"/SUBSCRIPTIONS/70BD6E77-4B1E-4835-8896-DB77B8EEF364/RESOURCEGROUPS/OBS-INFRASTRUCTURE/PROVIDERS/MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS/OBSKUBE","time":"2020-11-09T10:57:31.0000000Z"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"@timestamp": "2020-11-09T10:57:31.000Z",
"azure.platformlogs.Cloud": "AzureCloud",
"azure.platformlogs.Environment": "prod",
"azure.platformlogs.category": "kube-audit",
"azure.platformlogs.ccpNamespace": "5e4bf4baee195b00017cdbfa",
"azure.platformlogs.event_category": "Administrative",
"azure.platformlogs.identity_name": "Michael Dell",
"azure.platformlogs.operation_name": "Microsoft.ContainerService/managedClusters/diagnosticLogs/Read",
"azure.platformlogs.properties.log.kind": "Event",
"azure.platformlogs.properties.pod": "kube-apiserver-666bd4b459-hjgdc",
"azure.resource.group": "OBS-INFRASTRUCTURE",
"azure.resource.id": "/SUBSCRIPTIONS/70BD6E77-4B1E-4835-8896-DB77B8EEF364/RESOURCEGROUPS/OBS-INFRASTRUCTURE/PROVIDERS/MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS/OBSKUBE",
"azure.resource.name": "OBSKUBE",
"azure.resource.provider": "MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS",
"azure.subscription_id": "70BD6E77-4B1E-4835-8896-DB77B8EEF364",
"cloud.provider": "azure",
"event.action": "Microsoft.ContainerService/managedClusters/diagnosticLogs/Read",
"event.dataset": "azure.platformlogs",
"event.kind": "event",
"event.module": "azure",
"event.original": "{\"Cloud\":\"AzureCloud\",\"Environment\":\"prod\",\"category\":\"kube-audit\",\"ccpNamespace\":\"5e4bf4baee195b00017cdbfa\",\"identity\":\"Michael Dell\",\"operationName\":\"Microsoft.ContainerService/managedClusters/diagnosticLogs/Read\",\"properties\":{\"log\":\"{\\\"kind\\\":\\\"Event\\\"}\",\"pod\":\"kube-apiserver-666bd4b459-hjgdc\"},\"resourceId\":\"/SUBSCRIPTIONS/70BD6E77-4B1E-4835-8896-DB77B8EEF364/RESOURCEGROUPS/OBS-INFRASTRUCTURE/PROVIDERS/MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS/OBSKUBE\",\"time\":\"2020-11-09T10:57:31.0000000Z\"}",
"fileset.name": "platformlogs",
"input.type": "log",
"log.offset": 0,
"service.type": "azure",
"tags": [
"forwarded"
]
}
]