目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。 当您将任何数据视为时间序列数据时,它都更有价值。 借助 InfluxDB,这是基于 Telegraf 构建的排名第一的可扩展时间序列平台。
查看入门方法
输入和输出集成概述
Salesforce Telegraf 插件收集有关 Salesforce 组织中 API 使用情况和限制的关键指标,从而实现对 API 消耗的有效监控和管理。
Telegraf 的 SQL 输出插件通过为每种指标类型动态创建表,将指标存储在 SQL 数据库中。 当配置为 SQLite 时,它利用基于文件的 DSN 和为轻量级嵌入式数据库使用量身定制的最小 SQL 模式。
集成详情
Salesforce
Salesforce 插件允许用户收集有关 API 使用限制以及其 Salesforce 组织内剩余使用量的指标。 通过利用 Salesforce 的 REST API,特别是 limits 端点,此插件提供了关于 API 使用量已消耗多少以及剩余多少的关键见解。 这对于依赖 Salesforce 进行运营的组织尤其重要,因为超出 API 限制可能会中断服务并阻碍业务流程。 该插件将数据处理成结构化格式,其中包含各种 API 操作的最大值和剩余值,使团队可以更轻松地监控其使用情况并进行相应的计划。 提供的配置允许用户自定义其凭据、环境类型(沙盒或生产)和 API 版本,从而确保不同部署场景的灵活性。
SQLite
SQL 输出插件使用动态模式将 Telegraf 指标写入 SQL 数据库,其中每种指标类型都对应于一个表。 对于 SQLite,该插件使用 modernc.org/sqlite 驱动程序,并且需要文件 URI 格式的 DSN(例如,“file:/path/to/telegraf.db?cache=shared”)。 此配置利用标准 ANSI SQL 进行表创建和数据插入,确保与 SQLite 的功能兼容。
配置
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"
SQLite
[[outputs.sql]]
## Database driver
## Valid options: mssql (Microsoft SQL Server), mysql (MySQL), pgx (Postgres),
## sqlite (SQLite3), snowflake (snowflake.com), clickhouse (ClickHouse)
driver = "sqlite"
## Data source name
## For SQLite, the DSN is a filename or URL with the scheme "file:".
## Example: "file:/path/to/telegraf.db?cache=shared"
data_source_name = "file:/path/to/telegraf.db?cache=shared"
## 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
## The values on the left are the data types Telegraf has and the values on the right are the SQL types used when writing to SQLite.
#[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 使用情况,从而提高资源分配和效率。
SQLite
- 本地监控存储:将插件配置为将指标写入本地 SQLite 数据库文件。 这非常适合不需要设置全规模数据库服务器的轻量级部署。
- 嵌入式应用程序:使用 SQLite 作为嵌入在边缘设备中的应用程序的后端,受益于其基于文件的架构和最低资源要求。
- 快速设置进行测试:利用 SQLite 的易用性,快速设置 Telegraf 指标收集的测试环境,而无需外部数据库服务。
- 自定义模式管理:如果您需要特定的列类型或索引,请调整表创建模板以预定义您的模式,从而确保与您的应用程序的需求兼容。
反馈
感谢您成为我们社区的一份子! 如果您对这些页面有任何一般反馈或发现任何错误,我们欢迎并鼓励您提供意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。 当您将任何数据视为时间序列数据时,它都更有价值。 借助 InfluxDB,这是基于 Telegraf 构建的排名第一的可扩展时间序列平台。
查看入门方法