From: Ilya Date: Thu, 2 Feb 2017 00:47:44 +0000 (+0900) Subject: postgres plugin: connect/reconnect to unix socket fixed X-Git-Tag: ab-debian_0.20170203.01-0ab1~1^2~3^2~1 X-Git-Url: https://arthur.barton.de/gitweb/?p=netdata.git;a=commitdiff_plain;h=8aa5061c24eb60adc2c2e480f29f296b2f2b452a postgres plugin: connect/reconnect to unix socket fixed --- diff --git a/python.d/postgres.chart.py b/python.d/postgres.chart.py index 09815409..4087e8c4 100644 --- a/python.d/postgres.chart.py +++ b/python.d/postgres.chart.py @@ -203,7 +203,7 @@ class Service(SimpleService): params = dict(user='postgres', database=None, password=None, - host='localhost', + host=None, port=5432) params.update(self.configuration) @@ -301,8 +301,7 @@ class Service(SimpleService): try: self.add_stats(cursor) except OperationalError: - if self.connection.closed == 2: - self.connection = False + self.connection = False cursor.close() return None else: