Yogesh Yadav
Yogesh Yadav

Reputation: 4745

Memory Usage Monitoring in GCP Compute Engine with or without Stack Driver

Cloud Platform - GCP Compute Engine

OS - Ubuntu, 16.04 LTS

I want to see memory utilization graph just like CPU utilization (compute.googleapis.com/instance/cpu/utilization).

I could not find any way to monitor my Compute Engine memory utilization even if Stack-driver is enabled.

I checked https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute and there is no endpoint for memory utilization monitoring.

I tried stackdriver agent monitoring endpoints also but it is not working ( agent.googleapis.com/memory/percent_used) https://cloud.google.com/monitoring/api/metrics_agent#agent-memory.

Does anyone know how can I see memory utilization graph in GCP compute engine instance monitoring or via Stack Driver Monitoring

Upvotes: 0

Views: 4407

Answers (2)

Jujosiga
Jujosiga

Reputation: 409

EDITED

  • On Stackdriver Monitoring: (You will have to install the agent on your VM Instance)

    1. Install the Stackdriver Monitoring Agent following this guide.
    2. Open stackdriver monitoring API by clicking Navigation Menu -> Stackdriver -> Monitoring
    3. Once you are there on the left side you will click on "Resources" -> Metric explorer.
    4. On resource type: GCE VM Instance / Metrics: "Memory usage" and/or "Memory utilization".
    5. On filter, select Name, Value: (Name of your instance) You should see now the graphic metrics of the Memory utilization.

Upvotes: 2

guillaume blaquiere
guillaume blaquiere

Reputation: 75765

You missed something in the installation of the stackdriver agent. I just tested and it works like a charm on ubuntu 16.04 (Standard Google Image)!

Then go to stackdriver

  • Resources -> Instances: You should see your VM instance enter image description here

  • Click on your instance -> click on Agent -> Scroll down and you see your memory and your swap usage

enter image description here

Upvotes: 2

Related Questions