Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export db size, deadlocks and changed row metrics #7050

Merged
merged 3 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions vm-image-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,32 @@ files:
query: |
select datname, state, count(*) as count from pg_stat_activity where state <> '' group by datname, state;

- metric_name: pg_stats_userdb
type: gauge
help: 'Stats for the oldest non-system db'
key_labels:
- datname
value_label: kind
values:
- db_size
- deadlocks
# Rows
- inserted
- updated
- deleted
query: |
select pg_database_size(datname) as db_size, deadlocks,
tup_inserted as inserted, tup_updated as updated, tup_deleted as deleted,
datname
from pg_stat_database
where datname IN (
select datname
from pg_database
where datname <> 'postgres' and not datistemplate
order by oid
limit 1
vadim2404 marked this conversation as resolved.
Show resolved Hide resolved
);

build: |
# Build cgroup-tools
#
Expand Down