Skip to content
On this page

InfluxDB Line Protocol


GreptimeDB supports HTTP InfluxDB Line protocol. You can write data via /influxdb/write API:

curl -i -XPOST "http://localhost:4000/v1/influxdb/write?db=public&precision=ms" \
--data-binary \
'monitor,host= cpu=0.1,memory=0.4 1667446797450
 monitor,host= cpu=0.2,memory=0.3 1667446798450
 monitor,host= cpu=0.5,memory=0.2 1667446798450'

The /influxdb/write supports query params including:

  • db specify which db to write, public by default.
  • precision, precision of timestamps in the line protocol. Accepts ns (nanoseconds), us(microseconds), ms (milliseconds) and s (seconds), nanoseconds by default.

You can also omit the timestamp when sending requests. GreptimeDB will use the current system time (in UTC) of the host machine as the timestamp. For example:

curl -i -XPOST "http://localhost:4000/v1/influxdb/write?db=public&precision=ms" \
--data-binary \
'monitor,host= cpu=0.1,memory=0.4
 monitor,host= cpu=0.2,memory=0.3
 monitor,host= cpu=0.5,memory=0.2'


InfluxDB Line protocol