StackDriver alert when there's no data

元气小坏坏 提交于 2019-12-11 16:46:08

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/53690620/stackdriver-alert-when-theres-no-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!