Skip to content

Commit

Permalink
updated filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Duplo-Yashwant committed Nov 28, 2024
1 parent 5cced8a commit 4c47b82
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions diagnostics/opensearch/logstash/logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,32 @@ input {
}

filter {
json {
source => "message"
remove_field => ["message"]
}
split {
field => "records"
}
json {
source => "message"
remove_field => ["message"]
}

split {
field => "[records]"
}

date {
match => ["[records][time]", "MM/dd/yyyy HH:mm:ss"]
target => "@timestamp"
}

mutate {
remove_field => ["[records][time]"]
}

mutate {
remove_field => ["event.original"]
}
}

output {
opensearch {
hosts => ["${OPENSEARCH_HOST}:9200"]
index => "logstash-eventhub-%{+YYYY.MM.dd}"
}
opensearch {
hosts => ["${OPENSEARCH_HOST}:9200"]
index => "logstash-eventhub-%{+YYYY.MM.dd}"
}
}

0 comments on commit 4c47b82

Please sign in to comment.