Telegraf [inputs.tail] not picking up Field as Float



Im using Input.tail to follow a json file. Everything works fine but i cannot seem to get the one of the field as a float.

I can specify using the json_string_fields but then it would store the value as a string which i do not want.

Highlighted is the field that i want to store as a float type but seems like teelgraf is not importing it into influx db at all.

When specified within json_string_fields , it works but it stores as a string.

json_string_fields = [“Session”]


files to tail.

These accept standard unix glob matching rules, but with the addition of

** as a “super asterisk”. ie:

“/var/log/**.log” -> recursively find all .log files in /var/log

“/var/log//.log” -> find all .log files with a parent dir in /var/log

“/var/log/apache.log” -> just tail the apache log file

See for more examples

files = [“D:/Logs/Apps/StatisticsGateway/Statistics.Performance.json”]

Read file from beginning.

from_beginning = false

Whether file is a named pipe

pipe = false

Method used to watch for file updates. Can be either “inotify” or “poll”.

watch_method = “poll”

Data format to consume.

Each data format has its own unique set of configuration options, read

more about them here:

data_format = “json”
tag_keys = [“UserName”,“MetricName”,“MetricUnit”,“logger”]
json_string_fields = [“Session”]


You can add a processor for this:

    float = ["Session"]

nice one worked . Config as below for converter