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 fa12d55 commit bebc6ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infrastructure/monitoring/logstash/logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ filter {
# Docker's GELF driver want's to write into a field named
# 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
rename => {"[host]" => "[host][name]"}
}

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

0 comments on commit bebc6ec

Please sign in to comment.