-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathTemplate Module HOST-RESOURCES-MIB storage SNMP.xml
219 lines (219 loc) · 13.3 KB
/
Template Module HOST-RESOURCES-MIB storage 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
<?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 storage SNMP</template>
<name>Template Module HOST-RESOURCES-MIB storage 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>Storage</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>Storage discovery</name>
<type>SNMP_AGENT</type>
<snmp_oid>discovery[{#FSNAME},1.3.6.1.2.1.25.2.3.1.3,{#FSTYPE},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>vfs.fs.discovery[snmp]</key>
<delay>1h</delay>
<filter>
<evaltype>AND</evaltype>
<conditions>
<condition>
<macro>{#FSTYPE}</macro>
<value>{$VFS.FS.FSTYPE.MATCHES}</value>
<formulaid>C</formulaid>
</condition>
<condition>
<macro>{#FSTYPE}</macro>
<value>{$VFS.FS.FSTYPE.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>D</formulaid>
</condition>
<condition>
<macro>{#FSNAME}</macro>
<value>{$VFS.FS.FSNAME.MATCHES}</value>
<formulaid>A</formulaid>
</condition>
<condition>
<macro>{#FSNAME}</macro>
<value>{$VFS.FS.FSNAME.NOT_MATCHES}</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>B</formulaid>
</condition>
</conditions>
</filter>
<description>HOST-RESOURCES-MIB::hrStorage discovery with storage filter.</description>
<item_prototypes>
<item_prototype>
<name>{#FSNAME}: Space utilization</name>
<type>CALCULATED</type>
<key>vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<params>(last("vfs.fs.used[hrStorageUsed.{#SNMPINDEX}]")/last("vfs.fs.total[hrStorageSize.{#SNMPINDEX}]"))*100</params>
<description>Space utilization in % for {#FSNAME}</description>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
</item_prototype>
<item_prototype>
<name>{#FSNAME}: Total space</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.2.1.25.2.3.1.5.{#SNMPINDEX}</snmp_oid>
<key>vfs.fs.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 storage allocated to a buffer pool might be modified or the amount of disk space allocated to virtual storage might be modified.</description>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>{#ALLOC_UNITS}</params>
</step>
</preprocessing>
</item_prototype>
<item_prototype>
<name>{#FSNAME}: Used space</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.2.1.25.2.3.1.6.{#SNMPINDEX}</snmp_oid>
<key>vfs.fs.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>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>{#ALLOC_UNITS}</params>
</step>
</preprocessing>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and
(({Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.total[hrStorageSize.{#SNMPINDEX}].last()}-{Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.used[hrStorageUsed.{#SNMPINDEX}].last()})<5G or {Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].timeleft(1h,,100)}<1d)</expression>
<name>{#FSNAME}: Disk space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%)</name>
<opdata>Space used: {ITEM.LASTVALUE3} of {ITEM.LASTVALUE2} ({ITEM.LASTVALUE1})</opdata>
<priority>AVERAGE</priority>
<description>Two conditions should match: First, space utilization should be above {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}.
Second condition should be one of the following:
- The disk free space is less than 5G.
- The disk will be full in less than 24 hours.</description>
<manual_close>YES</manual_close>
</trigger_prototype>
<trigger_prototype>
<expression>{Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].last()}>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} and
(({Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.total[hrStorageSize.{#SNMPINDEX}].last()}-{Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.used[hrStorageUsed.{#SNMPINDEX}].last()})<10G or {Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].timeleft(1h,,100)}<1d)</expression>
<name>{#FSNAME}: Disk space is low (used > {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%)</name>
<opdata>Space used: {ITEM.LASTVALUE3} of {ITEM.LASTVALUE2} ({ITEM.LASTVALUE1})</opdata>
<priority>WARNING</priority>
<description>Two conditions should match: First, space utilization should be above {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}.
Second condition should be one of the following:
- The disk free space is less than 10G.
- The disk will be full in less than 24 hours.</description>
<manual_close>YES</manual_close>
<dependencies>
<dependency>
<name>{#FSNAME}: Disk space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%)</name>
<expression>{Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and
(({Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.total[hrStorageSize.{#SNMPINDEX}].last()}-{Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.used[hrStorageUsed.{#SNMPINDEX}].last()})<5G or {Template Module HOST-RESOURCES-MIB storage SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].timeleft(1h,,100)}<1d)</expression>
</dependency>
</dependencies>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes>
<graph_prototype>
<name>{#FSNAME}: Disk space usage</name>
<width>600</width>
<height>340</height>
<type>PIE</type>
<show_3d>YES</show_3d>
<graph_items>
<graph_item>
<color>969696</color>
<calc_fnc>LAST</calc_fnc>
<type>GRAPH_SUM</type>
<item>
<host>Template Module HOST-RESOURCES-MIB storage SNMP</host>
<key>vfs.fs.total[hrStorageSize.{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>C80000</color>
<calc_fnc>LAST</calc_fnc>
<item>
<host>Template Module HOST-RESOURCES-MIB storage SNMP</host>
<key>vfs.fs.used[hrStorageUsed.{#SNMPINDEX}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$VFS.FS.FSNAME.MATCHES}</macro>
<value>.+</value>
<description>This macro is used in filesystems discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$VFS.FS.FSNAME.NOT_MATCHES}</macro>
<value>^(/dev|/sys|/run|/proc|.+/shm$)</value>
<description>This macro is used in filesystems discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$VFS.FS.FSTYPE.MATCHES}</macro>
<value>.*(\.4|\.9|hrStorageFixedDisk|hrStorageFlashMemory)$</value>
<description>This macro is used in filesystems discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$VFS.FS.FSTYPE.NOT_MATCHES}</macro>
<value>CHANGE_IF_NEEDED</value>
<description>This macro is used in filesystems discovery. Can be overridden on the host or linked template level.</description>
</macro>
<macro>
<macro>{$VFS.FS.PUSED.MAX.CRIT}</macro>
<value>90</value>
</macro>
<macro>
<macro>{$VFS.FS.PUSED.MAX.WARN}</macro>
<value>80</value>
</macro>
</macros>
</template>
</templates>
</zabbix_export>