Apache IoTDB 输出插件
此插件将指标写入Apache IoTDB 实例,一个用于物联网的数据库,支持会话连接和数据插入。
引入时间: Telegraf v1.24.0 标签: datastore 操作系统支持: all
入门
在使用此插件之前,请配置数据库服务器的 IP 地址、端口号、用户名、密码等信息,以及一些数据类型转换、时间单位等配置。
请参阅配置部分
IoTDB 在元数据方面使用树模型,而 Telegraf 使用标签模型(参见 InfluxDB-Protocol Adapter)。转换标签有两种可用选项,通过设置 convert_tags_to 来指定
fields。将标签视为度量。对于标签中的每个键值对,将其转换为 IoTDB 支持的度量、值、数据类型。device_id,默认选项。将标签视为设备 ID 的一部分。标签构成Name的一个子树。
例如,有一个指标
Name="root.sg.device", Tags={tag1="private", tag2="working"}, Fields={s1=100, s2="hello"}fields,结果:root.sg.device, s1=100, s2="hello", tag1="private", tag2="working"device_id,结果:root.sg.device.private.working, s1=100, s2="hello"
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
Secret-store 支持
此插件支持从 secret-stores 获取 username 和 password 选项的密钥。有关如何使用它们的更多详细信息,请参阅 secret-store 文档。
配置
# Save metrics to an IoTDB Database
[[outputs.iotdb]]
## Configuration of IoTDB server connection
host = "127.0.0.1"
# port = "6667"
## Configuration of authentication
# user = "root"
# password = "root"
## Timeout to open a new session.
## A value of zero means no timeout.
# timeout = "5s"
## Configuration of type conversion for 64-bit unsigned int
## IoTDB currently DOES NOT support unsigned integers (version 13.x).
## 32-bit unsigned integers are safely converted into 64-bit signed integers by the plugin,
## however, this is not true for 64-bit values in general as overflows may occur.
## The following setting allows to specify the handling of 64-bit unsigned integers.
## Available values are:
## - "int64" -- convert to 64-bit signed integers and accept overflows
## - "int64_clip" -- convert to 64-bit signed integers and clip the values on overflow to 9,223,372,036,854,775,807
## - "text" -- convert to the string representation of the value
# uint64_conversion = "int64_clip"
## Configuration of TimeStamp
## TimeStamp is always saved in 64bits int. timestamp_precision specifies the unit of timestamp.
## Available value:
## "second", "millisecond", "microsecond", "nanosecond"(default)
# timestamp_precision = "nanosecond"
## Handling of tags
## Tags are not fully supported by IoTDB.
## A guide with suggestions on how to handle tags can be found here:
## https://iotdb.apache.org/UserGuide/Master/API/InfluxDB-Protocol.html
##
## Available values are:
## - "fields" -- convert tags to fields in the measurement
## - "device_id" -- attach tags to the device ID
##
## For Example, a metric named "root.sg.device" with the tags `tag1: "private"` and `tag2: "working"` and
## fields `s1: 100` and `s2: "hello"` will result in the following representations in IoTDB
## - "fields" -- root.sg.device, s1=100, s2="hello", tag1="private", tag2="working"
## - "device_id" -- root.sg.device.private.working, s1=100, s2="hello"
# convert_tags_to = "device_id"
## Handling of unsupported characters
## Some characters in different versions of IoTDB are not supported in path name
## A guide with suggetions on valid paths can be found here:
## for iotdb 0.13.x -> https://iotdb.apache.org/UserGuide/V0.13.x/Reference/Syntax-Conventions.html#identifiers
## for iotdb 1.x.x and above -> https://iotdb.apache.org/UserGuide/V1.3.x/User-Manual/Syntax-Rule.html#identifier
##
## Available values are:
## - "1.0", "1.1", "1.2", "1.3" -- use backticks to enclose tags with forbidden characters
## such as @$#:[]{}() and space
## - "0.13" -- use backticks to enclose tags with forbidden characters
## such as space
## Keep this section commented if you don't want to sanitize the path
# sanitize_tag = "1.3"此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。