I need to know the uptime of GCP VM instances (windows and Linux both) and based on the time I need to stop the VM. Somehow, I am not getting any simpler way to get the uptime of my all GCP VMs which are like 100 in numbers and will be increasing.
I went through below answer but even there it is not answered, I could not add comment so had to ask new question. Get vm uptime data from stackdriver-agent in gcp?
In the python code snippet at below link, there is no module available for instance uptime all we have is creating uptime check for service availability. https://github.com/GoogleCloudPlatform/python-docs-samples
How can I get uptime of all GCP VM instances ?
for more info check the below document
https://cloud.google.com/monitoring/uptime-checks