Stackdriver: monitor free disk space

2k Views Asked by At

How can I monitor free disk space in a GCE instance?

I already installed Stackdriver Monitoring and Logging agents according to the Stackdriver documentation.

curl -O https://repo.stackdriver.com/stack-install.sh
sudo bash stack-install.sh --write-gcm

curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh
sudo bash install-logging-agent.sh

Now what are the next steps?

If I create a new dashboard in stackdriver, I can not found any metrics related to disk space available or used.

2

There are 2 best solutions below

0
On BEST ANSWER

Depending on how you have your access scope settings when you created the instance, you may not have the proper stackdriver api permissions. By default, stackdriver will pull the cpu and some other basic stats via the GCE apis, but in order for the agent to work you need to make sure the stackdriver monitoring api has full or write access.

See https://cloud.google.com/monitoring/agent/install-agent for reference on permissions.

0
On

To monitor free disk space you can use Agent metric disk, it consists of parts: bytes_used, percent_used and some other information about your disk.