GCP 警报通知仅发送一次 [英] GCP Alert notification is sending only once

本文介绍了GCP 警报通知仅发送一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为 pubsub 订阅设置了警报监控,如下所示:

I setup Alert Monitoring for pubsub subscription like below:

我原以为这会每 2 分钟触发一次,因为自始至终都满足条件.

I was expecting this to fire every 2 minutes, since the condition is met throughout.

但我只收到了一次通知.我也试过 duration 1 分钟.仍然没有运气.我在这里做错了什么?或者我对这些术语的理解可能有误?

But I got the notification only one time. I also tried with duration 1 minute. Still no luck. What am I doing wrong here? Or my understanding of these terms may be wrong?

我想要的是:每 2 分钟,当未确认消息计数大于等于x,触发警报.

What I want is: For every 2 minutes, when count of un-acked message count is > x, trigger an alert.

注意:我只是在这里屏蔽了 filter 字段,它是一个 subscription_id.

Note: I just masked the filter field here, which is a subscription_id.

推荐答案

您当前的监控设置按预期工作,因为您只有一个时间序列和一个条件.根据警报通知文档:

Your current monitoring set up is working as intended since you only have a single time series and a single condition. As per alert notification docs:

您只能在以下任一情况下收到多个通知是真的:

You can only receive multiple notifications if any of the following are true:

满足所有条件:

当所有条件都满足时,则对于每个导致满足条件的时间序列,策略发送一个通知并创建事件.例如,如果您有一个有两个条件的策略,每个条件监控一次系列,那么当策略被触发时,你会收到两个通知,您会看到两个事件.

When all conditions are met, then for each time series that results in a condition being met, the policy sends a notification and creates an incident. For example, if you have a policy with two conditions and each condition is monitoring one time series, then when the policy is triggered, you receive two notifications and you see two incidents.

满足任何条件:

政策会在每次有新的组合条件满足.例如,假设 ConditionA满足,事件打开,并发送通知.如果当后续测量同时满足这两个条件时,事件仍处于打开状态ConditionA 和 ConditionB,然后发送另一个通知.

The policy sends a notification each time a new combination of conditions is met. For example, assume that ConditionA is met, that an incident opens, and that a notification is sent. If the incident is still open when a subsequent measurement meets both ConditionA and ConditionB, then another notification is sent.

如果您使用 Google Cloud Console 创建策略,则默认行为是在条件满足时发送通知遇见了.

If you create the policy by using the Google Cloud Console, then the default behavior is to send a notification when the condition is met.

最后,Period" 的目的只是为了增加图表中的数据点,与多次触发通知无关,直到低于阈值.因此,在监控数据低于阈值之前,无法发送连续通知.

Lastly the purpose of "Period" is to just increase the data points in the chart and is not related to triggering a notification multiple times until it is below the threshold. Thus it is not possible send continuous notifications until the monitored data is below the threshold.

这篇关于GCP 警报通知仅发送一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆