创建数据库
curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE testdb"
写数据到数据库
curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
批量写入
output.txt
nginx_second,tag=ip169 value=21 1592638800000000000
nginx_second,tag=ip169 value=32 1592638801000000000
nginx_second,tag=ip169 value=20 1592638802000000000
nginx_second,tag=ip169 value=11 1592638803000000000
curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary @output.txt