Skip to content

Commit 251afb9

Browse files
committed
refactoring: changed autovacuum graph type
1 parent 83013d6 commit 251afb9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

mamonsu/plugins/pgsql/databases.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,23 @@ def items(self, template, dashboard=False):
9595
"key": self.right_type(self.key_autovacumm),
9696
"delay": self.plugin_config("interval")
9797
})
98+
else:
99+
return []
100+
101+
def graphs(self, template, dashboard=False):
102+
result = template.graph({
103+
"name": "PostgreSQL Autovacuum: Count of Autovacuum Workers",
104+
"items": {
105+
"key": self.right_type(self.key_autovacumm),
106+
"color": "7EB29B",
107+
"drawtype": 2
108+
}
109+
})
110+
if not dashboard:
111+
return result
98112
else:
99113
return [{
100-
"dashboard": {"name": self.right_type(self.key_autovacumm),
114+
"dashboard": {"name": "PostgreSQL Autovacuum: Count of Autovacuum Workers",
101115
"page": ZbxTemplate.dashboard_page_overview["name"],
102116
"size": ZbxTemplate.dashboard_widget_size_medium,
103117
"position": 5}

0 commit comments

Comments
 (0)