Conversion Properties must be entered for each Data Injection and provide an easy way to transform an incoming JSON into InfluxDB properties. If you create a Data Injection, the input field contains the format to be used:

The base format is <key>=<value>. The value part can be a static value or a JSON Path to extract the value out of the incoming JSON. See here how to use JSON Path.

Measurement

Data is stored under a Measurement in InfluxDB. This can be any string and is mandatory:

measurement=Revenue

or with a JSON Path to get the value from the input JSON:

measurement=$.host.name

Timestamp

Each data point must have a timestamp. To use the time of receiving the message, use automatic:

timestamp=automatic

or use JSON Path to get it from the input JSON:

timestamp=$.host.eventtime

Tags

A data point can be tagged. A tag has a name and a value which is a string. You can specify multiple tags. The key starts with tag. followed by the tag name.

tag.source=Production

or use JSON Path to get it from the input JSON:

tag.customer=$.customerid

Fields

Fields contain the real data. For each field, you have to specify 2 lines, one for the type, and one for the value.

Type

InfluxDB has fixed types which are boolean, string, integer, long, and float:

field.total.type=float

Conversion between types takes place automatically. So your input can be a string and is converted to a float if you specify so.

Value

The field value can be a static value:

field.isvalid.value=true

or use JSON Path to get it from the input JSON:

field.total.value=$.total