mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-03-03 09:58:45 +00:00
fix examples queries: change idle process metric name in order not to override built-in pg_stat_activity.
Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
This commit is contained in:
parent
677d38bc5d
commit
9804c6069c
12
queries.yaml
12
queries.yaml
@ -229,7 +229,7 @@ pg_stat_statements:
|
||||
usage: "COUNTER"
|
||||
description: "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)"
|
||||
|
||||
pg_stat_activity:
|
||||
pg_process_idle:
|
||||
query: |
|
||||
WITH
|
||||
metrics AS (
|
||||
@ -259,16 +259,16 @@ pg_stat_activity:
|
||||
)
|
||||
SELECT
|
||||
application_name,
|
||||
process_idle_seconds_sum,
|
||||
process_idle_seconds_count,
|
||||
ARRAY_AGG(le) AS process_idle_seconds,
|
||||
ARRAY_AGG(bucket) AS process_idle_seconds_bucket
|
||||
process_idle_seconds_sum as seconds_sum,
|
||||
process_idle_seconds_count as seconds_count,
|
||||
ARRAY_AGG(le) AS seconds,
|
||||
ARRAY_AGG(bucket) AS seconds_bucket
|
||||
FROM metrics JOIN buckets USING (application_name)
|
||||
GROUP BY 1, 2, 3
|
||||
metrics:
|
||||
- application_name:
|
||||
usage: "LABEL"
|
||||
description: "Application Name"
|
||||
- process_idle_seconds:
|
||||
- seconds:
|
||||
usage: "HISTOGRAM"
|
||||
description: "Idle time of server processes"
|
||||
|
Loading…
Reference in New Issue
Block a user