目录
强大性能,无限扩展
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会更有价值。借助 InfluxDB,这个排名第一的时间序列平台旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
此插件从 Google Cloud PubSub 摄取指标,从而实现实时数据处理和集成到监控设置中。
Telegraf 的 SQL 插件有助于将指标存储在 SQL 数据库中。当配置为 Microsoft SQL Server 时,它支持特定的 DSN 格式和架构要求,从而可以与 SQL Server 无缝集成。
集成详情
Google Cloud PubSub
Google Cloud PubSub 输入插件旨在从 Google Cloud PubSub 摄取指标,Google Cloud PubSub 是一种消息服务,有助于不同系统之间的实时通信。它允许用户通过从 Google Cloud 项目中的指定订阅中拉取消息来创建和处理指标。此插件的关键功能之一是它能够作为服务输入运行,主动侦听传入消息,而不是仅仅按设定的时间间隔轮询指标。通过各种配置选项,用户可以自定义消息摄取的行为,例如处理凭据、管理消息大小以及调整确认设置,以确保仅在成功处理后才确认消息。通过利用 Google PubSub 的优势,此插件与云原生架构无缝集成,使用户能够构建强大且可扩展的应用程序,这些应用程序可以实时响应事件。
Microsoft SQL Server
Telegraf 针对 Microsoft SQL Server 的 SQL 输出插件旨在通过动态创建与传入数据结构匹配的表和列来捕获和存储指标数据。此集成利用 go-mssqldb 驱动程序,该驱动程序通过包含服务器、端口和数据库详细信息的 DSN 遵循 SQL Server 连接协议。尽管由于单元测试有限,该驱动程序被认为是实验性的,但它为动态架构生成和数据插入提供了强大的支持,从而可以详细记录系统性能的时间戳记录。这种灵活性使其成为需要可靠和精细指标记录的环境的宝贵工具,尽管其状态为实验性。
配置
Google Cloud PubSub
[[inputs.cloud_pubsub]]
project = "my-project"
subscription = "my-subscription"
data_format = "influx"
# credentials_file = "path/to/my/creds.json"
# retry_delay_seconds = 5
# max_message_len = 1000000
# max_undelivered_messages = 1000
# max_extension = 0
# max_outstanding_messages = 0
# max_outstanding_bytes = 0
# max_receiver_go_routines = 0
# base64_data = false
# content_encoding = "identity"
# max_decompression_size = "500MB"
Microsoft SQL Server
[[outputs.sql]]
## Database driver
## Valid options: mssql (Microsoft SQL Server), mysql (MySQL), pgx (Postgres),
## sqlite (SQLite3), snowflake (snowflake.com), clickhouse (ClickHouse)
driver = "mssql"
## Data source name
## For Microsoft SQL Server, the DSN typically includes the server, port, username, password, and database name.
## Example DSN: "sqlserver://username:password@localhost:1433?database=telegraf"
data_source_name = "sqlserver://username:password@localhost:1433?database=telegraf"
## Timestamp column name
timestamp_column = "timestamp"
## Table creation template
## Available template variables:
## {TABLE} - table name as a quoted identifier
## {TABLELITERAL} - table name as a quoted string literal
## {COLUMNS} - column definitions (list of quoted identifiers and types)
table_template = "CREATE TABLE {TABLE} ({COLUMNS})"
## Table existence check template
## Available template variables:
## {TABLE} - table name as a quoted identifier
table_exists_template = "SELECT 1 FROM {TABLE} LIMIT 1"
## Initialization SQL (optional)
init_sql = ""
## Maximum amount of time a connection may be idle. "0s" means connections are never closed due to idle time.
connection_max_idle_time = "0s"
## Maximum amount of time a connection may be reused. "0s" means connections are never closed due to age.
connection_max_lifetime = "0s"
## Maximum number of connections in the idle connection pool. 0 means unlimited.
connection_max_idle = 2
## Maximum number of open connections to the database. 0 means unlimited.
connection_max_open = 0
## Metric type to SQL type conversion
## You can customize the mapping if needed.
#[outputs.sql.convert]
# integer = "INT"
# real = "DOUBLE"
# text = "TEXT"
# timestamp = "TIMESTAMP"
# defaultvalue = "TEXT"
# unsigned = "UNSIGNED"
# bool = "BOOL"
输入和输出集成示例
Google Cloud PubSub
-
物联网设备的实时分析:利用 Google Cloud PubSub 插件聚合来自分散在各个位置的物联网设备的指标。通过将来自设备的数据流式传输到 Google PubSub 并使用此插件摄取指标,组织可以创建一个集中式仪表板,用于实时监控和警报。此设置允许立即洞察设备性能,从而促进主动维护和运营效率。
-
动态日志处理和监控:通过 Google Cloud PubSub 将来自众多来源的日志摄取到 Telegraf 管道中,利用该插件解析和分析日志消息。这可以帮助团队快速识别日志中的异常或模式,并简化跨分布式系统的问题排除过程。通过整合日志数据,组织可以增强其可观察性和响应能力。
-
事件驱动的工作流集成:使用 Google Cloud PubSub 插件连接各种云函数或服务。每次将新消息推送到订阅时,都可以在云架构的其他部分触发操作,例如启动数据处理作业、通知,甚至报告更新。这种事件驱动的方法允许构建更具响应性的系统架构,可以适应不断变化的业务需求。
Microsoft SQL Server
-
企业应用程序监控:利用该插件捕获从 SQL Server 上运行的企业应用程序的详细性能指标。此设置允许 IT 团队分析系统性能、跟踪事务时间并识别跨复杂、多层环境的瓶颈。
-
动态基础设施审计:部署该插件以创建 SQL Server 中基础设施更改和性能指标的动态审计日志。此用例非常适合需要实时监控和历史分析系统性能以进行合规性和优化的组织。
-
自动化性能基准测试:使用该插件持续记录和分析 SQL Server 数据库的性能指标。这实现了自动化基准测试,将历史数据与当前性能进行比较,从而帮助快速识别服务中的异常或降级。
-
集成的 DevOps 仪表板:将该插件与 DevOps 监控工具集成,以将来自 SQL Server 的实时指标馈送到集中式仪表板中。这提供了应用程序运行状况的整体视图,使团队能够将 SQL Server 性能与应用程序级事件相关联,从而实现更快的故障排除和主动维护。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大性能,无限扩展
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会更有价值。借助 InfluxDB,这个排名第一的时间序列平台旨在与 Telegraf 一起扩展。
查看入门方法