From 7e1daf2cdbdad210bdd10ee7d7441da050131d10 Mon Sep 17 00:00:00 2001 From: Alexey Kondratov Date: Thu, 19 Oct 2023 14:49:50 +0200 Subject: [PATCH] vm-builder: Turn off --auto-discover-databases It causes exporter connection to every database in the Postgres and it was disabled for pods a while ago, but I forgot that VMs have a different build path. See this for details: https://github.com/neondatabase/cloud/commit/0a60057f3380e570b540cc823975e07400cd640c Also remove `--exclude-databases` it seems to be bogus as well, see: https://github.com/prometheus-community/postgres_exporter/issues/588 --- neonvm/tools/vm-builder/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neonvm/tools/vm-builder/main.go b/neonvm/tools/vm-builder/main.go index fea71a501..1da4c6391 100644 --- a/neonvm/tools/vm-builder/main.go +++ b/neonvm/tools/vm-builder/main.go @@ -251,7 +251,7 @@ fi ::respawn:su -p vm-monitor -c 'RUST_LOG=info /usr/local/bin/vm-monitor --addr "0.0.0.0:10301" --cgroup=neon-postgres{{if .FileCache}} --pgconnstr="host=localhost port=5432 dbname=postgres user=cloud_admin sslmode=disable"{{end}}' {{end}} ::respawn:su -p nobody -c '/usr/local/bin/pgbouncer /etc/pgbouncer.ini' -::respawn:su -p nobody -c 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres" /bin/postgres_exporter --auto-discover-databases --exclude-databases=template0,template1' +::respawn:su -p nobody -c 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres" /bin/postgres_exporter' ttyS0::respawn:/neonvm/bin/agetty --8bits --local-line --noissue --noclear --noreset --host console --login-program /neonvm/bin/login --login-pause --autologin root 115200 ttyS0 linux ::shutdown:/neonvm/bin/vmshutdown `