How can I monitor memory usage of container vm running on GCE

1.5k Views Asked by At

I've created new VM with docker container. This VM uses Google Container-Optimized OS. How can I monitor memory usage of this instance?

There is no memory usage in observability: enter image description here

I see following message in Monitoring: Monitoring

1

There are 1 best solutions below

3
John Hanley On BEST ANSWER

You can enable monitoring when you create an instance:

gcloud compute instances create instance-name \
    --image-family cos-stable \
    --image-project cos-cloud \
    --metadata=google-monitoring-enabled=true

You can also enable monitoring on an existing instance:

gcloud compute instances add-metadata instance-name \
    --metadata=google-monitoring-enabled=true