Skip to content

Commit 66ccd09

Browse files
committed
fix: switched pg_buffercache graph on Overview screen to Transactions Rate graph
1 parent 6dd9322 commit 66ccd09

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

mamonsu/plugins/pgsql/instance.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,24 @@ def graphs(self, template, dashboard=False):
174174
return result
175175
else:
176176
return [{
177-
"dashboard": {"name": "PostgreSQL Instance: Tuples",
177+
"dashboard": {"name": self.graphs_name["tuples"],
178178
"page": ZbxTemplate.dashboard_page_overview["name"],
179179
"size": ZbxTemplate.dashboard_widget_size_medium,
180180
"position": 6}
181181
},
182182
{
183-
"dashboard": {"name": "PostgreSQL Instance: Events",
183+
"dashboard": {"name": self.graphs_name["events"],
184184
"page": ZbxTemplate.dashboard_page_instance["name"],
185185
"size": ZbxTemplate.dashboard_widget_size_medium,
186186
"position": 4}
187-
}]
187+
},
188+
{
189+
"dashboard": {"name": self.graphs_name["transactions"],
190+
"page": ZbxTemplate.dashboard_page_overview["name"],
191+
"size": ZbxTemplate.dashboard_widget_size_medium,
192+
"position": 2}
193+
}
194+
]
188195

189196
def triggers(self, template, dashboard=False):
190197
return template.trigger({

mamonsu/plugins/pgsql/pg_buffercache.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin
44
from .pool import Pooler
5-
from mamonsu.lib.zbx_template import ZbxTemplate
65

76

87
class PgBufferCache(Plugin):
@@ -63,12 +62,7 @@ def graphs(self, template, dashboard=False):
6362
"name": self.graph_name,
6463
"items": items})
6564
else:
66-
return [{
67-
"dashboard": {"name": self.graph_name,
68-
"page": ZbxTemplate.dashboard_page_overview["name"],
69-
"size": ZbxTemplate.dashboard_widget_size_medium,
70-
"position": 2}
71-
}]
65+
return []
7266

7367
def keys_and_queries(self, template_zabbix):
7468
if self.extension_installed("pg_buffercache"):

0 commit comments

Comments
 (0)