我正在尝试警告一些关键字段,例如Elasticsearch的CPU使用率。 我浏览过GitHub Repo和文档,试图找到解决方案,但是在这里我无法弄清楚自己在做什么错。
我的配置如下:
name: CpuUtil
# Type of alert.
type: metric_aggregation
metric_agg_key: node_stats.process.cpu.percent
metric_agg_type: max
doc_type: datapoint
max_threshold: 30
# Index to search
index: .monitoring-*
timestamp_field: @timestamp
alert_subject: "CPU Usage above threshold"
alert_text_type: alert_text_only
alert_text: "CPU Usage is above 30 percent :("
# (Required)
# The alert is use when a match is found
alert:
- "email"
# (required, email specific)
# a list of email addresses to send alerts to
email:
smtp_host: ""
smtp_port: 25
smtp_ssl: false
from_addr: ""
我将类型更改为“任意”,并且电子邮件不断出现。另一方面,邮件没有停止发送。从字面上看,一切似乎都会触发警报。所以我知道这里有基本功能。但是,一旦我将其更改回metric_aggregation,就没有任何作用。
非常感谢任何输入