diff options
author | Ilya Mashchenko <ilyamaschenko@gmail.com> | 2018-12-03 16:01:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 16:01:39 +0300 |
commit | 660b633b9749219de1806bfee0df4633393f2c57 (patch) | |
tree | 26e5a85623d138c26f2d73a4aa4ecea0e63663a5 /collectors/python.d.plugin/postgres | |
parent | f1e0ff8eba3a97b4dec7cc8db0ff39394935d1ab (diff) |
postgres module: locks count fix (#4901)
Diffstat (limited to 'collectors/python.d.plugin/postgres')
-rw-r--r-- | collectors/python.d.plugin/postgres/postgres.chart.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/postgres/postgres.chart.py b/collectors/python.d.plugin/postgres/postgres.chart.py index 7f43877c36..8466a73f7d 100644 --- a/collectors/python.d.plugin/postgres/postgres.chart.py +++ b/collectors/python.d.plugin/postgres/postgres.chart.py @@ -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): |