initplatform
initplatform

Reputation: 1

`gcloud compute instances create-with-container` is logging to stackdriver, but not including memory information?

I'm spinning up a g1-small with the create-with-container command. I am able to see CPU, Network Traffic, and I/O, but not the memory. Am I missing something?

Upvotes: 0

Views: 164

Answers (1)

DazWilkin
DazWilkin

Reputation: 40416

Here are the metrics for compute:

https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute

If you CTRL-F on "memory", there are 2 'types':

  • /guest/memory
  • /instance/memory -- these are only for e2 family (not g1-small)

For the /guest/ metrics, you should follow this guidance:

https://cloud.google.com/container-optimized-os/docs/how-to/monitoring

And then you should be able to observe e.g. guest/memory/bytes_used

You can hack your way to a solution by ssh'ing into your VM, running node-problem-detector manually and then using metrics explorer with e.g. bytes_used:

  • gcloud compute ssh instance ...
  • sudo systemctl start node-problem-detector
  • sudo journalctl --unit=node-problem-detector

And:

enter image description here

Upvotes: 1

Related Questions