Type conflict because no type info of value in JSON output


  files = ["stdout"]
#  data_format = "influx" or 
  data_format = "json"

In case that data format is “influx”,

system,host=test2 load5=0,load15=0,n_cpus=1i,n_users=2i,load1=0 1547617860000000000

In case that data format is “json”,


As above result of “influx” output, we can know whether each value is integer or float. But “json” output, we don’t know because there is no info of type of each value.

We’d like to insert dynamically additional data thru tHTTP gateway with metric collected by telegraf. Service flow is as follow

  1. Teletgraf -> (JSON format via HTTP) -> HTTP G/W (transform JSON format into Influx format by lua script) -> (influx line protocol format via HTTP) -> InfluxDB

If using influx format as http output, there is no problem. But need more coding to parse the influx line protocol format.
For easy coding, we’d like to utilize JSON format.

Is there any way to describe the type of value in JSON result or other easy way?