Skip to content

Commit 55901a5

Browse files
committed
feature: switched pg_buffercache graph to System Memory graph in Mamonsu Dashboard
1 parent d5f5566 commit 55901a5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mamonsu/plugins/system/linux/memory.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class Memory(Plugin):
3636
("vmalloc_used", "VmallocUsed", "VMallocUsed - vmaloc() Allocated by Kernel", "CF6518", 1)
3737
]
3838

39+
graph_name_detailed = "System: Server Memory Detailed Overview"
40+
graph_name_free_used = "System: Server Free/Used Memory Overview"
41+
3942
def run(self, zbx):
4043

4144
meminfo, result = {}, {}
@@ -93,13 +96,13 @@ def graphs(self, template, dashboard=False):
9396
})
9497
graphs = [
9598
{
96-
"name": "System: Server Memory Detailed Overview",
99+
"name": self.graph_name_detailed,
97100
"height": 400,
98101
"type": 1,
99102
"items": all_items
100103
},
101104
{
102-
"name": "System: Server Free/Used Memory Overview",
105+
"name": self.graph_name_free_used,
103106
"height": 400,
104107
"type": 1,
105108
"items": free_used_items

mamonsu/tools/zabbix_cli/dashboard.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from mamonsu.plugins.pgsql.health import PgHealth
99
from mamonsu.plugins.pgsql.instance import Instance
1010
from mamonsu.plugins.pgsql.oldest import Oldest
11-
from mamonsu.plugins.pgsql.pg_buffercache import PgBufferCache
1211
from mamonsu.plugins.pgsql.pg_locks import PgLocks
1312
from mamonsu.plugins.pgsql.replication import Replication
1413
from mamonsu.plugins.pgsql.wal import Wal
@@ -1052,7 +1051,7 @@ def generate_dashboard(template, uuid):
10521051
Connections.graph_name,
10531052
PgLocks.graph_name,
10541053
Instance.graphs_name["transactions"],
1055-
PgBufferCache.graph_name,
1054+
Memory.graph_name_free_used,
10561055
ArchiveCommand.key.format("[" + ArchiveCommand.Items[2][0] + "]"),
10571056
Databases.key_autovacumm.format("[]"),
10581057
BgWriter.graph_name_buffers,

0 commit comments

Comments
 (0)