
How to Monitor Google Cloud VM Memory Usage?


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.
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.
- Connect to your Google Cloud VM with your favorite SSH client
- Run the following command
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.
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
- Once service is active & running we can check the Netdata dashboard which listen on port 19999
http://servername:19999
I hope this gives you a quick idea about monitoring the memory of Google Cloud VM.
- Tagged in:
- GCP
More great readings on Cloud Computing
-
An Introduction Guide to AWS FargateNaman Yash on June 14, 2022
-
10 Cloud-Based Cross Browser Testing Tools [2022]Saptak Chaudhuri on June 15, 2022
-
8 Best Virtualization Monitoring Tools for Medium to Big BusinessSatish Shethi on June 10, 2022
-
12 Best Hosting Platforms for the Germany MarketAmrita Pathak on June 11, 2022
-
Infrastructure as a Service (IaaS): Everything You Need To KnowNaman Yash on June 7, 2022
-
Deliver Your Application Content Faster to the Users with G-Core Labs CDNAmrita Pathak on May 26, 2022
Join Geekflare Newsletter
Every week we share trending articles and tools in our newsletter. More than 10,000 people enjoy reading, and you will love it too.