Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

How to Monitor Google Cloud VM Memory Usage?

google cloud platform
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

Ever wondered how to get the memory utilization metrics on Google Cloud VM?

While working with the cloud providers I have seen sometimes Memory metrics not available in the monitoring dashboard. I always wanted to know & find the easiest way to get real-time data metrics of Linux VM.

Screenshot-2021-05-23-at-2.44.58-PM

After looking around & checking on the internet, I come across two possible ways to get the memory metrics.

Using Google Cloud Monitoring

Formally known as Stackdriver, you can install a monitoring agent on the VM which starts pushing memory and disk metrics.

curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh
sudo bash add-monitoring-agent-repo.sh --also-install
  • Once an agent is up & running metrics will be available in the monitoring tab of VM.

Screenshot-2021-05-26-at-12.08.23-AM

Using Netdata

If you need more than monitoring metrics, you can use lightweight software monitoring software such as Netdata.

Netdata is an open-source real-time monitoring tool that collects the metrics from the system & application. It is agent-based which means you need to install it on your server. It supports all major UNIX distro such as Ubuntu, CentOS, Debian, and container platforms like Docker, Kubernetes.

  • To install Netdata on VMs we can use this one-liner command.
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
  • Once the process gets complete we can check the service status using
service netdata status

Screenshot-2021-05-23-at-3.31.03-PM

  • Once service is active & running we can check the Netdata dashboard which listen on port 19999
http://servername:19999

Screenshot-2021-05-23-at-3.41.42-PM

I hope this gives you a quick idea about monitoring the memory of Google Cloud VM.

Thanks to our Sponsors
More great readings on Cloud Computing
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder