10

I have a cluster in Google Cloud. But I need to know information about resources usage. In interface of each node there are three graphics about CPU, memory and disk usage. But all this graphics in the each node have warning "No data for this time interval" for any time interval.

no data in any resource usage

I upgraded all clusters and nodes to the latest version 1.15.4-gke.22 and changed "Legacy Stackdriver Logging" to "Stackdriver Kubernetes Engine Monitoring".

Stackdriver Kubernetes Engine Monitoring enabled

But it didn't help. In Stackdriver Workspace there is only "disk_read_bytes" with graphics, any other requests in Metric Explorer have only message "No data for this time interval"

no data for this time interval

If I do request "kubectl top nodes" in the command line, I see current data for CPU and memory. But I need to see it on Node detail page to understand the peak load. How can I configure it?

Verter
  • 181
  • 2
  • 11
  • I don't think you're doing anything wrong - seems like there's something wrong with the monitoring configuration. The only other thing to check would be to make sure that your nodes are configured with the appropriate scopes for monitoring. – Yuri Grinshteyn Jan 13 '20 at 00:36
  • Yuri, how can I check it? Where is the configuration of monitoring scopes? – Verter Jan 13 '20 at 13:49
  • This question is of topic per https://meta.stackoverflow.com/questions/255745/why-cant-i-ask-customer-service-related-questions if you need to report and issue with GCP products please use the appropriate channels as posted in the answer below or open a public issue via https://cloud.google.com/support/docs/issue-trackers – Ernesto U Jan 14 '20 at 16:58
  • 1
    Here's some good instructions:https://adilsoncarvalho.com/changing-a-running-kubernetes-cluster-permissions-a-k-a-scopes-3e90a3b95636 – Yuri Grinshteyn Jan 14 '20 at 17:09

2 Answers2

10

In my case, I was missing permissions on the IAM service account associated with the cluster - make sure it has the roles:

  • Monitoring Metrics Writer (roles/monitoring.metricWriter)
  • Logs Writer (roles/logging.logWriter)
  • Stackdriver Resource Metadata Writer (roles/stackdriver.resourceMetadata.writer)

This is documented here

Rob Hogan
  • 2,442
  • 19
  • 23
0

Actually it sound strange because if you can get metrics in command line and the Stackdriver interface doesn't show them maybe it's a bug.

I recommend this: if you be able, create a cluster with the minimum resources, check the same Stackdriver metrics and if there are metrics, it can be a bug and you can report it on in the appropriate GCP channel.

Check the documentation about how to get support within GCP:

Best Practices for Working with Cloud Support

Getting support for Google Cloud

David C
  • 365
  • 2
  • 8