目录
输入和输出集成概述
Salesforce Telegraf 插件收集有关 Salesforce 组织中 API 使用情况和限制的关键指标,从而有效监控和管理 API 消耗。
Telegraf 的 SQL 插件有助于将指标存储在 SQL 数据库中。当配置为 Microsoft SQL Server 时,它支持特定的 DSN 格式和架构要求,从而实现与 SQL Server 的无缝集成。
集成详情
Salesforce
Salesforce 插件允许用户收集有关其 Salesforce 组织内 API 使用限制和剩余使用量的指标。通过利用 Salesforce 的 REST API,特别是 limits 端点,此插件提供了关于 API 使用量已消耗多少以及剩余多少的关键见解。这对于依赖 Salesforce 进行运营的组织尤其重要,因为超出 API 限制可能会中断服务并阻碍业务流程。该插件将数据处理成结构化格式,其中包含各种 API 操作的最大值和剩余值,使团队更容易监控其使用情况并进行相应的计划。提供的配置允许用户自定义其凭据、环境类型(沙盒或生产)和 API 版本,确保不同部署场景的灵活性。
Microsoft SQL Server
Telegraf 适用于 Microsoft SQL Server 的 SQL 输出插件旨在通过动态创建与传入数据结构匹配的表和列来捕获和存储指标数据。此集成利用 go-mssqldb 驱动程序,该驱动程序通过包含服务器、端口和数据库详细信息的 DSN 遵循 SQL Server 连接协议。尽管由于单元测试有限,该驱动程序被认为是实验性的,但它为动态模式生成和数据插入提供了强大的支持,从而能够详细记录系统性能的时间戳记录。尽管其状态为实验性,但这种灵活性使其成为需要可靠和精细指标记录的环境的宝贵工具。
配置
Salesforce
[[inputs.salesforce]]
## specify your credentials
##
username = "your_username"
password = "your_password"
##
## (optional) security token
# security_token = "your_security_token"
##
## (optional) environment type (sandbox or production)
## default is: production
##
# environment = "production"
##
## (optional) API version (default: "39.0")
##
# version = "39.0"
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"
输入和输出集成示例
Salesforce
-
监控 API 限制使用情况以进行扩展决策:使用 Salesforce 插件跟踪一段时间内的 API 限制使用情况,并就何时扩展 Salesforce 资源做出明智的决策。通过可视化 API 消耗模式,组织可以预测高峰使用时间,从而使其能够主动调整其基础设施或根据需要请求更高的限制。这种优化可以提高性能并减少关键业务运营期间的停机时间。
-
API 限制超出自动警报系统:将此插件与通知系统集成,以便在 API 使用量接近临界限制时向团队发出警报。此设置不仅确保团队被主动通知以防止中断,还有助于维护运营连续性和客户满意度。警报可以配置为触发自动脚本,这些脚本可以调整负载或相应地通知利益相关者。
-
多个 Salesforce 的对比分析:利用 Salesforce 输入插件收集来自不同部门或业务部门的多个 Salesforce 实例的指标。通过集中这些数据,组织可以执行对比分析,以识别可能比其他部门更频繁地超出其 API 限制的部门。这允许进行有针对性的讨论和策略,以平衡整个组织的 API 使用情况,从而实现更好的资源分配和效率。
Microsoft SQL Server
-
企业应用程序监控:利用该插件捕获从 SQL Server 上运行的企业应用程序的详细性能指标。此设置允许 IT 团队分析系统性能、跟踪事务时间并识别跨复杂、多层环境的瓶颈。
-
动态基础设施审计:部署该插件以创建 SQL Server 中基础设施更改和性能指标的动态审计日志。对于需要实时监控和系统性能历史分析以进行合规性和优化的组织来说,此用例是理想的选择。
-
自动性能基准测试:使用该插件持续记录和分析 SQL Server 数据库的性能指标。这实现了自动基准测试,将历史数据与当前性能进行比较,有助于快速识别服务中的异常或降级。
-
集成 DevOps 仪表板:将该插件与 DevOps 监控工具集成,以将来自 SQL Server 的实时指标馈送到集中式仪表板。这提供了应用程序运行状况的整体视图,使团队可以将 SQL Server 性能与应用程序级事件相关联,从而实现更快的故障排除和主动维护。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。