Skip to content

Allow logging in local timezone #3462

@bortek

Description

@bortek

For some reason the timestamp in the "/var/log/telegraf.log" is UTC instead of my local timezone

2017-11-11T09:32:04Z E! Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
2017-11-11T09:33:00Z E! InfluxDB Output Error: Post http://192.168.1.200:8086/write?consistency=any&db=telegraf: dial tcp 192.168.1.200:8086: getsockopt: connection ref
used

Relevant telegraf.conf:

debug = false
quiet = false
logfile = "/var/log/telegraf.log"

My /etc/localtime points to the right timezone file ...

/etc/localtime -> /usr/share/zoneinfo/Europe/Stockholm

...so everytihng looks correct but something must be missing?

System info:

uname -a
Linux kl_backside_2 4.4.50 #1 Sun Mar 26 05:10:49 EEST 2017 armv6l GNU/Linux

telegraf -version
Telegraf v1.4.3 (git: release-1.4 b473b6a)

date command output
Sat Nov 11 12:52:25 CET 2017

Metadata

Metadata

Assignees

Labels

area/agentfeature requestRequests for new plugin and for new features to existing pluginshelp wantedRequest for community participation, code, contribution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions