Reputation: 1154
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.
Upvotes: 2
Views: 2015
Reputation: 11
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.
Upvotes: 1
Reputation: 94
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.
Upvotes: 1