Skip to content

Commit

Permalink
fix logic for handling Azure logs
Browse files Browse the repository at this point in the history
  • Loading branch information
philhagen committed Apr 6, 2021
1 parent 27fbf72 commit aa15ce3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions configfiles/6801-azure.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ filter {

### Azure SignIn Logs, in JSON format
# https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-sign-ins-log-schema
else if [raw][category] == "SignInLogs" or [raw][category] == "ManagedIdentitySignInLogs" or [raw][category] == "NonInteractiveUserSignInLogs" {
if [raw][category] == "SignInLogs" or [raw][category] == "ManagedIdentitySignInLogs" or [raw][category] == "NonInteractiveUserSignInLogs" {
date {
match => [ "[raw][time]", "ISO8601" ]
}
Expand Down Expand Up @@ -104,7 +104,7 @@ filter {

### Azure Audit Logs, in JSON format
# https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-audit-log-schema
else if [raw][category] == "AuditLogs" or [raw][category] == "Audit" {
if [raw][category] == "AuditLogs" or [raw][category] == "Audit" {
date {
match => [ "[raw][time]", "ISO8601" ]
}
Expand Down Expand Up @@ -144,7 +144,7 @@ filter {

### Azure Activity Logs, in JSON format
# https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-audit-log-schema
else if [raw][category] == "Administrative" {
if [raw][category] == "Administrative" {
date {
match => [ "[raw][time]", "ISO8601" ]
}
Expand Down Expand Up @@ -176,7 +176,7 @@ filter {

### Azure Storage Logs, in JSON foramt
# https://docs.microsoft.com/en-us/azure/storage/blobs/monitor-blob-storage-reference
else if [raw][category] == "StorageRead" {
if [raw][category] == "StorageRead" {
date {
match => [ "[raw][time]", "ISO8601" ]
}
Expand Down Expand Up @@ -214,8 +214,8 @@ filter {
}
}
# drop the rest - any unhandled log entries results in a current time stamp on the unparsed record
else if [raw][category] or [raw][System][Provider][Name] {
if [raw][category] or [raw][System][Provider][Name] {
drop {}
}
}
}
}
1 change: 1 addition & 0 deletions configfiles/9999-output-stdout.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
output {
# stdout {
# codec => rubydebug
# codec => json
# }
}

0 comments on commit aa15ce3

Please sign in to comment.