Hello,
we have logfiles with a timestamp like "yyyyMMddHHmmss" with Europe/Berlin Timezone.
This files were sent via FileBeat=>Logstash=>ES.
Now we changed timezone in our Logstash config.
Now the timestamp in ES is correct.
But we create a new Index for each day and now there is a difference.
One short example:
timestamp: 20170401012200 => data will logged into index "log-2017.03.31", but we want the data in "log-2017.04.01"
our configs:
input {
beats {
port => "5044"
host => "0.0.0.0"
}
}
filter {
mutate {
add_field => {
"shop ID" => "%{[message][0]}"
"tpTimestamp" => "%{[message][1]}"
}
date {
match => ["tpTimestamp", "yyyyMMddHHmmss"]
timezone => "Europe/Berlin"
target => "@timestamp"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "actionlog-%{+YYYY.MM.dd}"
}
}
}
Can somebody help us, how to get the right indexname with correct times?
Thanks in advance!