Read all the issues that have been fixed. Read the Timezone source code. Have done tons of diligence to try and figure this out. But just cannot seem to get my head around a timezone issue.
Remote system is run by partner company. They are obtuse, unable to modify their systems and deathly afraid of installing software because of security. So a decision was made to forward their logs using rsyslog, and then we would parse and format those logs on a fluentd we have in front of our elasticsearch cluster.
Their system is in PST timezone. And sending the data over rfc3164 format.
<190>May 14 16:55:34 xxxxxx tracker ....
There is no + or - in the date time field. There is a later date time field that has 2017-05-14T23:55:28.955+0000, here the timezone is incorrectly stated as +0000, when the machine is running in PST. But none of that matters, it is the first date time field that is used by Fluentd.
The machine running the fluentd process is running in UTC. So it, of course converts the message, and forwards to elasticsearch, representing the PST time as UTC.
We are using version 14.12 (google-fluentd), and we are using the syslog input and the elasticsearch output. We are using the stdout and file outputs for testing our timezone changes as well.
So far in this configuration adding a timezone field to syslog input, elasticsearch output or stdout output does nothing. It is like the field is getting ignored. I have set it to wild values, valid values, invalid values, it does nothing.
Using localtime true or localtime false, also does nothing.
Using utc anywhere, results in a confusing error that localtime is already being used, and you cannot specify utc.
Why does timezone field not work?
Any better ways to debug this problem?
Changing timezone for the entire process seems incorrect. We have a number of people pushing logs to this process. I guess I could split these off to their own port and create a new process, but that is a lot of systemd stuff that I am trying to avoid.
<source>
@type syslog
tag system
port 5140
timezone -07:00
</source>
<match *>
@type copy
<store>
@type elasticsearch
logstash_format true
host localhost
port 9200
logstash_prefix quincy-brad
index_name quincy-brad
# localtime true
# utc true
# timezone -0700
flush_interval 5s #for testing
</store>
<store>
# localtime true
# utc true
# timezone -07:00
@type stdout
# format json
</store>
</match>