-
Notifications
You must be signed in to change notification settings - Fork 128
/
Template Module Linux filesystems by Zabbix agent.xml
236 lines (236 loc) · 14.4 KB
/
Template Module Linux filesystems 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
<?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 by Zabbix agent</template>
<name>Template Module Linux filesystems by Zabbix agent</name>
<description>Template tooling version used: 0.36</description>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<applications>
<application>
<name>Filesystems</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>Mounted filesystem discovery</name>
<key>vfs.fs.discovery</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>Discovery of file systems of different types.</description>
<item_prototypes>
<item_prototype>
<name>{#FSNAME}: Free inodes in %</name>
<key>vfs.fs.inode[{#FSNAME},pfree]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
<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 by Zabbix agent:vfs.fs.inode[{#FSNAME},pfree].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>
<key>vfs.fs.size[{#FSNAME},pused]</key>
<history>7d</history>
<value_type>FLOAT</value_type>
<units>%</units>
<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>
<key>vfs.fs.size[{#FSNAME},total]</key>
<history>7d</history>
<units>B</units>
<description>Total space in Bytes</description>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
</item_prototype>
<item_prototype>
<name>{#FSNAME}: Used space</name>
<key>vfs.fs.size[{#FSNAME},used]</key>
<history>7d</history>
<units>B</units>
<description>Used storage in Bytes</description>
<application_prototypes>
<application_prototype>
<name>Filesystem {#FSNAME}</name>
</application_prototype>
</application_prototypes>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and
(({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},total].last()}-{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},used].last()})<5G or {Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].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 by Zabbix agent:vfs.fs.size[{#FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} and
(({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},total].last()}-{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},used].last()})<10G or {Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].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 by Zabbix agent:vfs.fs.size[{#FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and
(({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},total].last()}-{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},used].last()})<5G or {Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].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 by Zabbix agent</host>
<key>vfs.fs.size[{#FSNAME},total]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>C80000</color>
<calc_fnc>LAST</calc_fnc>
<item>
<host>Template Module Linux filesystems by Zabbix agent</host>
<key>vfs.fs.size[{#FSNAME},used]</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>^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$</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>