我想使用Google的StackDriver集成来进行健康检查和正常运行时间监控。我有一个运行在谷歌实例上的web服务器,可以在foo.mydomain.ai上找到。
注意:端口80向世界开放,我所做的测试是从其他Google实例和我的家用计算机中完成的。The服务器是运行在Tomcat 8中的Jetty (Scalatra)实例。
我已经按以下方式设置了健康检查:


不管我做什么,我都会犯错误
There was an issue connecting to an endpoint of one or more of your resources. This could be due to temporary network issues or trying to connect with a protocol that is not supported by the resource (e.g. trying to connect to an instance though http that does not have a webserver on it)使用curl获取相同的URL会给出正确的响应:
habitats@me:~/foobar curl http://foo.mydomain.ai/health/barservice
OK%使用普通GET获取也会工作,如下所示

发布于 2017-01-29 13:35:40
事实证明,这个错误只是UI中的一个bug,而健康检查实际上是起作用的。然而,这些检查需要一段时间才能激活。
发布于 2017-01-25 09:01:18
您是否检查了防火墙规则和要检查的计算机的API访问权限?您是否可能没有更新要检查的机器的API访问权限?如果您已经更新了API访问,那么您有正确的密钥吗?
我正在张贴一张图片,说明我的意思是允许访问机器的API。此列表位于"VM实例“中虚拟机设置的底部。
https://serverfault.com/questions/828412
复制相似问题