Hi everyone,
I add three fields: day,month,year to adjust my index time.
But I want to remove these three fields.
How can I do .
input {
stdin { }
}
filter {
grok {
match => { "message" => '%{SYSLOGTIMESTAMP} %{IPV4:iphost} date=%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{GREEDYDATA:fgtlogmsg}'
}
match => { "message" => '<%{NONNEGINT:syslog_pri}>date=%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{GREEDYDATA:fgtlogmsg}'
}
}
kv {
source => "fgtlogmsg"
remove_field => ["fgtlogmsg"]
}
syslog_pri { }
if "_grokparsefailure" in [tags] {
drop { }
}
}
output {
elasticsearch {
codec => "json"
hosts => ["127.0.0.1:9200"]
index => "logstash-%{year}-%{month}-%{day}"
}
stdout { codec => rubydebug }
}
thank you in advance : )