Fluentd 和 Microsoft SQL Server 集成

强大的性能和简单的集成,由 InfluxData 构建的开源数据连接器 Telegraf 提供支持。

info

对于大规模实时查询,这不是推荐的配置。为了实现查询和压缩优化、高速摄取和高可用性,您可能需要考虑 Fluentd 和 InfluxDB

50 亿+

Telegraf 下载量

#1

时间序列数据库
来源:DB-Engines

10 亿+

InfluxDB 下载量

2,800+

贡献者

目录

强大的性能,无限的扩展能力

收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它会更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。

查看入门方法

输入和输出集成概述

Fluentd 输入插件从 Fluentd 的 in_monitor 插件端点收集指标。它提供对各种插件指标的深入了解,同时允许自定义配置以减少序列基数。

Telegraf 的 SQL 插件有助于将指标存储在 SQL 数据库中。当配置为 Microsoft SQL Server 时,它支持特定的 DSN 格式和架构要求,从而可以与 SQL Server 无缝集成。

集成详情

Fluentd

此插件从 in_monitor 插件提供的 Fluentd 插件端点收集指标。它从 /api/plugin.json 资源读取数据,并允许根据插件类型排除特定插件。

Microsoft SQL Server

Telegraf 的 Microsoft SQL Server SQL 输出插件旨在通过动态创建与传入数据结构匹配的表和列来捕获和存储指标数据。此集成利用 go-mssqldb 驱动程序,该驱动程序通过包含服务器、端口和数据库详细信息的 DSN 遵循 SQL Server 连接协议。尽管由于单元测试有限,该驱动程序被认为是实验性的,但它为动态架构生成和数据插入提供了强大的支持,从而可以详细记录系统性能的时间戳记录。这种灵活性使其成为需要可靠和精细指标日志记录的环境的宝贵工具,尽管其状态为实验性。

配置

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",
  ]

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"

输入和输出集成示例

Fluentd

  1. 基本配置:设置 Fluentd 输入插件以从 Fluentd 实例的监控端点收集指标,确保您能够跟踪性能和使用统计信息。
  2. 排除插件:使用 exclude 选项忽略监控需求中不需要的特定插件指标,从而简化数据收集并专注于重要事项。
  3. 自定义插件 ID:在 Fluentd 配置中实现 @id 参数以保持一致的 plugin_id,这有助于避免频繁重启期间出现高序列基数的问题。

Microsoft SQL Server

  1. 企业应用监控:利用该插件捕获在 SQL Server 上运行的企业应用程序的详细性能指标。此设置允许 IT 团队分析系统性能、跟踪事务时间并识别复杂的多层环境中的瓶颈。

  2. 动态基础设施审计:部署该插件以在 SQL Server 中创建基础设施更改和性能指标的动态审计日志。此用例非常适合需要实时监控和系统性能历史分析以进行合规性和优化的组织。

  3. 自动化性能基准测试:使用该插件持续记录和分析 SQL Server 数据库的性能指标。这支持自动化基准测试,将历史数据与当前性能进行比较,从而帮助快速识别服务中的异常或降级。

  4. 集成 DevOps 仪表板:将该插件与 DevOps 监控工具集成,以将 SQL Server 的实时指标馈送到集中式仪表板中。这提供了应用程序运行状况的整体视图,使团队可以将 SQL Server 性能与应用程序级事件相关联,从而实现更快的故障排除和主动维护。

反馈

感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。

强大的性能,无限的扩展能力

收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它会更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。

查看入门方法

相关集成

HTTP 和 InfluxDB 集成

HTTP 插件从一个或多个 HTTP(S) 端点收集指标。它支持各种身份验证方法和数据格式的配置选项。

查看集成

Kafka 和 InfluxDB 集成

此插件从 Kafka 读取消息,并允许根据这些消息创建指标。它支持各种配置,包括不同的 Kafka 设置和消息处理选项。

查看集成

Kinesis 和 InfluxDB 集成

Kinesis 插件允许从 AWS Kinesis 流中读取指标。它支持多种输入数据格式,并提供带有 DynamoDB 的检查点功能,以实现可靠的消息处理。

查看集成