Stackdriver基于服务状态的警报

时间:2018-02-01 17:40:59

标签: google-cloud-platform google-compute-engine stackdriver

是否可以根据自定义服务的状态设置警报。例如,stackdriver-agent服务崩溃了一点。运行“服务stackdriver-agent status"我收到了“有效:无效(已死)”#39;响应。

是否可以根据上述条件设置警报? stackdriver-agent服务只是一个例子。理论上,我想在任何服务上设置此警报条件。

2 个答案:

答案 0 :(得分:1)

The answer is yes. In Stackdriver you can set up an alarm for any process in your machine. Selecting the option Add Process Health Condition you can configure alarms to receive notifications if your process starts or stops. Bear in mind that you first have to set up the Stackdriver Agent in your machine and that this option is only available in Stackdriver premium.

答案 1 :(得分:0)

Thrahir的答案是一个很好的答案,尽管此后UI发生了变化(单击“ Metric”和“ Uptime Check”旁边的右箭头以查看其他条件类型;“ Process Health”是最后一个)。

如果您的服务是服务器,您可能宁愿使用正常运行时间检查(https://cloud.google.com/monitoring/uptime-checks/)来监视其状态;与直接监视您的流程相比,您可以更好地模拟服务用户所看到的内容。

Stackdriver工程师Aaron Sher