stackdriver-prometheus-sidecar icon indicating copy to clipboard operation
stackdriver-prometheus-sidecar copied to clipboard

Export more metric labels

Open nambrot opened this issue 5 years ago • 6 comments

Howdy, I was wondering if it is possible to configure the sidecar to export some specific labels of our metrics? Or are we constrained to the generic task resource labels in Stackdriver?

nambrot avatar Apr 29 '20 22:04 nambrot

The sidecar supports a number of resources, all of which are listed in resource_map.go. Most of the other labels are attached to the timeseries, except for the target labels and __name__ (see series_cache.go). Does this answer your question?

igorpeshansky avatar Apr 30 '20 00:04 igorpeshansky

Thank you for your prompt response! I'm not entirely sure I understand the Resource Map. When we have run it on our cluster, it's been translated to a Generic Task. If I understand correctly, if I have some application specific metrics, that will be my best shot and using job and task_id as the only free labels I could use for my purposes?

nambrot avatar Apr 30 '20 04:04 nambrot

The reason I ask is that with prometheus-to-sd I was able to get all the labels from my prometheus metrics into stackdriver as well

nambrot avatar Apr 30 '20 18:04 nambrot

@igorpeshansky Just wondering if you had any updates/tips here?

nambrot avatar May 07 '20 18:05 nambrot

@nambrot Same happening here. If I mount prometheus-to-sd I get metrics (kube-state-metrics & Node exporter) from all namespaces in GCP Monitoring. However, If I use this sidecar I don´t get them from all namespaces.

How did you solve this error?

WaterKnight1998 avatar Nov 10 '20 12:11 WaterKnight1998

same problem, can't get metrics from all namespaces only get metrics from namespace which has prometheus

clguo-tw avatar Dec 23 '20 18:12 clguo-tw