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

五迷三道 提交于 2019-12-23 04:54:38

问题


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


回答1:


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

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




回答2:


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.


来源:https://stackoverflow.com/questions/58067042/memory-usage-monitoring-in-gcp-compute-engine-with-or-without-stack-driver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!