forked from fernandobrunelli/Zabbix-Templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTemplate Module Linux filesystems SNMP.xml
274 lines (274 loc) · 17 KB
/
Template Module Linux filesystems 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
<?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 filesystems SNMP</template>
<name>Template Module Linux filesystems SNMP</name>
<description>MIBs used:
HOST-RESOURCES-MIB
UCD-SNMP-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>Mounted filesystem 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}: Free inodes in %</name>
<type>SNMP_AGENT</type>
<snmp_oid>1.3.6.1.4.1.2021.9.1.10["index","1.3.6.1.4.1.2021.9.1.2", "{#FSNAME}"]</snmp_oid>
<key>vfs.fs.inode.pfree[dskPercentNode.{#SNMPINDEX}]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<description>MIB: UCD-SNMP-MIB
If having problems collecting this item make sure access to UCD-SNMP-MIB is allowed.</description>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
<preprocessing>
<step>
<type>JAVASCRIPT</type>
<params>return (100-value);</params>
</step>
</preprocessing>
<trigger_prototypes>
<trigger_prototype>
<expression>{min(5m)}<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}</expression>
<name>{#FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}%)</name>
<opdata>Free inodes: {ITEM.LASTVALUE1}</opdata>
<priority>AVERAGE</priority>
<description>It may become impossible to write to disk if there are no index nodes left.
As symptoms, 'No space left on device' or 'Disk is full' errors may be seen even though free space is available.</description>
</trigger_prototype>
<trigger_prototype>
<expression>{min(5m)}<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}</expression>
<name>{#FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)</name>
<opdata>Free inodes: {ITEM.LASTVALUE1}</opdata>
<priority>WARNING</priority>
<description>It may become impossible to write to disk if there are no index nodes left.
As symptoms, 'No space left on device' or 'Disk is full' errors may be seen even though free space is available.</description>
<dependencies>
<dependency>
<name>{#FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}%)</name>
<expression>{Template Module Linux filesystems SNMP:vfs.fs.inode.pfree[dskPercentNode.{#SNMPINDEX}].min(5m)}<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}</expression>
</dependency>
</dependencies>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<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 Linux filesystems SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and
(({Template Module Linux filesystems SNMP:vfs.fs.total[hrStorageSize.{#SNMPINDEX}].last()}-{Template Module Linux filesystems SNMP:vfs.fs.used[hrStorageUsed.{#SNMPINDEX}].last()})<5G or {Template Module Linux filesystems 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 Linux filesystems SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].last()}>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} and
(({Template Module Linux filesystems SNMP:vfs.fs.total[hrStorageSize.{#SNMPINDEX}].last()}-{Template Module Linux filesystems SNMP:vfs.fs.used[hrStorageUsed.{#SNMPINDEX}].last()})<10G or {Template Module Linux filesystems 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 Linux filesystems SNMP:vfs.fs.pused[storageUsedPercentage.{#SNMPINDEX}].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and
(({Template Module Linux filesystems SNMP:vfs.fs.total[hrStorageSize.{#SNMPINDEX}].last()}-{Template Module Linux filesystems SNMP:vfs.fs.used[hrStorageUsed.{#SNMPINDEX}].last()})<5G or {Template Module Linux filesystems 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 Linux filesystems 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 Linux filesystems 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>^\s$</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.INODE.PFREE.MIN.CRIT}</macro>
<value>10</value>
</macro>
<macro>
<macro>{$VFS.FS.INODE.PFREE.MIN.WARN}</macro>
<value>20</value>
</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>