@cryptotaxi247 / netdata-1 / commits / 0ac75e718

postgres plugin: better error handling on plugin start

Ilya committed Feb 2, 2017 at 13:21 UTC 0ac75e7185115b5afbc186f490415843b38a487c
1 file changed +3 -1
python.d/postgres.chart.py
+3 -1
@@ -218,7 +218,9 @@ class Service(SimpleService):
218
219 def check(self):
220 try:
221 - self._connect()
221 + if not self._connect():
222 + self.error('Can\'t connect to %s' % str(self.configuration))
223 + return False
224 cursor = self.connection.cursor()
225 self._discover_databases(cursor)
226 self._check_if_superuser(cursor)