-
-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
Description
Hello there,
I am new to prometheus exporter in general and trying to implement sql exporter with query that return multiple values.
I tried with this collector metrics:
collector_name: postgresql
metrics:
- metric_name: participants_weekly
type: gauge
help: 'Total participants this week'
value_label: 'participants'
values:
- weekly
- total_participants
query: |
select
date_trunc('week', to_timestamp(created_at/1000)) as weekly,
count(*) as total_participants
from participants
where attendance_status ilike 'attended'
group by weekly
order by weekly desc
limit 1;and then when i run curl localhost:9399/metrics, the metrics does not appear. I also try adding another metrics but only the above metrics does not appear.
So i want to ask, how do we use value label? or to be precise, how do we use multiple values with sql exporter?
Thank you!
Reactions are currently unavailable