-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.17](backport #33654) Azure Platform Logs: rename identity as ident…
…ity_name when the value is a string (#33957) * Azure Platform Logs: rename identity as identity_name when the value is a string (#33654) * Rename identity as identity_name when is a string The identity field comes in different flavors, depending on the specific log category. If it comes as a string, the pipeline renames it as identity_name to avoid collisions when the value is an object. (cherry picked from commit ea9b0cb) # Conflicts: # x-pack/filebeat/module/azure/fields.go * Remove extra entries in changelog * Update fields.go * Remove extra entries in changelog Co-authored-by: Maurizio Branca <[email protected]> Co-authored-by: Maurizio Branca <[email protected]>
- Loading branch information
1 parent
505cd00
commit 8edcc0b
Showing
7 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
x-pack/filebeat/module/azure/platformlogs/test/platformlogs-identity-raw.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
32 changes: 32 additions & 0 deletions
32
x-pack/filebeat/module/azure/platformlogs/test/platformlogs-identity-raw.log-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
] |