InfluxDB中Line Protocol理解

  • Line Protocol

    直译”行协议“,InfluxDB的行协议是一种写入数据点到InfluxDB的文本格式。必须要是这样的格式的数据点才能被InfluxDB解析和写入成功。

    weather,location=us-midwest temperature=82 1465839830100400200
      |    -------------------- --------------  |
      |             |             |             |
      |             |             |             |
    +-----------+--------+-+---------+-+---------+
    |measurement|,tag_set| |field_set| |timestamp|
    +-----------+--------+-+---------+-+---------+
    

    中间的两边没有空格,每个空格都严格具有意义。

    tag_set可以省略。

    measurementtag_settimestamp唯一定义一个point,如果重复插入以后来为准。

  • 插入数据

    InfluxDB中两种插入数据的方法:clihttp api,需要插入的数据格式都需要是Line Protocol

  • Reference

  1. InfluxDB line protocol tutorial
  2. 中文手册:行协议
发布了871 篇原创文章 · 获赞 1322 · 访问量 97万+

猜你喜欢

转载自blog.csdn.net/The_Time_Runner/article/details/105610683