I am using filebeat -> logstash -> elasticsearch.
I am trying to harvest a log file that uses timestamps in the machine's local timezone, but without any explicit indication of what the timezone is. Example:
[2018-01-26 13:31:21.331]...
My servers are in many different timezones, so I need to normalize these times. I think the new add_locale processor is supposed to help with this by adding the machine's timezone into the output. But, the timezone is always reported as "+00:00" in the output.
My filebeat config includes:
processors:
- add_locale: ~
Here is an example rubydebug output from logstash:
"@timestamp" => 2018-01-26T19:33:30.733Z,
"offset" => 9195,
"@version" => "1",
"format" => "...",
"beat" => {
"name" => "...",
"hostname" => "...",
"version" => "6.1.2",
"timezone" => "+00:00"
},
"host" => "...",
"prospector" => {
"type" => "log"
},
"source" => "...",
"message" => "[2018-01-26 13:33:22.064]...",
"tags" => [
[0] "beats_input_codec_plain_applied",
[1] "_grokparsefailure"
]
The system reports the correct timezone from the date command:
$ date +'%Z %z'
CST -0600
Am I doing this right? By what means does add_locale determine the timezone of the machine?