2

在 Bosun 配置通知中,我将超时设置为 5m,即 5 分钟。我收到的电子邮件间隔为 5 分钟或 10 分钟。我无法调试为什么会这样。请帮忙。

    notification default {
    email =jon@rohit.com
    print = true
    next = default
    timeout = 5m

}

template tags {
    subject =`Testing Emails Sample`
    body = `<p><strong>Tags</strong>

    <table>
        {{range $k, $v := .Group}}
            {{if eq $k "api"}}
                <tr><td>{{$k}} : {{$v}}</td></tr>
            {{end}}
        {{end}}
    </table>`
}




alert testSampleAlert5 {
    template = tags
    $notes = This alert monitors the percentage of 5XX on arm APIs


    crit =  1
    warn = 0
    warnNotification = default
    critNotification = default

}

alert testSampleAlert4 {
    template = tags
    $notes = This alert monitors the percentage of 5XX on arm APIs


    crit = 0
    warn = 1
    warnNotification = default
    critNotification = default

}
4

1 回答 1

1

您遇到的是 bosun 的“链式通知”功能。和参数指定通知将在您配置的 5 分钟后再次触发next。由于它引用自身,它将每 5 分钟触发一次,直到警报被确认或关闭。timeoutdefault

如果这不是您想要的,您有几个选择。

  1. 确认仪表板上的警报。这将阻止所有通知链重复。
  2. next如果您不想每 5 分钟重新通知一次,请删除该参数,或者增加超时时间等。

你想要的行为是什么?

于 2015-10-09T05:25:10.253 回答