Open franck102 opened 3 years ago
A simpler query works as expected:
rel_stats:
query: |
select relname,relpages from pg_catalog.pg_class
metrics:
- relname:
usage: "LABEL"
- relpages:
usage: "GAUGE"
... so I really don't know what is happening. Querying the /metrics endpoint directly confirms that the exporter only reports one time series:
# HELP job_stats_total_failures Total failure runs
# TYPE job_stats_total_failures counter
job_stats_total_failures{application_name="Telemetry Reporter [1]",job_id="1",namespace="dmp-monitoring",relation="",release="dms-timescaledb",schedule_interval="24:00:00",server="/var/run/postgresql:5432"} 4
# HELP job_stats_total_runs Total number of job runs so far
# TYPE job_stats_total_runs counter
job_stats_total_runs{application_name="Telemetry Reporter [1]",job_id="1",namespace="dmp-monitoring",relation="",release="dms-timescaledb",schedule_interval="24:00:00",server="/var/run/postgresql:5432"} 14
# HELP job_stats_total_successes Total successful runs
# TYPE job_stats_total_successes counter
job_stats_total_successes{application_name="Telemetry Reporter [1]",job_id="1",namespace="dmp-monitoring",relation="",release="dms-timescaledb",schedule_interval="24:00:00",server="/var/run/postgresql:5432"} 10
I was assuming that if an extended query returns multiple results with distinct labels then the exporter would export multiple time series, but this doesn't seem to work? This query:
which generates this result set:
gives only the 3 total_xxx time series for job_id=1 in Prometheus with the configuration below - the other jobs don't appear??