Timezone issue DHT11 sensor

Hi everyone,

I am a network specialist and my work consist of configuring switches and firewalls to allows communication between two endpoints. Now, I am playing with Elastic stack and I like it as it may help me to analyse logs in a more efficient way. I am able to gather my DHT11 sensors that gave me temperature and humidity.

...
2019-12-23 17:40:02 Temp=18.0C Humidity=39.0%
2019-12-23 17:41:02 Temp=18.0C Humidity=39.0%
2019-12-23 17:42:01 Temp=18.0C Humidity=39.0%
2019-12-23 17:43:01 Temp=18.0C Humidity=39.0%

and my logstash configuration is able to put those data in Elasticsearch but when Kibana shows the time 5 hours earlier. The picture show I search for "capture_time:"2019-12-23 17:43:01" and Kinaba showed the search result: capture_time: December 23rd 2019, 12:43:01.000

The Elasticsearch, Logstash and Kibana is on the same server with Estern time. How can I correct this issue?

input {

file {

path => "/usr/share/logstash/weather.txt"
start_position => "beginning"
sincedb_path => "/dev/null"
}

}

filter {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:capture_time} Temp=%{NUMBER:temperature}C Humidity=%{NUMBER:humidity}%"}

}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "dht11"
document_type => sensors
}
stdout { codec => rubydebug }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.