Uptime checks for VMs with ONLY internal ip | C2C Community

Uptime checks for VMs with ONLY internal ip

  • 10 December 2021
  • 7 replies

Userlevel 1

Hi Community


Am trying to setup a uptime check for my VM instances that do not have any external IPs associated with them.


As per the documentation for Uptime checks, there is a mention it cannot be configured for resources without any external IPs. Is there any workaround for the same to keep these checks with only the internal IP for VMs?

Appreciate your timely input and suggestions






7 replies

Userlevel 7
Badge +65

The first thing that came to my mind is to create another VM with public IP, in the same VPC with your private VMs.

@antoine.castex @guillaume blaquiere @tom I know you will have a better solution.

Userlevel 6
Badge +15

There 2 things to consider:

  • Uptime check that allow you knowing the exact uptime of your application, at the user point of view (One of the golden signal in SRE, the availability, but the real, this one viewed by the end users)
  • Health check that checks the VMs/MIG internally to know their availability and if a load balancer can route the traffic to it to serve the traffic or if the VM is down. If the VM is down, auto healing can be done (kill the VM and replace it with a fresh one)

Now, if you serve a website internally (for instance, with an internal HTTPS load balancer) and you want to have a uptime check on it, AFAIK, you can’t for now.

Userlevel 7
Badge +65

@guillaume blaquiere I think that @VijayM can ask this question to Stephanie. He has already signed up for the event.

Userlevel 1

Many thanks for the prompt responses @ilias  & @guillaume blaquiere 


My ask is simple. I have a few internal facing VMs that I used for log information and other such requirements which doesn’t need a http/https checks. I was interested with the TCP configuration of the uptime checks.


I see you have mentioned having a VM within the same VPC with an external IP. How does that help in getting this configuration working? Can you please throw some more light on this suggestion?




You could use  “uptime ec2-instance-connect -p “  cli



From stack exchange server fault:


There is no specific 'uptime' measure in Amazon EC2.

If AWS Config has been configured, you could use get-resource-config-history to retrieve the history of an instance, eg:

aws configservice get-resource-config-history --resource-type AWS::EC2::Instance --resource-id i-1a2b3c4d

AWS Config will show the state change of an Amazon EC2 instance (eg stoppedrunning) as a Configuration.State.Name value. The change will also have a timestamp.

Using this configuration history, you could piece together enough information to calculate uptime.

Alternatively, you could calculate the uptime from within the instance (eg from system logs or via a custom app) rather than obtaining it from EC2.


Improve this answer


answered Oct 16 '16 at 10:30

John Rotenste




Userlevel 1

Thanks a lot for your response - @Mykle I am only interested for the GCE instances within the GCP scope. AWS EC2 instances are not scoped in for the checks yet.


I believe instead of these uptime checks (under Monitoring → Uptime Checks), the standard Cloud operations alerting policy (Monitoring → Alerting) with the uptime metric might be worthwhile option. I tried to test it out but somehow couldn’t make it work as expected. I created a metric alert policy for the VM (compute.googleapis.com/instance/uptime) and brought the VM down manually. The email was not triggered (as per notification policy) on time and as well the uptime metric was active although the instance was stopped (instance stopped around 1 AM but uptime metric was active even after -  check attached image). May have to check this further and test the suggested MQL and see if that proves effective





Apologies Vijay. I forgot this is only a GCP community. 

In Who should be notified? Try the SMS option. Faster than email notification - don’t know why.