Cryptic Stackdriver HTTP Uptime check error using Google Cloud Platform

google-cloud-platformgoogle-compute-enginegoogle-stackdriver

I want to use Google Cloud's StackDriver integration for health checks and uptime monitoring. I have a web server running on a google instance, available at foo.mydomain.ai.

NB: Port 80 is open to the world, and the tests I did were done from both other Google instances and my home computer. The webserver is a Jetty (Scalatra) instance running within Tomcat 8.

I've setup the health check as follows:

enter image description here
enter image description here

No matter what I do, I get the error

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)

Fetching the same URL with curl gives the proper response:

habitats@me:~/foobar curl http://foo.mydomain.ai/health/barservice
OK%

Fetching using plain GET also works as shown in enter image description here

Best Answer

Have you checked your firewall rules and the API access of the machines you want to check? Is it possible that you have not updated the API access of the machine that you want to check? And if you have updated the API access do you have the correct keys?

I am posting a picture of what I mean enabling the API access of a machine. This list is on the bottom of the settings of a virtual machine in "VM instances"

API Access