目录
输入和输出集成概述
此插件报告 Suricata IDS/IPS 引擎的内部性能计数器,并处理传入数据以适应 Telegraf 的格式。
Graphite 插件使用户能够通过 TCP 将 Telegraf 收集的指标发送到 Graphite 中。此集成允许使用 Graphite 的强大功能高效地存储和可视化时序数据。
集成详情
Suricata
Suricata 插件捕获并报告 Suricata IDS/IPS 引擎的内部性能指标,其中包括各种统计信息,例如流量、内存使用情况、正常运行时间以及流和警报的计数器。此插件侦听来自 Suricata 的 JSON 格式的日志输出,使其能够解析和格式化数据以便与 Telegraf 集成。它作为服务输入插件运行,这意味着它主动等待来自 Suricata 的指标或事件,而不是按预定义的时间间隔收集指标。该插件支持不同指标版本的配置,从而提高了灵活性和详细的数据收集能力。
Graphite
此插件通过原始 TCP 将指标写入 Graphite,从而将 Telegraf 收集的指标无缝集成到 Graphite 生态系统中。借助此插件,用户可以配置多个 TCP 端点以进行负载均衡,从而确保指标传输的高可用性和可靠性。使用前缀自定义指标命名以及利用各种模板选项的能力增强了数据在 Graphite 中表示的灵活性。此外,对 Graphite 标签的支持以及对指标名称进行严格清理的选项允许进行强大的数据管理,以满足用户的不同需求。对于希望利用 Graphite 强大的指标存储和可视化功能,同时保持对数据表示的控制的组织来说,此功能至关重要。
配置
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
Graphite
# Configuration for Graphite server to send metrics to
[[outputs.graphite]]
## TCP endpoint for your graphite instance.
## If multiple endpoints are configured, the output will be load balanced.
## Only one of the endpoints will be written to with each iteration.
servers = ["localhost:2003"]
## Local address to bind when connecting to the server
## If empty or not set, the local address is automatically chosen.
# local_address = ""
## Prefix metrics name
prefix = ""
## Graphite output template
## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
template = "host.tags.measurement.field"
## Strict sanitization regex
## This is the default sanitization regex that is used on data passed to the
## graphite serializer. Users can add additional characters here if required.
## Be aware that the characters, '/' '@' '*' are always replaced with '_',
## '..' is replaced with '.', and '\' is removed even if added to the
## following regex.
# graphite_strict_sanitize_regex = '[^a-zA-Z0-9-:._=\p{L}]'
## Enable Graphite tags support
# graphite_tag_support = false
## Applied sanitization mode when graphite tag support is enabled.
## * strict - uses the regex specified above
## * compatible - allows for greater number of characters
# graphite_tag_sanitize_mode = "strict"
## Character for separating metric name and field for Graphite tags
# graphite_separator = "."
## Graphite templates patterns
## 1. Template for cpu
## 2. Template for disk*
## 3. Default template
# templates = [
# "cpu tags.measurement.host.field",
# "disk* measurement.field",
# "host.measurement.tags.field"
#]
## timeout in seconds for the write connection to graphite
# timeout = "2s"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
输入和输出集成示例
Suricata
-
网络流量分析:利用 Suricata 插件跟踪有关网络入侵尝试和性能的详细指标,帮助进行实时威胁检测和响应。通过可视化捕获的警报和流统计信息,安全团队可以快速查明漏洞并降低风险。
-
性能监控仪表板:使用 Suricata Telegraf 插件指标创建一个仪表板,以监控 IDS/IPS 引擎的健康状况和性能。此用例提供了内存使用情况、捕获的数据包和警报统计信息的概述,使团队能够保持最佳运行状态。
-
自动化安全报告:利用该插件生成有关警报统计信息和流量模式的定期报告,帮助安全分析师识别长期趋势并制定战略防御计划。自动化报告还可以确保持续评估网络的安全态势。
-
实时警报处理:将 Suricata 的警报指标集成到更广泛的事件响应自动化框架中。通过结合来自 Suricata 插件的输入,组织可以开发用于警报和自动化响应工作流的智能触发器,从而提高对潜在威胁的响应速度。
Graphite
-
动态指标可视化:Graphite 插件可用于将来自各种来源的实时指标(例如应用程序性能数据或服务器健康指标)馈送到 Graphite 中。这种动态集成使团队能够创建交互式仪表板,可视化关键绩效指标,跟踪随时间变化的趋势,并做出数据驱动的决策以提高系统性能。
-
负载均衡指标收集:通过在插件中配置多个 TCP 端点,组织可以为指标传输实施负载均衡。此用例确保指标交付既具有弹性又高效,从而降低了在高流量期间数据丢失的风险,并保持了到 Graphite 的可靠信息流。
-
自定义指标标记:通过对 Graphite 标签的支持,用户可以使用 Graphite 插件来提高指标的粒度。使用相关信息(例如应用程序环境或服务类型)标记指标,可以进行更精细的查询和分析,使团队能够深入研究特定感兴趣的领域,以获得更好的运营见解。
-
增强的数据清理:利用插件的严格清理选项,用户可以确保其指标名称符合 Graphite 的要求。这种主动措施消除了指标名称中无效字符引起的潜在问题,从而实现了更清晰的数据管理和更准确的可视化。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。