1

Kapacitor 配置文件在[deadman]部分包含以下注释:

# NOTE: for this to be of use you must also globally configure at least one alerting method.

但是没有更多关于如何设置这种全局警报方法的提示。一些警报处理部分有一个global布尔参数,但没有基本的或老式的参数,如 snmp、httppost 甚至日志。它不可用吗?

Kapacitor 文档简要介绍了一[Alert]节。是否可以在这里设置全局日志事件处理程序?

4

1 回答 1

1

据我了解,这意味着为了使用 [deadman] 节点的全局配置,您需要为可能的 Kapacitor [Alert node] 属性之一设置默认参数(smtp、mqtt、slack、...)

支持的 [Alert node] 列表可在文档中找到

此配置在Kapacitor 配置文件中完成。

这是电子邮件属性的示例

[smtp]

  # Configure an SMTP email server
  # Will use TLS and authentication if possible
  # Only necessary for sending emails from alerts.
  enabled = true
  host = "smtp.host.com"
  port = 465
  username = "notify@host.com"
  password = "password"
  # From address for outgoing mail
  from = "notify@host.com"
  # List of default To addresses.
  to = ["dest1@host.com","dest2@host.com"]

  # Skip TLS certificate verify when connecting to SMTP server
  no-verify = false
  # Close idle connections after timeout
  idle-timeout = "30s"

  # If true the all alerts will be sent via Email
  # without explicitly marking them in the TICKscript.
  global = false
  # Only applies if global is true.
  # Sets all alerts in state-changes-only mode,
  # meaning alerts will only be sent if the alert state changes.
  state-changes-only = false
于 2020-06-10T09:13:04.130 回答