-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathTemplate Module Linux memory SNMP.xml
317 lines (317 loc) · 14.3 KB
/
Template Module Linux memory SNMP.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?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 SNMP</template>
<name>Template Module Linux memory SNMP</name>
<description>MIBs used:
UCD-SNMP-MIB
Known Issues:
Description: Please note that memory utilization is a rough estimate, since memory available is calculated as free+buffers+cached, which is not 100% accurate, but the best we can get using SNMP.
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>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.4.4.0</snmp_oid>
<key>system.swap.free[memAvailSwap.0]</key>
<history>7d</history>
<units>B</units>
<description>MIB: UCD-SNMP-MIB
The amount of swap space currently unused or available.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item>
<item>
<name>Free swap space in %</name>
<type>CALCULATED</type>
<key>system.swap.pfree[snmp]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<params>last("system.swap.free[memAvailSwap.0]")/last("system.swap.total[memTotalSwap.0]")*100</params>
<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>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.4.3.0</snmp_oid>
<key>system.swap.total[memTotalSwap.0]</key>
<history>7d</history>
<units>B</units>
<description>MIB: UCD-SNMP-MIB
The total amount of swap space configured for this host.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item>
<item>
<name>Available memory</name>
<type>CALCULATED</type>
<key>vm.memory.available[snmp]</key>
<history>7d</history>
<units>B</units>
<params>last("vm.memory.free[memAvailReal.0]")+last("vm.memory.buffers[memBuffer.0]")+last("vm.memory.cached[memCached.0]")</params>
<description>Please note that memory utilization is a rough estimate, since memory available is calculated as free+buffers+cached, which is not 100% accurate, but the best we can get using SNMP.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
</item>
<item>
<name>Memory (buffers)</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.4.14.0</snmp_oid>
<key>vm.memory.buffers[memBuffer.0]</key>
<history>7d</history>
<units>B</units>
<description>MIB: UCD-SNMP-MIB
Memory used by kernel buffers (Buffers in /proc/meminfo)</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item>
<item>
<name>Memory (cached)</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.4.15.0</snmp_oid>
<key>vm.memory.cached[memCached.0]</key>
<history>7d</history>
<units>B</units>
<description>MIB: UCD-SNMP-MIB
Memory used by the page cache and slabs (Cached and Slab in /proc/meminfo)</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item>
<item>
<name>Free memory</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.4.6.0</snmp_oid>
<key>vm.memory.free[memAvailReal.0]</key>
<history>7d</history>
<units>B</units>
<description>MIB: UCD-SNMP-MIB</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item>
<item>
<name>Total memory</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.4.5.0</snmp_oid>
<key>vm.memory.total[memTotalReal.0]</key>
<history>7d</history>
<units>B</units>
<description>MIB: UCD-SNMP-MIB
Total memory in Bytes</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item>
<item>
<name>Memory utilization</name>
<type>CALCULATED</type>
<key>vm.memory.util[snmp]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<params>(last("vm.memory.total[memTotalReal.0]")-(last("vm.memory.free[memAvailReal.0]")+last("vm.memory.buffers[memBuffer.0]")+last("vm.memory.cached[memCached.0]")))/last("vm.memory.total[memTotalReal.0]")*100</params>
<description>Please note that memory utilization is a rough estimate, since memory available is calculated as free+buffers+cached, which is not 100% accurate, but the best we can get using SNMP.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<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 SNMP:vm.memory.available[snmp].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory SNMP:vm.memory.total[memTotalReal.0].last()}>0</expression>
</dependency>
</dependencies>
</trigger>
</triggers>
</item>
</items>
<macros>
<macro>
<macro>{$MEMORY.AVAILABLE.MIN}</macro>
<value>20M</value>
</macro>
<macro>
<macro>{$MEMORY.UTIL.MAX}</macro>
<value>90</value>
</macro>
<macro>
<macro>{$SWAP.PFREE.MIN.WARN}</macro>
<value>50</value>
</macro>
</macros>
</template>
</templates>
<triggers>
<trigger>
<expression>{Template Module Linux memory SNMP:system.swap.pfree[snmp].min(5m)}<{$SWAP.PFREE.MIN.WARN} and {Template Module Linux memory SNMP:system.swap.total[memTotalSwap.0].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 SNMP:vm.memory.util[snmp].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 SNMP:vm.memory.available[snmp].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory SNMP:vm.memory.total[memTotalReal.0].last()}>0</expression>
</dependency>
</dependencies>
</trigger>
<trigger>
<expression>{Template Module Linux memory SNMP:vm.memory.available[snmp].min(5m)}<{$MEMORY.AVAILABLE.MIN} and {Template Module Linux memory SNMP:vm.memory.total[memTotalReal.0].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 SNMP</host>
<key>vm.memory.total[memTotalReal.0]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>2774A4</color>
<item>
<host>Template Module Linux memory SNMP</host>
<key>vm.memory.available[snmp]</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 SNMP</host>
<key>vm.memory.util[snmp]</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 SNMP</host>
<key>system.swap.free[memAvailSwap.0]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>2774A4</color>
<item>
<host>Template Module Linux memory SNMP</host>
<key>system.swap.total[memTotalSwap.0]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>