✅ Correct query for Active Partners (Unique Partner IDs)
count_values("partnerId", {namespace="nginx-controller"} |= "ren-prod-us" |= "gcs-pet-saas" | json | unwrap upstream_http_partnerId)
Then, in Grafana:
Panel type → Stat
Calculation → Count
The panel will show the number of unique partner IDs active in the selected range.
⚡Alternative if you want just total number (not names)
You can aggregate the output of count_values():
sum(count_values("partnerId", {namespace="nginx-controller"} |= "ren-prod-us" |= "gcs-pet-saas" | json | unwrap upstream_http_partnerId))
That gives you a numeric total — a single number you can display in a stat panel.
✅ Tip:
If you still see “No data,” try verifying with this quick check query:
{namespace="nginx-controller"} |= "ren-prod-us" |= "gcs-pet-saas" | json | line_format "{{.upstream_http_partnerId}}"
If this returns IDs (like idwatchdog, partnerx etc.), the main query will definitely work.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For further actions, you may consider blocking this person and/or reporting abuse