没有数据时出现StackDriver警报

编程入门 行业动态 更新时间:2024-10-09 12:33:35
本文介绍了没有数据时出现StackDriver警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经在StackDriver中针对实例/正常运行时间"指标设置了警报策略.在小于1的情况下发出警报,持续1分钟.

然后我删除了实例,并且没有警报.

是不是因为在接下来的时间窗口中数据不是0而是没有,所以没有警报发送?

解决方案

我转载了您的情况

如果删除了实例,则不会生成警报,这是预期的行为,因为资源(VM)不再存在.

只有虚拟机实例启动并运行时,才会生成正常运行时间警报.

似乎您正在尝试删除实例后发送警报,如果是这种情况,可以使用Stackdriver Logging中基于日志的指标来完成,该指标可在Stackdriver Monitoring中用于生成警报.以下链接将在这方面帮助您创建计数器指标和基于日志的指标界面 I've set up an alerting policy in StackDriver on the "instance/uptime" metrics. To alert when it's less 1 for 1 minute.

Then I deleted the instance, and had no alerts.

Is it so because at the following time window the data isn't 0 rather none, so no alerts are sent?

解决方案

I reproduced your situation

If the instance is deleted, there's no alerts being generated, this is expected behavior since the resource (VM) doesn't exist anymore.

Uptime alerts are generated when only VM instances are up and running.

It seems you are trying to send alert when instances are deleted, if this is the case, this can be done with log-based metrics in Stackdriver Logging which can be used in Stackdriver Monitoring to generate alerts. The following links will assist in this regards Creating Counter Metrics and Logs-based metrics interface

更多推荐

没有数据时出现StackDriver警报

本文发布于:2023-11-28 00:01:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1640143.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:警报   数据   StackDriver

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!