0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-05-17 22:52:21 +00:00

postgres module: locks count fix ()

This commit is contained in:
Ilya Mashchenko 2018-12-03 16:01:39 +03:00 committed by GitHub
parent f1e0ff8eba
commit 660b633b97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -703,7 +703,8 @@ class Service(SimpleService):
if row[metric] is not None:
self.data[dimension_id] = int(row[metric])
elif 'locks_count' in row:
self.data[dimension_id] = row['locks_count'] if metric == row['mode'] else 0
if metric == row['mode']:
self.data[dimension_id] = row['locks_count']
def discover_databases_(cursor, query):