forked from alt-dima/zabbix-glusterfs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gluster_storage_template.xml
170 lines (170 loc) · 8.07 KB
/
gluster_storage_template.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
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2020-09-29T10:27:54Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Gluster Storage Template</template>
<name>Gluster Storage</name>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
<items>
<item>
<name>Gluster Storage Active Nodes</name>
<key>gluster_storage_info["nodes_active"]</key>
<delay>2m</delay>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
</item>
<item>
<name>Gluster Storage Nodes</name>
<key>gluster_storage_info["node_count"]</key>
<delay>2m</delay>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
</item>
<item>
<name>Gluster Storage Volume Number</name>
<key>gluster_storage_info["volume_count"]</key>
<delay>2m</delay>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
</item>
</items>
<discovery_rules>
<discovery_rule>
<name>Gluster Volume Names Discovery</name>
<key>gluster_volume_name.discovery</key>
<delay>30s</delay>
<item_prototypes>
<item_prototype>
<name>Gluster Volume % Free Space {#VOLUME_NAME}</name>
<type>CALCULATED</type>
<key>gluster_volume_free_space[{#VOLUME_NAME}]</key>
<delay>30s</delay>
<value_type>FLOAT</value_type>
<units>%</units>
<params>100*((last("gluster_volume_info[\"size_total\",{#VOLUME_NAME}]")-last("gluster_volume_info[\"size_used\",{#VOLUME_NAME}]"))/last("gluster_volume_info[\"size_total\",{#VOLUME_NAME}]"))</params>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{last(,5m)}<{$GLUSTERFS.SPACE.MIN.WARN}</expression>
<name>Gluster Volume Free Space is less than {$GLUSTERFS.SPACE.MIN.WARN}</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Gluster Volume state on {#VOLUME_NAME}</name>
<key>gluster_volume_info["health",{#VOLUME_NAME}]</key>
<delay>30s</delay>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{str(up)}=0</expression>
<name>Gluster Volume state in {#VOLUME_NAME} is down</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Gluster Volume nr_entries {#VOLUME_NAME}</name>
<key>gluster_volume_info["nr_entries",{#VOLUME_NAME}]</key>
<delay>30s</delay>
<units>ents</units>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{last()}<>0</expression>
<name>Gluster nr_entries is above 0</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Gluster Volume Total Size on {#VOLUME_NAME}</name>
<key>gluster_volume_info["size_total",{#VOLUME_NAME}]</key>
<delay>30s</delay>
<units>b</units>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>Gluster Volume Used Size on {#VOLUME_NAME}</name>
<key>gluster_volume_info["size_used",{#VOLUME_NAME}]</key>
<delay>30s</delay>
<units>b</units>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>Gluster Volume snapshot_count on {#VOLUME_NAME}</name>
<key>gluster_volume_info["snapshot_count",{#VOLUME_NAME}]</key>
<delay>30s</delay>
<applications>
<application>
<name>GlusterFS</name>
</application>
</applications>
</item_prototype>
</item_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$GLUSTERFS.SPACE.MIN.WARN}</macro>
<value>10</value>
</macro>
</macros>
</template>
</templates>
<triggers>
<trigger>
<expression>{Gluster Storage Template:gluster_storage_info["nodes_active"].last()} < {Gluster Storage Template:gluster_storage_info["node_count"].last()}</expression>
<name>Gluster storage nodes is not online</name>
<priority>INFO</priority>
</trigger>
</triggers>
</zabbix_export>