Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I monitor the free space on a persistent disk in Google Compute Engine?

I've created a persistent disk in Google Compute Engine and attached it to an instance. What I am wondering however, is how can I monitor the free space on the disk? Can't see it either in the Google Cloud Console or from the gcloud tool.

like image 284
aknuds1 Avatar asked Dec 15 '16 20:12

aknuds1


People also ask

How do I check disk space in GCP VM?

SSH to your instance and execute the command df . This will show you the allocated and free space for each file system.

What is the maximum size for Compute Engine persistent disks?

Each persistent disk can be up to 64 TB in size, so there is no need to manage arrays of disks to create large logical volumes. Each instance can attach only a limited amount of total persistent disk space and a limited number of individual persistent disks.

What is persistent disk storage?

Persistent storage is any data storage device that retains data after power to that device is shut off. It is also sometimes referred to as nonvolatile storage.


1 Answers

You can use (Google) Stackdriver monitoring: https://cloud.google.com/monitoring/

If you install the Monitoring Agent on your instance, the Volume Free Space (Agent) metric will then become available.

You can setup an alert to notify you at significant levels.

Note that the Agent is now only available with a Premium subscription.

like image 133
IanGSY Avatar answered Sep 28 '22 14:09

IanGSY