Skip to content

Commit 08642c3

Browse files
committed
Suppress warning that shows up every minute in postgres log: 'relation "pg_replication_slots" does not exist'
1 parent d4542da commit 08642c3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

deploy.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ setuid postgres_exporter
2323
setgid postgres_exporter
2424
script
2525
DATA_SOURCE_NAME=postgresql://vocabincontext:vocabincontext@localhost/postgres \\
26-
/home/postgres_exporter/postgres_exporter -web.listen-address :9113
26+
/home/postgres_exporter/postgres_exporter -web.listen-address :9113 \\
27+
-extend.query-path /home/postgres_exporter/queries.yaml
2728
end script
2829
EOF2
2930
31+
sudo -u postgres_exporter tee /home/postgres_exporter/queries.yaml <<EOF2
32+
pg_stat_replication:
33+
query: select 1 where 1 = 0
34+
EOF2
35+
3036
sudo service postgres_exporter stop || true
3137
sudo mv /root/postgres_exporter /home/postgres_exporter/postgres_exporter
3238
sudo chown postgres_exporter:postgres_exporter /home/postgres_exporter/postgres_exporter

0 commit comments

Comments
 (0)