kapacitor - 全局死机警报方法的提示
问题描述
Kapacitor 配置文件在[deadman]
部分包含以下注释:
# NOTE: for this to be of use you must also globally configure at least one alerting method.
但是没有更多关于如何设置这种全局警报方法的提示。一些警报处理部分有一个global
布尔参数,但没有基本的或老式的参数,如 snmp、httppost 甚至日志。它不可用吗?
Kapacitor 文档简要介绍了一[Alert]
节。是否可以在这里设置全局日志事件处理程序?
解决方案
据我了解,这意味着为了使用 [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
推荐阅读
- reactjs - 使用循环设置跨度标签
- java - 在变量初始化程序中获取空指针异常
- django - 具有递归模型的 HyperlinkedModelSerializer 问题
- c# - C# 中是否有 gcloud auth application-default print-access-token 等效项?
- java - 如何解决这个找不到由于标识符而不断出现的符号?
- c# - 解析 XAML 时出错:许多属性(例如宽度)出现“不允许整数类型”错误
- ruby-on-rails - Active Storage 问题上传和下载
- c# - 如果数据库中有某个值,如何在表上插入
- tensorflow - 如何为不同用途定制 AlexNet
- python - 按行查询索引