update logstash input

main
ycz008 2024-02-23 10:56:13 +08:00
parent f5df8aa922
commit 1c30d049be
1 changed files with 8 additions and 4 deletions

View File

@ -5,8 +5,12 @@ metadata:
data:
logstash.conf: |-
input {
beats {
port => 5044
kafka{
bootstrap_servers => "10.2.0.12:30002,10.2.0.12:30003,10.2.0.12:30004"
topics => ["nginx-dev"]
group_id => "logstash-ngx"
auto_offset_reset => "earliest"
codec => json
}
}
@ -16,8 +20,8 @@ data:
target => "@timestamp"
}
mutate {
add_field => { "env" => "%{[tags][0]}" }
remove_field => [ "tags" ]
add_field => { "env" => "%{[fields][env]}" }
remove_field => [ "fields" ]
}
}