Hi all
I have log files that contain no timezone information. Local time is GMT+2. I see that you can specify a timezone option so that presumably, data will be loaded into InfluxDB with UTC. My attempts result in
2017/07/14 10:51:00 I! Using config file: /etc/telegraf/telegraf.conf
2017/07/14 10:51:00 E! Error parsing /etc/telegraf/telegraf.conf, line 2520: field corresponding to timezone' is not defined in
*grok.Parser’
Relevant config is
patterns = [’’’%{TIMESTAMP_ISO8601:timestamp:ts-“2006-01-02 15:04:05”}.*function=%{WORD:function_name:tag}.*Dur=%{NUMBER:duration:int}.*BackendSuccess=%{WORD:outcome:tag};}’’’]
## Name of the outputted measurement name.
measurement = "xyz"
## Full path(s) to custom pattern files.
custom_pattern_files = []
## Custom patterns can also be defined here. Put one pattern per line.
custom_patterns = '''
'''
## Timezone allows you to provide an override for timestamps that
## don't already include an offset
## e.g. 04/06/2016 12:41:45 data one two 5.43µs
##
## Default: "" which renders UTC
## Options are as follows:
## 1. Local -- interpret based on machine localtime
## 2. "Canada/Eastern" -- Unix TZ values like those found in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
## 3. UTC -- or blank/unspecified, will return timestamp in UTC
timezone = "Africa/Johannesburg"
The documentation is a little sparse - what am I doing wrong?