Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions queries-hr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pg_custom_replication_slots:
master: true
query: |
SELECT
slot_name,
Expand Down Expand Up @@ -29,6 +30,7 @@ pg_custom_replication_slots:
description: "Confirmed flush LSN in bytes for the replication slot."

pg_custom_stat_wal_receiver:
master: true
query: |
SELECT
status,
Expand Down Expand Up @@ -72,8 +74,8 @@ pg_custom_stat_wal_receiver:


pg_custom_database_size_custom:
master: true
query: "SELECT pg_database.datname, pg_database_size(pg_database.datname) as bytes FROM pg_database"
master: false
cache_seconds: 30
metrics:
- datname:
Expand All @@ -84,6 +86,7 @@ pg_custom_database_size_custom:
description: "Disk space used by the database"

pg_custom_replication_wal:
master: true
query: |
SELECT
pg_last_wal_receive_lsn() AS received_lsn,
Expand All @@ -105,6 +108,7 @@ pg_custom_replication_wal:
description: "Current WAL replication lag in bytes."

pg_custom_stat_replication:
master: true
query: |
SELECT
pid,
Expand Down Expand Up @@ -159,6 +163,7 @@ pg_custom_stat_replication:
description: "Synchronization state (e.g., async, sync)."

pg_custom_stat_activity_walsender:
master: true
query: |
SELECT
pid,
Expand Down Expand Up @@ -190,14 +195,15 @@ pg_custom_stat_activity_walsender:
description: "Current state of the WAL sender process"

pg_custom_stat_subscription:
master: true
query: "SELECT subid, subname, pid, received_lsn, last_msg_send_time, last_msg_receipt_time FROM pg_stat_subscription;"
metrics:
- subid:
usage: "LABEL"
description: "Subscription ID"
- subname:
usage: "LABEL"
description: "Subscription Name"
description: "Subscription Name"
- pid:
usage: "GAUGE"
description: "Process ID of subscription worker"
Expand All @@ -212,6 +218,7 @@ pg_custom_stat_subscription:
description: "Last message receipt time"

pg_custom_publication:
master: true
query: "SELECT pubname, puballtables, pubinsert, pubupdate, pubdelete FROM pg_publication;"
metrics:
- pubname:
Expand Down
Loading