-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathTemplate Module HOST-RESOURCES-MIB memory SNMP.xml
179 lines (179 loc) · 9.44 KB
/
Template Module HOST-RESOURCES-MIB 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
<?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 HOST-RESOURCES-MIB memory SNMP</template>
<name>Template Module HOST-RESOURCES-MIB memory SNMP</name>
<description>MIBs used:
HOST-RESOURCES-MIB
Template tooling version used: 0.36</description>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>Memory discovery</name>
<type>SNMP_AGENT</type>
<snmp_oid>discovery[{#MEMNAME},1.3.6.1.2.1.25.2.3.1.3,{#MEMTYPE},1.3.6.1.2.1.25.2.3.1.2,{#ALLOC_UNITS},1.3.6.1.2.1.25.2.3.1.4]</snmp_oid>
<key>vm.memory.discovery</key>
<delay>1h</delay>
<filter>
<evaltype>AND</evaltype>
<conditions>
<condition>
<macro>{#MEMTYPE}</macro>
<value>{$MEMORY.TYPE.MATCHES}</value>
<formulaid>C</formulaid>
</condition>
<condition>
<macro>{#MEMTYPE}</macro>
<value>{$MEMORY.TYPE.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>D</formulaid>
</condition>
<condition>
<macro>{#MEMNAME}</macro>
<value>{$MEMORY.NAME.MATCHES}</value>
<formulaid>A</formulaid>
</condition>
<condition>
<macro>{#MEMNAME}</macro>
<value>{$MEMORY.NAME.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>B</formulaid>
</condition>
</conditions>
</filter>
<description>HOST-RESOURCES-MIB::hrStorage discovery with memory filter</description>
<item_prototypes>
<item_prototype>
<name>{#MEMNAME}: Total memory</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.2.1.25.2.3.1.5.{#SNMPINDEX}</snmp_oid>
<key>vm.memory.total[hrStorageSize.{#SNMPINDEX}]</key>
<history>7d</history>
<units>B</units>
<description>MIB: HOST-RESOURCES-MIB
The size of the storage represented by this entry, in units of hrStorageAllocationUnits.
This object is writable to allow remote configuration of the size of the storage area in those cases where such an operation makes sense and is possible on the underlying system.
For example, the amount of main memory allocated to a buffer pool might be modified or the amount of disk space allocated to virtual memory might be modified.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>{#ALLOC_UNITS}</params>
</step>
</preprocessing>
</item_prototype>
<item_prototype>
<name>{#MEMNAME}: Used memory</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.2.1.25.2.3.1.6.{#SNMPINDEX}</snmp_oid>
<key>vm.memory.used[hrStorageUsed.{#SNMPINDEX}]</key>
<history>7d</history>
<units>B</units>
<description>MIB: HOST-RESOURCES-MIB
The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits.</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>{#ALLOC_UNITS}</params>
</step>
</preprocessing>
</item_prototype>
<item_prototype>
<name>{#MEMNAME}: Memory utilization</name>
<type>CALCULATED</type>
<key>vm.memory.util[memoryUsedPercentage.{#SNMPINDEX}]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<params>last("vm.memory.used[hrStorageUsed.{#SNMPINDEX}]")/last("vm.memory.total[hrStorageSize.{#SNMPINDEX}]")*100</params>
<description>Memory utilization in %</description>
<applications>
<application>
<name>Memory</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{min(5m)}>{$MEMORY.UTIL.MAX}</expression>
<name>{#MEMNAME}: High memory utilization ( >{$MEMORY.UTIL.MAX}% for 5m)</name>
<priority>AVERAGE</priority>
<description>The system is running out of free memory.</description>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<name>{#MEMNAME}: 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 HOST-RESOURCES-MIB memory SNMP</host>
<key>vm.memory.util[memoryUsedPercentage.{#SNMPINDEX}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$MEMORY.NAME.MATCHES}</macro>
<value>.*</value>
<description>This macro is used in memory discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$MEMORY.NAME.NOT_MATCHES}</macro>
<value>CHANGE_IF_NEEDED</value>
<description>This macro is used in memory discovery. Can be overridden on the host or linked template level if you need to filter out results.</description>
</macro>
<macro>
<macro>{$MEMORY.TYPE.MATCHES}</macro>
<value>.*(\.2|hrStorageRam)$</value>
<description>This macro is used in memory discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$MEMORY.TYPE.NOT_MATCHES}</macro>
<value>CHANGE_IF_NEEDED</value>
<description>This macro is used in memory discovery. Can be overridden on the host or linked template level if you need to filter out results.</description>
</macro>
<macro>
<macro>{$MEMORY.UTIL.MAX}</macro>
<value>90</value>
<description>The warning threshold of the "Physical memory: Memory utilization" item.</description>
</macro>
</macros>
</template>
</templates>
</zabbix_export>