Skip to content

Commit

Permalink
fix: mutate logstash host to object before sending it to elastic
Browse files Browse the repository at this point in the history
  • Loading branch information
makelicious committed Sep 5, 2024
1 parent aa84a6c commit 4475f46
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions infrastructure/monitoring/logstash/logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ filter {
# container_id, but Kibana and other tools read from container.id by default
rename => {"container_id" => "container.id"}
}
# As of V8, Elasticsearch JSON logs now comply with ECS. [host] becomes object
mutate {
rename {
"[host]" => "[host][name]"
}
}

truncate {
length_bytes => 12
fields => ["container.id"]
Expand Down

0 comments on commit 4475f46

Please sign in to comment.