grafana-google-stackdriver-datasource icon indicating copy to clipboard operation
grafana-google-stackdriver-datasource copied to clipboard

Some metrics don't render as expected

Open ericuldall opened this issue 7 years ago • 4 comments

Hi @mtanda !

As I dig into more metrics I'm finding a couple issues that I thought may be a bug or PEBCAK. Here's the two I'm currently experiencing...

  1. pubsub.googleapis.com/subscription/num_outstanding_messages - It renders data points but the legend and tooltip do not show any values.

  2. Can't figure out how to get any cpu/utilization metrics to render as value between 0 - 100% For this second one I've tried all sorts of combinations in the aggregation section and I'm seeing very large numbers so I assume there's either some option the plugin is missing or I'm using the wrong method to achieve the result desired.

Any help you can provide here is much appreciated. So far the plugin is great and a really clean addition to our insights in Grafana, so Thank you :)

ericuldall avatar May 03 '18 01:05 ericuldall

Hi @ericuldall ! I'm on holiday, so I'll check the issue more detail.

pubsub.googleapis.com/subscription/num_outstanding_messages - It renders data points but the legend and tooltip do not show any values.

If you specify Alias, how it works.

https://github.com/mtanda/grafana-google-stackdriver-datasource/blob/ed87ebe392aaa4395045bfb71f8d83720545efed/src/datasource.ts#L68 This line generates legend string, so attach debugger and look value will help you.

Can't figure out how to get any cpu/utilization metrics to render as value between 0 - 100%

I'm not sure which cpu metrics is. If the metric is compute.googleapis.com/instance/cpu/utilization, it could be greater than 1.

https://cloud.google.com/monitoring/api/metrics_gcp

The fraction of the allocated CPU that is currently in use on the instance. This value can be greater than 1.0 on some machine types that allow bursting.

mtanda avatar May 03 '18 04:05 mtanda

HI @mtanda,

I'm using an alias and the key shows up in my legend however there is no value associated (see image below)

image

For cpu metrics, I'm trying to get the container cpu utilization from GKE: container.googleapis.com/container/cpu/utilization

ericuldall avatar May 10 '18 21:05 ericuldall

About issue 1, try to fix the issue by following change.

https://github.com/mtanda/grafana-google-stackdriver-datasource/commit/9e4f570cb3dec9dcfdb350d7d0a73c0dd284e485#diff-d08c5e2aaf65d640a9e2fce1af5b062cR75

I'm not sure stackdriver return null data point, but if it return it, this change may solve your issue.

mtanda avatar May 11 '18 04:05 mtanda

About issue 2, please check query inspector result, and compare with Stackdriver console. https://app.google.stackdriver.com/

I'm not familiar with container metrics, but it could exceed 1 in some case. https://cloud.google.com/monitoring/api/metrics_other#other-kubernetes.io container/cpu/request_utilization

If Stackdriver itself show same value, it might be correct...

mtanda avatar May 11 '18 07:05 mtanda