]> arthur.barton.de Git - netdata.git/commitdiff
postgres plugin: connect/reconnect to unix socket fixed
authorIlya <ilyamaschenko@gmail.com>
Thu, 2 Feb 2017 00:47:44 +0000 (09:47 +0900)
committerIlya <ilyamaschenko@gmail.com>
Thu, 2 Feb 2017 00:47:44 +0000 (09:47 +0900)
python.d/postgres.chart.py

index 09815409cf7fdc5db89a1abb93271e41a96a25ef..4087e8c4da5762ce9c6a08b452ff593b7eff6944 100644 (file)
@@ -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: