Skip to content

Commit ee98aa6

Browse files
authored
Merge pull request #221 from postgrespro/MMNS-47_fix_pgpro_stats_totals_none
fix(statements): fix None to int conversion
2 parents 8c1420d + fdd59e3 commit ee98aa6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mamonsu/plugins/pgsql/statements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def run(self, zbx):
226226
metrics=(", ".join(columns)), extension_schema=extension_schema) if Pooler.is_bootstraped() else self.query[
227227
self.extension].format(metrics=(", ".join(columns)), extension_schema=extension_schema))
228228
for key, value in enumerate(result[0]):
229-
zbx_key, value = "pgsql.{0}".format(all_items[key][0]), int(value)
229+
zbx_key, value = "pgsql.{0}".format(all_items[key][0]), int(value or 0)
230230
zbx.send(zbx_key, value, all_items[key][4])
231231

232232
def items(self, template, dashboard=False):

0 commit comments

Comments
 (0)