目录
输入和输出集成概述
NSQ Telegraf 插件从 NSQD 消息传递系统读取指标,从而实现实时数据处理和监控。
此插件将 Telegraf 指标保存到 Apache IoTDB 后端,支持会话连接和数据插入。
集成详情
NSQ
NSQ 插件与实时消息传递平台 NSQ 接口连接,能够从 NSQD 读取消息。 此插件归类为服务插件,这意味着它主动侦听指标和事件,而不是按固定时间间隔轮询它们。 为了强调可靠性,它会跟踪未送达的消息,直到输出端确认收到为止,从而防止数据丢失。 该插件允许进行配置,例如指定 NSQLookupd 端点、主题和通道,并且它支持多种数据格式,以实现数据处理的灵活性。
IoTDB
Apache IoTDB(物联网数据库)是物联网原生数据库,具有用于数据管理和分析的高性能,可部署在边缘和云端。 其轻量级架构、高性能和丰富的功能集为大规模数据存储、高速数据摄取和物联网工业领域的复杂分析创造了完美契合。 IoTDB 与 Apache Hadoop、Spark 和 Flink 深度集成,进一步增强了其处理大规模数据和复杂处理任务的能力。
配置
NSQ
# Read metrics from NSQD topic(s)
[[inputs.nsq_consumer]]
## Server option still works but is deprecated, we just prepend it to the nsqd array.
# server = "localhost:4150"
## An array representing the NSQD TCP HTTP Endpoints
nsqd = ["localhost:4150"]
## An array representing the NSQLookupd HTTP Endpoints
nsqlookupd = ["localhost:4161"]
topic = "telegraf"
channel = "consumer"
max_in_flight = 100
## Max undelivered messages
## This plugin uses tracking metrics, which ensure messages are read to
## outputs before acknowledging them to the original broker to ensure data
## is not lost. This option sets the maximum messages to read from the
## broker that have not been written by an output.
##
## This value needs to be picked with awareness of the agent's
## metric_batch_size value as well. Setting max undelivered messages too high
## can result in a constant stream of data batches to the output. While
## setting it too low may never flush the broker's messages.
# max_undelivered_messages = 1000
## Data format to consume.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
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"
输入和输出集成示例
NSQ
-
实时分析仪表板:将此插件与可视化工具集成,以创建仪表板,显示来自 NSQ 中各种主题的实时指标。 通过订阅特定主题,用户可以动态监控系统健康状况和应用程序性能,从而立即获得洞察力并及时响应任何异常情况。
-
事件驱动的自动化:将 NSQ 与无服务器架构相结合,以根据传入的消息触发自动化工作流程。 此用例可能涉及处理机器学习模型的数据或响应应用程序中的用户操作,从而简化操作并通过快速处理增强用户体验。
-
多服务通信中心:在分布式架构中使用 NSQ 插件充当不同微服务之间的集中消息传递中心。 通过使服务能够通过 NSQ 进行通信,开发人员可以确保可靠的消息传递,同时保持解耦的服务交互,从而显着提高可扩展性和弹性。
-
用于增强监控的指标聚合:实施 NSQ 插件以聚合来自多个来源的指标,然后再将它们发送到分析工具。 这种设置使企业能够整合来自各种应用程序和服务的数据,从而创建统一的视图,以便更好地进行决策和战略规划。
IoTDB
-
实时物联网监控:利用 IoTDB 插件收集来自各种物联网设备的传感器数据,并将其保存在 Apache IoTDB 后端中,从而促进对环境条件(如温度和湿度)的实时监控。 此用例使组织能够分析随时间变化的趋势,并根据历史数据做出明智的决策,同时还利用 IoTDB 高效的存储和查询功能。
-
智能农业数据收集:使用 IoTDB 插件收集来自部署在田地中的智能农业传感器的指标。 通过将湿度水平、养分含量和大气条件传输到 IoTDB,农民可以获得有关最佳种植和浇水计划的详细见解,从而提高作物产量和资源管理水平。
-
能耗分析:利用 IoTDB 插件跟踪来自公用事业网络中智能电表的能耗指标。 这种集成能够进行分析,以识别使用高峰并预测未来的消费模式,最终支持节能措施和改进的公用事业管理。
-
自动化工业设备监控:使用此插件收集制造工厂中机器的操作指标,并将它们存储在 IoTDB 中进行分析。 这种设置可以帮助识别效率低下、预测性维护需求和操作异常,从而确保最佳性能并最大限度地减少意外停机时间。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。