Stackdriver / stackdriver-prometheus

Prometheus support for Stackdriver
https://cloud.google.com/monitoring/kubernetes-engine/prometheus
Apache License 2.0
19 stars 12 forks source link

K8sResourceMappings question #6

Closed laszlocph closed 5 years ago

laszlocph commented 6 years ago

Hi,

the accepted labels are limited in https://github.com/Stackdriver/stackdriver-prometheus/blob/master/stackdriver/resource_map.go#L46, so this project can only ship k8s_node, k8s_container and k8s_pod related metrics.

I was able to stuff into these notions classic Node Exporter metrics and they were showing up in Stackdriver as expected.

The only issue is that they pop up under "Kubernetes Node" metrics on the Stackdriver resource selector. Which makes sense as I'm only piggy backing on those labels.

My question is if there are plans to open up the possibility to ship any Prometheus metric?

Is there a Stackdriver API limitation to only accept those labels? I could modify the code myself, but of course I don't want to work against the system.

Thanks.

jkohen commented 6 years ago

@laszlocph thanks for the feedback. I forgot to watch the repository, which is why I missed your question earlier.

Your observation is correct, which MonitoredResource you pick may affect where the data shows up on the Stackdriver UI. Therefore, it's best to use the monitored resource type that matches your application's host environment (e.g. Google Compute Engine, Kubernetes, AWS EC2).

Currently Stackdriver supports these monitored resource types. Do they help you? It should be easy to add any of those to the mappings in https://github.com/Stackdriver/stackdriver-prometheus/blob/master/stackdriver/resource_map.go.

jkohen commented 5 years ago

I'll close this request. Please reopen if you have more questions.