我想使用Google Cloud的StackDriver集成进行健康检查和正常运行时间监控。 我有一个在谷歌实例上运行的web服务器,可以在foo.mydomain.ai上find。
注意: 80端口向全世界开放,我做的testing是从其他Google实例和我的家用计算机上完成的。 networking服务器是在Tomcat 8中运行的Jetty(Scalatra)实例。
我已经设置了健康检查,如下所示:
不pipe我做什么,我得到的错误
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 (eg 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获取也可以像下面那样工作
你有没有检查你的防火墙规则和你想检查的机器的API访问? 是否有可能没有更新要检查的机器的API访问? 如果您已更新API访问权限,您是否拥有正确的密钥?
我张贴了我的意思是启用一个机器的API访问的图片。 此列表位于“VM实例”中虚拟机设置的底部
API访问
事实certificate,错误只是UI中的一个错误,健康检查确实起作用。 然而,支票需要一些时间才能激活 。