目录
输入和输出集成概述
Fluentd 输入插件从 Fluentd 的 in_monitor 插件端点收集指标。它提供对各种插件指标的深入了解,同时允许自定义配置以减少序列基数。
此插件将 Telegraf 指标保存到 Apache IoTDB 后端,支持会话连接和数据插入。
集成详情
Fluentd
此插件从 in_monitor 插件提供的 Fluentd 插件端点收集指标。它从 /api/plugin.json 资源读取数据,并允许根据插件类型排除特定插件。
IoTDB
Apache IoTDB(物联网数据库)是一种 IoT 原生数据库,具有高性能的数据管理和分析能力,可部署在边缘和云端。其轻量级架构、高性能和丰富的功能集使其非常适合 IoT 工业领域中的海量数据存储、高速数据摄取和复杂分析。IoTDB 与 Apache Hadoop、Spark 和 Flink 深度集成,进一步增强了其处理大规模数据和复杂处理任务的能力。
配置
Fluentd
[[inputs.fluentd]]
## This plugin reads information exposed by fluentd (using /api/plugins.json endpoint).
##
## Endpoint:
## - only one URI is allowed
## - https is not supported
endpoint = "http://localhost:24220/api/plugins.json"
## Define which plugins have to be excluded (based on "type" field - e.g. monitor_agent)
exclude = [
"monitor_agent",
"dummy",
]
IoTDB
[[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" -- enclose in `` the world having forbidden character
## such as @ $ # : [ ] { } ( ) space
## - "0.13" -- enclose in `` the world having forbidden character
## such as space
##
## Keep this section commented if you don't want to sanitize the path
# sanitize_tag = "1.3"
输入和输出集成示例
Fluentd
- 基本配置:设置 Fluentd 输入插件以从 Fluentd 实例的监控端点收集指标,确保您能够跟踪性能和使用情况统计信息。
- 排除插件:使用
exclude
选项忽略特定插件的指标,这些指标对于您的监控需求不是必需的,从而简化数据收集并专注于重要事项。 - 自定义插件 ID:在您的 Fluentd 配置中实现
@id
参数以保持一致的plugin_id
,这有助于避免频繁重启期间出现高序列基数的问题。
IoTDB
-
实时 IoT 监控:利用 IoTDB 插件从各种 IoT 设备收集传感器数据,并将其保存在 Apache IoTDB 后端,从而促进对环境条件(如温度和湿度)的实时监控。此用例使组织能够分析随时间变化的趋势并根据历史数据做出明智的决策,同时还利用 IoTDB 的高效存储和查询功能。
-
智慧农业数据收集:使用 IoTDB 插件从部署在田间的智慧农业传感器收集指标。通过将湿度水平、养分含量和大气条件传输到 IoTDB,农民可以访问有关最佳种植和浇水计划的详细见解,从而提高作物产量和资源管理水平。
-
能源消耗分析:利用 IoTDB 插件跟踪公用事业网络中智能电表的能源消耗指标。此集成使分析能够识别使用高峰并预测未来消耗模式,最终支持节能措施和改进公用事业管理。
-
自动化工业设备监控:使用此插件收集制造工厂中机器的操作指标,并将其存储在 IoTDB 中进行分析。此设置可以帮助识别效率低下、预测性维护需求和操作异常,从而确保最佳性能并最大限度地减少意外停机时间。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。