目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。InfluxDB 是排名第一的时间序列平台,旨在通过 Telegraf 进行扩展。
查看入门方法
输入和输出集成概述
LDAP 插件从 LDAP 服务器(包括 OpenLDAP 和 389 Directory Server)收集监控指标。此插件对于跟踪 LDAP 服务的性能和运行状况至关重要,使管理员能够深入了解其目录操作。
Telegraf PostgreSQL 插件允许您高效地将指标写入 PostgreSQL 数据库,同时自动管理数据库架构。
集成详情
LDAP
此插件从 LDAP 服务器的监控后端(特别是来自 cn=Monitor
条目)收集指标。它支持两个著名的 LDAP 实现:OpenLDAP 和 389 Directory Server (389ds)。LDAP 插件专注于收集各种操作指标,使管理员能够实时监控性能、连接状态和服务器运行状况,这对于维护强大的目录服务至关重要。通过允许自定义连接参数和安全配置(例如 TLS 支持),该插件确保符合安全和性能的最佳实践。收集的指标有助于识别趋势、优化服务器配置以及与利益相关者执行服务级别协议。
PostgreSQL
PostgreSQL 插件使用户能够将指标写入 PostgreSQL 数据库或兼容数据库,通过自动更新缺少的列,为模式管理提供强大的支持。该插件旨在促进与监控解决方案的集成,使用户能够有效地存储和管理时间序列数据。它为连接设置、并发性和错误处理提供可配置的选项,并支持高级功能,例如用于标签和字段的 JSONB 存储、外键标记、模板化模式修改以及通过 pguint 扩展支持无符号整数数据类型。
配置
LDAP
[[inputs.ldap]]
## Server to monitor
## The scheme determines the mode to use for connection with
## ldap://... -- unencrypted (non-TLS) connection
## ldaps://... -- TLS connection
## starttls://... -- StartTLS connection
## If no port is given, the default ports, 389 for ldap and starttls and
## 636 for ldaps, are used.
server = "ldap://localhost"
## Server dialect, can be "openldap" or "389ds"
# dialect = "openldap"
# DN and password to bind with
## If bind_dn is empty an anonymous bind is performed.
bind_dn = ""
bind_password = ""
## Reverse the field names constructed from the monitoring DN
# reverse_field_names = false
## Optional TLS Config
## Set to true/false to enforce TLS being enabled/disabled. If not set,
## enable TLS only if any of the other options are specified.
# tls_enable =
## Trusted root certificates for server
# tls_ca = "/path/to/cafile"
## Used for TLS client certificate authentication
# tls_cert = "/path/to/certfile"
## Used for TLS client certificate authentication
# tls_key = "/path/to/keyfile"
## Password for the key file if it is encrypted
# tls_key_pwd = ""
## Send the specified TLS server name via SNI
# tls_server_name = "kubernetes.example.com"
## Minimal TLS version to accept by the client
# tls_min_version = "TLS12"
## List of ciphers to accept, by default all secure ciphers will be accepted
## See https://pkg.go.dev/crypto/tls#pkg-constants for supported values.
## Use "all", "secure" and "insecure" to add all support ciphers, secure
## suites or insecure suites respectively.
# tls_cipher_suites = ["secure"]
## Renegotiation method, "never", "once" or "freely"
# tls_renegotiation_method = "never"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
PostgreSQL
# Publishes metrics to a postgresql database
[[outputs.postgresql]]
## Specify connection address via the standard libpq connection string:
## host=... user=... password=... sslmode=... dbname=...
## Or a URL:
## postgres://[user[:password]]@localhost[/dbname]?sslmode=[disable|verify-ca|verify-full]
## See https://postgresql.ac.cn/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
##
## All connection parameters are optional. Environment vars are also supported.
## e.g. PGPASSWORD, PGHOST, PGUSER, PGDATABASE
## All supported vars can be found here:
## https://postgresql.ac.cn/docs/current/libpq-envars.html
##
## Non-standard parameters:
## pool_max_conns (default: 1) - Maximum size of connection pool for parallel (per-batch per-table) inserts.
## pool_min_conns (default: 0) - Minimum size of connection pool.
## pool_max_conn_lifetime (default: 0s) - Maximum age of a connection before closing.
## pool_max_conn_idle_time (default: 0s) - Maximum idle time of a connection before closing.
## pool_health_check_period (default: 0s) - Duration between health checks on idle connections.
# connection = ""
## Postgres schema to use.
# schema = "public"
## Store tags as foreign keys in the metrics table. Default is false.
# tags_as_foreign_keys = false
## Suffix to append to table name (measurement name) for the foreign tag table.
# tag_table_suffix = "_tag"
## Deny inserting metrics if the foreign tag can't be inserted.
# foreign_tag_constraint = false
## Store all tags as a JSONB object in a single 'tags' column.
# tags_as_jsonb = false
## Store all fields as a JSONB object in a single 'fields' column.
# fields_as_jsonb = false
## Name of the timestamp column
## NOTE: Some tools (e.g. Grafana) require the default name so be careful!
# timestamp_column_name = "time"
## Type of the timestamp column
## Currently, "timestamp without time zone" and "timestamp with time zone"
## are supported
# timestamp_column_type = "timestamp without time zone"
## Templated statements to execute when creating a new table.
# create_templates = [
# '''CREATE TABLE {{ .table }} ({{ .columns }})''',
# ]
## Templated statements to execute when adding columns to a table.
## Set to an empty list to disable. Points containing tags for which there is no column will be skipped. Points
## containing fields for which there is no column will have the field omitted.
# add_column_templates = [
# '''ALTER TABLE {{ .table }} ADD COLUMN IF NOT EXISTS {{ .columns|join ", ADD COLUMN IF NOT EXISTS " }}''',
# ]
## Templated statements to execute when creating a new tag table.
# tag_table_create_templates = [
# '''CREATE TABLE {{ .table }} ({{ .columns }}, PRIMARY KEY (tag_id))''',
# ]
## Templated statements to execute when adding columns to a tag table.
## Set to an empty list to disable. Points containing tags for which there is no column will be skipped.
# tag_table_add_column_templates = [
# '''ALTER TABLE {{ .table }} ADD COLUMN IF NOT EXISTS {{ .columns|join ", ADD COLUMN IF NOT EXISTS " }}''',
# ]
## The postgres data type to use for storing unsigned 64-bit integer values (Postgres does not have a native
## unsigned 64-bit integer type).
## The value can be one of:
## numeric - Uses the PostgreSQL "numeric" data type.
## uint8 - Requires pguint extension (https://github.com/petere/pguint)
# uint64_type = "numeric"
## When using pool_max_conns>1, and a temporary error occurs, the query is retried with an incremental backoff. This
## controls the maximum backoff duration.
# retry_max_backoff = "15s"
## Approximate number of tag IDs to store in in-memory cache (when using tags_as_foreign_keys).
## This is an optimization to skip inserting known tag IDs.
## Each entry consumes approximately 34 bytes of memory.
# tag_cache_size = 100000
## Enable & set the log level for the Postgres driver.
# log_level = "warn" # trace, debug, info, warn, error, none
输入和输出集成示例
LDAP
-
监控目录性能:使用 LDAP Telegraf 插件持续跟踪和分析已完成的操作数、已启动的连接和服务器响应时间。通过可视化随时间变化的数据,管理员可以识别目录服务中的性能瓶颈,从而实现主动优化。
-
安全事件警报:将插件与警报系统集成,以便在某些指标(例如
bind_security_errors
或unauth_binds
)超过预定义阈值时通知管理员。此设置可以通过提供对潜在未经授权访问尝试的实时洞察来增强安全监控。 -
容量规划:利用 LDAP 插件收集的指标来执行容量规划。分析连接趋势、正在使用的最大线程数和操作统计信息,以预测未来的资源需求,确保 LDAP 服务器可以处理预期的峰值负载,而不会降低性能。
-
合规性和审计:使用通过此插件获得的操作指标来协助合规性审计。通过定期检查
anonymous_binds
和security_errors
等指标,组织可以确保其目录服务符合安全策略和法规要求。
PostgreSQL
-
使用复杂查询进行实时分析:利用 PostgreSQL 插件将来自各种来源的指标存储在 PostgreSQL 数据库中,从而可以使用复杂查询进行实时分析。此设置可以帮助数据科学家和分析师发现模式和趋势,因为他们可以在多个表之间操作关系数据,同时利用 PostgreSQL 强大的查询优化功能。具体来说,用户可以使用跨不同指标表的 JOIN 操作创建复杂的报告,从而揭示通常在嵌入式系统中仍然隐藏的见解。
-
与 TimescaleDB 集成以处理时间序列数据:在 TimescaleDB 实例中使用 PostgreSQL 插件,以高效地处理和分析时间序列数据。通过实施超表,用户可以在时间维度上实现更高的性能和主题分区。此集成允许用户对大量时间序列数据运行分析查询,同时保留 PostgreSQL SQL 查询的全部功能,从而确保指标分析的可靠性和效率。
-
数据版本控制和历史分析:实施一种使用 PostgreSQL 插件来维护指标不同版本的策略。用户可以设置一个不可变的数据表结构,其中保留旧版本的表,从而轻松进行历史分析。这种方法不仅可以深入了解数据演变,还可以帮助遵守数据保留策略,确保数据集的历史完整性保持不变。
-
针对不断发展的指标的动态模式管理:使用插件的模板功能来创建动态变化的模式,以响应指标变化。此用例允许组织在指标发展时调整其数据结构,添加必要的字段并确保遵守数据完整性策略。通过利用模板化的 SQL 命令,用户无需手动干预即可扩展其数据库,从而促进敏捷数据管理实践。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。InfluxDB 是排名第一的时间序列平台,旨在通过 Telegraf 进行扩展。
查看入门方法