目录
强大的性能,无限的扩展
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它会变得更有价值。通过 InfluxDB,这个排名第一的时间序列平台旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
Docker 输入插件允许您使用 Docker Engine API 从 Docker 容器收集指标,从而增强容器化应用程序的可见性和监控。
此插件将 Telegraf 指标保存到 Apache IoTDB 后端,支持会话连接和数据插入。
集成详情
Docker
Telegraf 的 Docker 输入插件从 Docker Engine API 收集有价值的指标,从而提供对正在运行的容器的深入了解。此插件利用官方 Docker 客户端与 Engine API 交互,允许用户监控各种容器状态、资源分配和性能指标。通过按名称和状态筛选容器的选项,以及可自定义的标签和标记,此插件支持灵活地监控各种环境(无论是在本地系统还是在 Kubernetes 等编排平台中)中的容器化应用程序。此外,它通过要求访问 Docker 守护进程的权限来解决安全问题,并强调在容器化环境中部署时的正确配置。
IoTDB
Apache IoTDB(物联网数据库)是一种 IoT 原生数据库,具有用于数据管理和分析的高性能,可部署在边缘和云端。其轻量级架构、高性能和丰富的功能集使其非常适合 IoT 工业领域中的海量数据存储、高速数据摄取和复杂分析。IoTDB 与 Apache Hadoop、Spark 和 Flink 深度集成,进一步增强了其处理大规模数据和复杂处理任务的能力。
配置
Docker
[[inputs.docker]]
## Docker Endpoint
## To use TCP, set endpoint = "tcp://[ip]:[port]"
## To use environment variables (ie, docker-machine), set endpoint = "ENV"
endpoint = "unix:///var/run/docker.sock"
## Set to true to collect Swarm metrics(desired_replicas, running_replicas)
## Note: configure this in one of the manager nodes in a Swarm cluster.
## configuring in multiple Swarm managers results in duplication of metrics.
gather_services = false
## Only collect metrics for these containers. Values will be appended to
## container_name_include.
## Deprecated (1.4.0), use container_name_include
container_names = []
## Set the source tag for the metrics to the container ID hostname, eg first 12 chars
source_tag = false
## Containers to include and exclude. Collect all if empty. Globs accepted.
container_name_include = []
container_name_exclude = []
## Container states to include and exclude. Globs accepted.
## When empty only containers in the "running" state will be captured.
# container_state_include = []
# container_state_exclude = []
## Objects to include for disk usage query
## Allowed values are "container", "image", "volume"
## When empty disk usage is excluded
storage_objects = []
## Timeout for docker list, info, and stats commands
timeout = "5s"
## Whether to report for each container per-device blkio (8:0, 8:1...),
## network (eth0, eth1, ...) and cpu (cpu0, cpu1, ...) stats or not.
## Usage of this setting is discouraged since it will be deprecated in favor of 'perdevice_include'.
## Default value is 'true' for backwards compatibility, please set it to 'false' so that 'perdevice_include' setting
## is honored.
perdevice = true
## Specifies for which classes a per-device metric should be issued
## Possible values are 'cpu' (cpu0, cpu1, ...), 'blkio' (8:0, 8:1, ...) and 'network' (eth0, eth1, ...)
## Please note that this setting has no effect if 'perdevice' is set to 'true'
# perdevice_include = ["cpu"]
## Whether to report for each container total blkio and network stats or not.
## Usage of this setting is discouraged since it will be deprecated in favor of 'total_include'.
## Default value is 'false' for backwards compatibility, please set it to 'true' so that 'total_include' setting
## is honored.
total = false
## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
## Possible values are 'cpu', 'blkio' and 'network'
## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
## Please note that this setting has no effect if 'total' is set to 'false'
# total_include = ["cpu", "blkio", "network"]
## docker labels to include and exclude as tags. Globs accepted.
## Note that an empty array for both will include all labels as tags
docker_label_include = []
docker_label_exclude = []
## Which environment variables should we use as a tag
tag_env = ["JAVA_HOME", "HEAP_SIZE"]
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
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"
输入和输出集成示例
Docker
-
监控容器化应用程序的性能:使用 Docker 输入插件来跟踪 Docker 容器中运行的应用程序的 CPU、内存、磁盘 I/O 和网络活动。通过收集这些指标,DevOps 团队可以主动管理资源分配、排除性能瓶颈并确保跨不同环境的最佳应用程序性能。
-
与 Kubernetes 集成:利用此插件收集由 Kubernetes 编排的 Docker 容器的指标。通过过滤掉不必要的 Kubernetes 标签并专注于关键指标,团队可以简化其监控解决方案并创建仪表板,从而深入了解 Kubernetes 集群中运行的微服务的整体健康状况。
-
容量规划和资源优化:使用 Docker 输入插件收集的指标来执行 Docker 部署的容量规划。分析使用模式有助于识别未充分利用的资源和过度配置的容器,从而指导根据实际使用趋势扩展或缩减的决策。
-
容器异常的自动警报:根据通过 Docker 插件收集的指标设置警报规则,以通知团队资源使用量异常激增或服务中断。这种主动监控方法有助于维护服务可靠性并优化容器化应用程序的性能。
IoTDB
-
实时物联网监控:利用 IoTDB 插件从各种物联网设备收集传感器数据,并将其保存在 Apache IoTDB 后端中,从而实现对环境条件(如温度和湿度)的实时监控。此用例使组织能够分析随时间变化的趋势,并根据历史数据做出明智的决策,同时还利用 IoTDB 的高效存储和查询功能。
-
智慧农业数据收集:使用 IoTDB 插件从部署在田野中的智慧农业传感器收集指标。通过将湿度水平、养分含量和大气条件传输到 IoTDB,农民可以访问有关最佳种植和浇水计划的详细见解,从而提高作物产量和资源管理水平。
-
能源消耗分析:利用 IoTDB 插件跟踪公用事业网络中智能电表的能源消耗指标。这种集成使分析能够识别使用高峰并预测未来的消耗模式,最终支持节能计划和改进的公用事业管理。
-
自动化工业设备监控:使用此插件从制造工厂的机器收集运行指标,并将它们存储在 IoTDB 中以进行分析。这种设置可以帮助识别效率低下、预测性维护需求和运行异常,从而确保最佳性能并最大限度地减少意外停机时间。
反馈
感谢您成为我们社区的一份子!如果您有任何一般反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它会变得更有价值。通过 InfluxDB,这个排名第一的时间序列平台旨在与 Telegraf 一起扩展。
查看入门方法