Stdout timestamp in logstash


(Lee) #1

Hi

I would like to know about the timestamp for the logstash output

simple conf file

input { stdin {}}
output {
stdout { codec => rubydebug }

}

[lee@server1 logstash-1.5.0]$ bin/logstash -f logstash-simple.conf
Logstash startup completed
ACCESS
{
"message" => "ACCESS",
"@version" => "1",
"@timestamp" => "2015-06-29T13:10:55.276Z",
"host" => "server1.corp.com"
}

I would like to know about this timestamp value

My server date and time
Mon Jun 29 15:10:55 CEST 2015
In timestamp
2015-06-29T13:10:55.276Z

The actual server time was 2015-06-2915:10 but in my output i could see the timestamp value is 2hrs behind. if i need to get my server timestamp. where i need to check and change .

Could anyone please suggest on this

Regards
lee


(Magnus Bäck) #2

The @timestamp field is in UTC, as you can see from the "Z" suffix. Since you're apparently in UTC+2 the two-hour difference is expected.


(Lee) #3

Ok .Thank you for the quick reply

is there anyway i can display @timestamp field same as my servertime value?


(Magnus Bäck) #4

That's up to your display layer. Kibana does this for you automatically based on the browser's timezone. The @timestamp field itself is by definition UTC.


(system) #5