Bonjour

Afin de monitorer une base postgres11 je tente sans succes pour l'instant d'utiliser PgWatch2 dans docker
Actuellement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
1 j'ai un docker avec PgWatch2 
docker run -d --restart=unless-stopped -p 3000:3000 -p 8080:8080 --name pw2a cybertec/pgwatch2:latest
Ou
docker run -d --restart=unless-stopped -p 3000:3000 -p 8080:8080 --name pw2nr cybertec/pgwatch2-nonroot:latest
Je peux me connecter sur le port 8080 et meme le port 3000
 
 
2 sur mon poste Windows10 hors du docker j'ai un Postgres11 avec une base "mabase", elle fonctionne et il y a des données
et
# postgresql.conf
shared_preload_libraries = 'pg_stat_statements'
 
pg_stat_statements.max = 10000
pg_stat_statements.track = all
 
 
3 J'ai cree un role PGWATCH2 dans ma base
CREATE ROLE pgwatch2 WITH LOGIN PASSWORD 'secret';
-- NB! For critical databases it might make sense to ensure that the user account
-- used for monitoring can only open a limited number of connections
-- (there are according checks in code, but multiple instances might be launched)
ALTER ROLE pgwatch2 CONNECTION LIMIT 3;
GRANT pg_monitor TO pgwatch2;   
GRANT CONNECT ON DATABASE mabase TO pgwatch2;
GRANT USAGE ON SCHEMA public TO pgwatch2; -- NB! pgwatch doesn't necessarily require using the public schema though!
GRANT EXECUTE ON FUNCTION pg_stat_file(text) to pgwatch2; -- needed by the wal_size metric
 
 
4 lorsque je configure dans le host de docker dans la partie admin de Cybertecpgwatch2 sur le port 8080 mon user pour mabase
Voici mes 3 tests fait séparement
unique name		DB type 	DB host 	    DB port 	DB dbname 	DB user 	DB password 	Preset metrics config 
test1			       postgres 	localhost	    5432		mabase		pgwatch2	secret			full
test2				postgres	192.168.1.21 5432             mabase             pgwatch2  secret                       full
test3				postgres	 127.0.0.1      5432            mabase             pgwatch2  secret                       full
 
 
Cela ne fonctionne pas ??
Ou est mon erreur ?
Merci