neonvm: add LFC approximate working set size to metrics (#7252)

ref https://github.com/neondatabase/autoscaling/pull/878
ref https://github.com/neondatabase/autoscaling/issues/872

Add `approximate_working_set_size` to sql exporter so that autoscaling
can use it in the future.

---------

Signed-off-by: Alex Chi Z <chi@neon.tech>
Co-authored-by: Peter Bendel <peterbendel@neon.tech>
This commit is contained in:
Alex Chi Z
2024-03-29 12:11:17 -04:00
committed by GitHub
parent 63213fc814
commit 7ddc7b4990

View File

@@ -187,6 +187,14 @@ files:
query: |
select sum(pg_database_size(datname)) as total from pg_database;
- metric_name: lfc_approximate_working_set_size
type: gauge
help: 'Approximate working set size in pages of 8192 bytes'
key_labels:
values: [approximate_working_set_size]
query: |
select neon.approximate_working_set_size(false) as approximate_working_set_size;
build: |
# Build cgroup-tools
#