Are process VSZ memory details visible anywhere in GKE/Stackdriver?

9/17/2019

When logged in to a container, top/ps allows us to see VSZ memory statistics for one or more processes. I can not seem to find this same information in stackdriver. Is it available anywhere, or do we need to setup our own Prometheus instance and export process_virtual_memory_bytes data ourselves?

Stackdriver has this metric under the "anthos" namespace, but it does not appear to have any data for our GKE cluster.

-- Ruben
google-kubernetes-engine
prometheus
stackdriver

1 Answer

9/17/2019

Prometheus metrics are collected using an in-cluster agents in GKE and sent into Stackdriver. You can check these metrics (including process_virtual_memory_bytes) using Stackdriver Monitoring.

For that, yo can go to the Metrics Explorer and use either GKE Container or Kubernetes Container as Resource type. The Metric field should contain the specific Prometheus gauge that you're looking for.

Finally, consider that this assumes that Stackdriver Monitoring is enabled in the cluster.

-- yyyyahir
Source: StackOverflow