Hi,
I try to create a gauge with dynamic values from prometheus queries:
sum(kube_pod_container_resource_requests{resource="cpu", namespace="$namespace", container="service-x"}) by (container)
(legend: min)
sum(kube_pod_container_resource_limits{resource="cpu", namespace="$namespace", container="service-x"}) by (container)
(legend: max)
sum(rate(container_cpu_usage_seconds_total{namespace=~"$namespace",container="service-x"}[1m])) by (container)
(legend: cur)
With the transformation “Outer Join” with field Name “Time”, all values are merged to a single table
The next transformation is Rows to field, but it seems not to work (as intended). I still have 3 gauges…
Also i hoped (as described in the documenation - i could set a threshold from field (since min should be zero and “min” the threshold.
I’m really out of ideas.