postgres module: locks count fix (#4901)
Ilya Mashchenko committed
Dec 3, 2018 at 16:01 UTC
660b633b9749219de1806bfee0df4633393f2c57
1 file changed
+2
-1
collectors/python.d.plugin/postgres/postgres.chart.py
+2
-1
@@ -703,7 +703,8 @@ class Service(SimpleService):
703
if row[metric] is not None:
704
self.data[dimension_id] = int(row[metric])
705
elif 'locks_count' in row:
706
- self.data[dimension_id] = row['locks_count'] if metric == row['mode'] else 0
706
+ if metric == row['mode']:
707
+ self.data[dimension_id] = row['locks_count']
708
709
710
def discover_databases_(cursor, query):