目录
输入和输出集成概述
此插件报告 Suricata IDS/IPS 引擎的内部性能计数器,并处理传入的数据以适应 Telegraf 的格式。
此插件使 Telegraf 能够使用 Prometheus remote write 协议将指标发送到 Cortex,从而可以无缝地摄取到 Cortex 的可扩展、多租户时序存储中。
集成详细信息
Suricata
Suricata 插件捕获并报告来自 Suricata IDS/IPS 引擎的内部性能指标,其中包括各种统计信息,例如流量、内存使用情况、正常运行时间以及流和警报的计数器。此插件侦听来自 Suricata 的 JSON 格式的日志输出,使其能够解析数据并格式化数据以与 Telegraf 集成。它作为服务输入插件运行,这意味着它主动等待来自 Suricata 的指标或事件,而不是以预定义的间隔收集指标。该插件支持不同指标版本的配置,从而提高了灵活性和详细的数据收集。
Cortex
借助 Telegraf 的 HTTP 输出插件和 prometheusremotewrite
数据格式,您可以将指标直接发送到 Cortex,Cortex 是 Prometheus 的水平可扩展的长期存储后端。Cortex 支持多租户,并接受使用 Prometheus protobuf 格式的 remote write 请求。通过使用 Telegraf 作为收集代理和 Remote Write 作为传输机制,组织可以将可观测性扩展到 Prometheus 本身不支持的来源(例如 Windows 主机、启用 SNMP 的设备或自定义应用程序指标),同时利用 Cortex 的高可用性和长期保留能力。
配置
Suricata
[[inputs.suricata]]
## Source
## Data sink for Suricata stats log. This is expected to be a filename of a
## unix socket to be created for listening.
# source = "/var/run/suricata-stats.sock"
## Delimiter
## Used for flattening field keys, e.g. subitem "alert" of "detect" becomes
## "detect_alert" when delimiter is "_".
# delimiter = "_"
## Metric version
## Version 1 only collects stats and optionally will look for alerts if
## the configuration setting alerts is set to true.
## Version 2 parses any event type message by default and produced metrics
## under a single metric name using a tag to differentiate between event
## types. The timestamp for the message is applied to the generated metric.
## Additional tags and fields are included as well.
# version = "1"
## Alerts
## In metric version 1, only status is captured by default, alerts must be
## turned on with this configuration option. This option does not apply for
## metric version 2.
# alerts = false
Cortex
[[outputs.http]]
## Cortex Remote Write endpoint
url = "http://cortex.example.com/api/v1/push"
## Use POST to send data
method = "POST"
## Send metrics using Prometheus remote write format
data_format = "prometheusremotewrite"
## Optional HTTP headers for authentication
# [outputs.http.headers]
# X-Scope-OrgID = "your-tenant-id"
# Authorization = "Bearer YOUR_API_TOKEN"
## Optional TLS configuration
# tls_ca = "/path/to/ca.pem"
# tls_cert = "/path/to/cert.pem"
# tls_key = "/path/to/key.pem"
# insecure_skip_verify = false
## Request timeout
timeout = "10s"
输入和输出集成示例
Suricata
-
网络流量分析:利用 Suricata 插件跟踪有关网络入侵尝试和性能的详细指标,从而帮助进行实时威胁检测和响应。通过可视化捕获的警报和流量统计信息,安全团队可以快速查明漏洞并降低风险。
-
性能监控仪表板:使用 Suricata Telegraf 插件指标创建仪表板,以监控 IDS/IPS 引擎的健康状况和性能。此用例提供了内存使用情况、捕获的数据包和警报统计信息的概览,使团队能够维持最佳运行状态。
-
自动化安全报告:利用该插件生成关于警报统计信息和流量模式的定期报告,帮助安全分析师识别长期趋势并制定战略防御计划。自动化报告还可以确保持续评估网络的安全性态势。
-
实时警报处理:将 Suricata 的警报指标集成到更广泛的事件响应自动化框架中。通过结合 Suricata 插件的输入,组织可以开发智能触发器,用于警报和自动化响应工作流程,从而提高对潜在威胁的响应速度。
Cortex
-
统一的多租户监控:使用 Telegraf 从不同的团队或环境收集指标,并将它们推送到带有单独
X-Scope-OrgID
标头的 Cortex。这实现了每个租户的隔离数据摄取和查询,非常适合托管服务和平台团队。 -
将 Prometheus 覆盖范围扩展到边缘设备:在边缘或 IoT 设备上部署 Telegraf 以收集系统指标,并将它们发送到集中的 Cortex 集群。即使对于没有本地 Prometheus 抓取器的环境,此方法也能确保一致的可观测性。
-
具有联合租户的全球服务可观测性:通过配置 Telegraf 代理将数据推送到区域 Cortex 集群(每个集群都标记有租户标识符)来聚合来自全球基础设施的指标。Cortex 处理跨区域的重复数据删除和集中式访问。
-
自定义应用遥测管道:通过 Telegraf 的
exec
或http
输入插件收集特定于应用的遥测数据,并将其转发到 Cortex。这使 DevOps 团队能够以可扩展、查询高效的格式监控特定于应用的 KPI,同时保持按租户或服务逻辑分组的指标。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。