简体   繁体   English

电子邮件未从Logstash触发-ELK堆栈

[英]Email is not getting triggerred from Logstash - ELK stack

I want to trigger e-mail from logstash, when a event occurred more then a threshold limit. 我想从logstash触发电子邮件,当事件发生超过阈值限制时。 I have searched and got some suggestion to configure with Mertic, but I m not getting any e-mail. 我进行了搜索,并得到了一些建议使用Mertic进行配置,但是我没有收到任何电子邮件。 Here is my code below - what wrong I have done here..? 这是下面的代码-我在这里做错了什么? please help. 请帮忙。

// This is my filter
filter{
  if [type] == "agentapp"{
    grok { // no issue with this part
    ...}
    date{ // no issue with this part
    ...}    
  // I have added this below for threshold
  if [message] =~ "Invalid sm_usergroups" {
        metrics {
            meter => ["Invalid sm_usergroups"]
            add_tag => "metric-tag"
        }
    }       
  }
}

// This is my output
output{
  if "metric-tag" in [tags] and ["Invalid sm_usergroups".rate_15m] > 1 {
    email {
    ..//email code is also working one. checked.
    }
  }
}

Problem with metric plugin, which wont work properly. 公制插件出现问题,无法正常工作。 We have done it manually, bt counting the threshold and finally sending the mail. 我们是手动完成的,它会计算阈值并最终发送邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM