mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-24 12:07:59 +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"
|
usage: "COUNTER"
|
||||||
description: "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)"
|
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: |
|
query: |
|
||||||
WITH
|
WITH
|
||||||
metrics AS (
|
metrics AS (
|
||||||
@ -259,16 +259,16 @@ pg_stat_activity:
|
|||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
application_name,
|
application_name,
|
||||||
process_idle_seconds_sum,
|
process_idle_seconds_sum as seconds_sum,
|
||||||
process_idle_seconds_count,
|
process_idle_seconds_count as seconds_count,
|
||||||
ARRAY_AGG(le) AS process_idle_seconds,
|
ARRAY_AGG(le) AS seconds,
|
||||||
ARRAY_AGG(bucket) AS process_idle_seconds_bucket
|
ARRAY_AGG(bucket) AS seconds_bucket
|
||||||
FROM metrics JOIN buckets USING (application_name)
|
FROM metrics JOIN buckets USING (application_name)
|
||||||
GROUP BY 1, 2, 3
|
GROUP BY 1, 2, 3
|
||||||
metrics:
|
metrics:
|
||||||
- application_name:
|
- application_name:
|
||||||
usage: "LABEL"
|
usage: "LABEL"
|
||||||
description: "Application Name"
|
description: "Application Name"
|
||||||
- process_idle_seconds:
|
- seconds:
|
||||||
usage: "HISTOGRAM"
|
usage: "HISTOGRAM"
|
||||||
description: "Idle time of server processes"
|
description: "Idle time of server processes"
|
||||||
|
Loading…
Reference in New Issue
Block a user