- Modification to JSON input plugin to provide offset based timestamps
- This modification allows timestamp to be calculated using an offset value relative to the timestamp at time of processing
- To configure, set json_time_format to value “offset”. Once set values, content of the json_time_key are expected to contain an offset value. Offset can be any valid go time.Duration format accepted by parseDuraton, e.g. “-100s”. Example config for telegraf.conf:
data_format = "json"
json_time_key = "timestamp"
json_time_format = "offset"
docker pull golang:1.16.6-buster
git clone https://github.com/webx007/telegraf.git
# create new local branch of v1.19.2 release
git checkout -b mytelegraf v1.19.2
create/edit docker_build.env file with build settings in the root of the telegraf src folder.
from telegraf src directory run:
mkdir ../gopkg
docker run -it -v "$PWD":/usr/src/myapp -v "$PWD"/../gopkg:/go/pkg --env-file docker_build.env -w /usr/src/myapp golang:1.16 make