Yes it's possible.
Parse with grok/dissect then use the date plugin.
date {
match => ["timestamp", "ISO8601"]
timezone => "Asia/Dubai" # set your own accoding to Joda time https://joda-time.sourceforge.net/timezones.html
target=> "@timestamp" # or any other field
}
If not receive time as @timestamp as a field, LS will take the host local time for @timestamp.
Since you are receiving as a part of log messages, you will parse and with the date plugin you will overwrite @timestamp with the log time. Like above.
If you not receive as the part of message or you don't want to use then set @timestamp to another time zone or hardcoded TZ- actually offset, like you suggested +5:30. Be aware, the hard coded value doesn't take in account daylight saving time.
if ![timestamp] { # if timestamp field does not exist
mutate { # maybe you will need to convert string
convert => { "@timestamp" => "string"}
}
date {
match => ["@timestamp", "ISO8601"]
timezone => "Asia/Dubai"
}
}
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.