Skip to content

Commit 1ef1e72

Browse files
committed
Refactor Office 365 filter (v2.0.0) by simplifying the structure.
1 parent 30dc115 commit 1ef1e72

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

filters/office365/o365-all.conf

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
filter {
2-
if [logx][type] and [logx][type] == "o365" {
2+
3+
# Office 365 version 2.0.0
4+
5+
json {
6+
source => "message"
7+
}
8+
9+
if ([dataType] == "o365") {
10+
311
mutate {
4-
add_field => {
5-
"dataType" => "o365"
6-
}
7-
add_field => {
8-
"dataSource" => "o365"
9-
}
12+
rename => {"[logx][tenant]" => "[logx][o365][tenant]"}
1013
}
1114

1215
mutate {
13-
remove_field => ["headers", "[logx][type]", "@version", "global", "es_metadata_id"]
16+
remove_field => ["headers", "@version", "global"]
1417
}
15-
1618
}
1719
}

0 commit comments

Comments
 (0)