From cdcf6be8139c1ef62c0d54309cb6a36d472966b3 Mon Sep 17 00:00:00 2001 From: Alexey Kondratov Date: Fri, 20 Oct 2023 08:24:21 +0200 Subject: [PATCH] vm-builder: Turn off --auto-discover-databases (#571) 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 / control path. See this commit 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 `