forked from fernandobrunelli/Zabbix-Templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTemplate Module Linux memory by Zabbix agent.xml
241 lines (241 loc) · 10.9 KB
/
Template Module Linux memory by Zabbix agent.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<templates>
<template>
<template>Template Module Linux memory by Zabbix agent</template>
<name>Template Module Linux memory by Zabbix agent</name>
<description>Template tooling version used: 0.36</description>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<items>
<item>
<name>Free swap space</name>
<key>system.swap.size[,free]</key>
<history>7d</history>
<units>B</units>
<description>The free space of swap volume/file in bytes.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Free swap space in %</name>
<key>system.swap.size[,pfree]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<description>The free space of swap volume/file in percent.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Total swap space</name>
<key>system.swap.size[,total]</key>
<history>7d</history>
<units>B</units>
<description>The total space of swap volume/file in bytes.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Available memory</name>
<key>vm.memory.size[available]</key>
<history>7d</history>
<units>B</units>
<description>Available memory, in Linux, available = free + buffers + cache. On other platforms calculation may vary. See also: https://www.zabbix.com/documentation/current/manual/appendix/items/vm.memory.size_params</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Available memory in %</name>
<key>vm.memory.size[pavailable]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<description>Available memory as percentage of total. See also: https://www.zabbix.com/documentation/current/manual/appendix/items/vm.memory.size_params</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Total memory</name>
<key>vm.memory.size[total]</key>
<history>7d</history>
<units>B</units>
<description>Total memory in Bytes</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Memory utilization</name>
<type>DEPENDENT</type>
<key>vm.memory.utilization</key>
<delay>0</delay>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<description>Memory used percentage is calculated as (100-pavailable)</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>JAVASCRIPT</type>
<params>return (100-value);</params>
</step>
</preprocessing>
<master_item>
<key>vm.memory.size[pavailable]</key>
</master_item>
<triggers>
<trigger>
<expression>{min(5m)}>{$MEMORY.UTIL.MAX}</expression>
<name>High memory utilization ( >{$MEMORY.UTIL.MAX}% for 5m)</name>
<priority>AVERAGE</priority>
<description>The system is running out of free memory.</description>
<dependencies>
<dependency>
<name>Lack of available memory ( < {$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})</name>
<expression>{Template Module Linux memory by Zabbix agent:vm.memory.size[available].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory by Zabbix agent:vm.memory.size[total].last()}>0</expression>
</dependency>
</dependencies>
</trigger>
</triggers>
</item>
</items>
<macros>
<macro>
<macro>{$MEMORY.AVAILABLE.MIN}</macro>
<value>20M</value>
<description>This macro is used as a threshold in memory available trigger.</description>
</macro>
<macro>
<macro>{$MEMORY.UTIL.MAX}</macro>
<value>90</value>
<description>This macro is used as a threshold in memory utilization trigger.</description>
</macro>
<macro>
<macro>{$SWAP.PFREE.MIN.WARN}</macro>
<value>50</value>
</macro>
</macros>
</template>
</templates>
<triggers>
<trigger>
<expression>{Template Module Linux memory by Zabbix agent:system.swap.size[,pfree].min(5m)}<{$SWAP.PFREE.MIN.WARN} and {Template Module Linux memory by Zabbix agent:system.swap.size[,total].last()}>0</expression>
<name>High swap space usage ( less than {$SWAP.PFREE.MIN.WARN}% free)</name>
<opdata>Free: {ITEM.LASTVALUE1}, total: {ITEM.LASTVALUE2}</opdata>
<priority>WARNING</priority>
<description>This trigger is ignored, if there is no swap configured</description>
<dependencies>
<dependency>
<name>High memory utilization ( >{$MEMORY.UTIL.MAX}% for 5m)</name>
<expression>{Template Module Linux memory by Zabbix agent:vm.memory.utilization.min(5m)}>{$MEMORY.UTIL.MAX}</expression>
</dependency>
<dependency>
<name>Lack of available memory ( < {$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})</name>
<expression>{Template Module Linux memory by Zabbix agent:vm.memory.size[available].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory by Zabbix agent:vm.memory.size[total].last()}>0</expression>
</dependency>
</dependencies>
</trigger>
<trigger>
<expression>{Template Module Linux memory by Zabbix agent:vm.memory.size[available].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory by Zabbix agent:vm.memory.size[total].last()}>0</expression>
<name>Lack of available memory ( < {$MEMORY.AVAILABLE.MIN} of {ITEM.VALUE2})</name>
<opdata>Available: {ITEM.LASTVALUE1}, total: {ITEM.LASTVALUE2}</opdata>
<priority>AVERAGE</priority>
</trigger>
</triggers>
<graphs>
<graph>
<name>Memory usage</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<drawtype>BOLD_LINE</drawtype>
<color>1A7C11</color>
<item>
<host>Template Module Linux memory by Zabbix agent</host>
<key>vm.memory.size[total]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>2774A4</color>
<item>
<host>Template Module Linux memory by Zabbix agent</host>
<key>vm.memory.size[available]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Memory utilization</name>
<ymin_type_1>FIXED</ymin_type_1>
<ymax_type_1>FIXED</ymax_type_1>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>1A7C11</color>
<item>
<host>Template Module Linux memory by Zabbix agent</host>
<key>vm.memory.utilization</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Swap usage</name>
<graph_items>
<graph_item>
<color>1A7C11</color>
<item>
<host>Template Module Linux memory by Zabbix agent</host>
<key>system.swap.size[,free]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>2774A4</color>
<item>
<host>Template Module Linux memory by Zabbix agent</host>
<key>system.swap.size[,total]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>