postgres plugin: connect/reconnect to unix socket fixed
Ilya committed
Feb 2, 2017 at 09:47 UTC
8aa5061c24eb60adc2c2e480f29f296b2f2b452a
1 file changed
+2
-3
python.d/postgres.chart.py
+2
-3
@@ -203,7 +203,7 @@ class Service(SimpleService):
203
params = dict(user='postgres',
204
database=None,
205
password=None,
206
- host='localhost',
206
+ host=None,
207
port=5432)
208
params.update(self.configuration)
209
@@ -301,8 +301,7 @@ class Service(SimpleService):
301
try:
302
self.add_stats(cursor)
303
except OperationalError:
304
- if self.connection.closed == 2:
305
- self.connection = False
304
+ self.connection = False
305
cursor.close()
306
return None
307
else: