ruby section of my config file is like below. this works fine. i set the "timeid" and i mailed to me in body section. But it sends as a UTC time value. my timezone is UTC +3. can i change it ? logstash settings file or anywhere else ?
Switch says that:
Host: 192.168.1.1
Zaman: 27 December 2016 13:14:21.113
Info: <187>122013: 0.0.0.0: Dec 27 16:14:21.216: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/41, changed state to down
when i used date filter , output is not human readable. and i could nout manipulate it.
output like that
first "zaman" value derived from rubycode and second one derived from timestamp value.
second "zaman" value in config file like this.
date
{
match => ["@timestamp","ISO8601"]
timezone => "Europe/Istanbul"
}
For example for above output my server time was "Thu Dec 29 17:59:30 +03 2016"
but "@timestamp" and "timeid" value was 2016-12-28T14:59:30.012Z and 28 December 2016 14:59:30.012
it seems that date filter cannot change the timezone value.
or i misunderstanded date filter manipulation. i expect that when i change timezone by using date filter, @timestamp value should be updated that timezone.
or i misunderstanded date filter manipulation. i expect that when i change timezone by using date filter, @timestamp value should be updated that timezone.
No. The result of the date filter is always a UTC timestamp. The timezone option changes how the source timestamp (that is to be parsed) is interpreted.
Why do you care about the stored representation of the timestamp? Formatting the timestamp for human consumption (including timezone selection) belongs in the presentation layer, not in the database.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.