Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Stackdriver Monitor Compute Engine Disk Usage

I have Google compute engine instances already up and running since recently.

I have explored Google Cloud stackdriver for monitoring CPU Usage etc.

I have installed Stackdriver agent on to one of the Compute Engine instance for testing. I have explored creating new chart on dashboard, tried with various metrics.

But I could not find any metrics that can show disk usage of my instance.

Yes there is list of plugins supported by Stackdriver agent to pump custom metrics but I could not find any specific metric that measure the instance disk usage.

Please give me a pointer.

Thanks

like image 475
izwan Avatar asked Jun 09 '16 04:06

izwan


People also ask

How do I check disk usage in GCP?

You cannot see the disk usage via a prepared command. But, you can check it via Stackdriver Monitoring (Google Cloud Operations Suite) with the metric named container/disk/bytes_used : documentation. You can use Monitoring APIs if you need to automatize it.

What is Stackdriver monitoring in GCP?

Google Stackdriver was a monitoring service that provided IT teams with performance data about applications and virtual machines (VMs) running on the Google Cloud Platform (GCP) and Amazon Web Services public cloud.

How do I monitor a VM in GCP?

Once that's done, go to the Cloud Monitoring page, select the VM instance as Resource Type: and scroll down until you see Agent Metrics to view the metrics collected by the Monitoring agent.


2 Answers

The UI changed slightly.

  1. Look for Operations -> Monitoring -> Metrics Explorer.
  2. Resource type: VM Instance
  3. Metric: Disk utilization (agent.googleapis.com/disk/percent_used)
  4. To filter by instance name (instead of numeric instance id) use: 'system metadata label -> name'

enter image description here

like image 100
Eugene Kulabuhov Avatar answered Nov 07 '22 03:11

Eugene Kulabuhov


Volume usage is added as a metrics after you install the standard agent (no additional plugins are needed). But you need to search for the word volume not disk to find this metric when adding it to a chart. enter image description here

After you install the agent for the first time it can take a few minutes before the new metrics shows up.

FYI : the list of plugins https://cloud.google.com/monitoring/agent/plugins/. Mostly they add metrics for web-servers or database servers. And you can add custom metrics : https://cloud.google.com/monitoring/custom-metrics/

Cheers!

like image 43
eSniff Avatar answered Nov 07 '22 03:11

eSniff