@cryptotaxi247 / netdata-1 / commits / ab1207ba8

fix postgres password bug and change default config (#10531)

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Odysseas Lamtzidis committed Jan 20, 2021 at 19:40 UTC ab1207ba861093928310e98ef107e1492239f3b6
2 files changed +9 -2
collectors/python.d.plugin/postgres/postgres.chart.py
+1 -1
@@ -1162,7 +1162,7 @@ def zero_lock_types(databases):
1162
1163
1164 def hide_password(config):
1165 - return dict((k, v if k != 'password' else '*****') for k, v in config.items())
1165 + return dict((k, v if k != 'password' or not v else '*****') for k, v in config.items())
1166
1167
1168 def add_database_lock_chart(order, definitions, database_name):
collectors/python.d.plugin/postgres/postgres.conf
+8 -1
@@ -81,7 +81,7 @@
81 # sslkey : path/to/key # the location of the client key file
82 #
83 # SSL connection parameters description: https://www.postgresql.org/docs/current/libpq-ssl.html
84 -#
84 +#
85 # Additionally, the following options allow selective disabling of charts
86 #
87 # table_stats : false
@@ -93,6 +93,10 @@
93 # a postgres user for netdata and add its password below to allow
94 # netdata connect.
95 #
96 +# Please note that when running Postgres from inside the container,
97 +# the client (Netdata) is not considered local, unless it runs from inside
98 +# the same container.
99 +#
100 # Postgres supported versions are :
101 # - 9.3 (without autovacuum)
102 # - 9.4
@@ -116,6 +120,7 @@ tcp:
120 name : 'local'
121 database : 'postgres'
122 user : 'postgres'
123 + password : 'postgres'
124 host : 'localhost'
125 port : 5432
126
@@ -123,6 +128,7 @@ tcpipv4:
128 name : 'local'
129 database : 'postgres'
130 user : 'postgres'
131 + password : 'postgres'
132 host : '127.0.0.1'
133 port : 5432
134
@@ -130,5 +136,6 @@ tcpipv6:
136 name : 'local'
137 database : 'postgres'
138 user : 'postgres'
139 + password : 'postgres'
140 host : '::1'
141 port : 5432