forked from stakezone/nodemonitorgaiad
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzbx_4__template_nodemonitorgaiad.xml
239 lines (239 loc) · 11 KB
/
zbx_4__template_nodemonitorgaiad.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
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.4</version>
<date>2020-05-02T08:44:33Z</date>
<groups>
<group>
<name>Templates/Applications</name>
</group>
</groups>
<templates>
<template>
<template>Template App Cosmos Gaiad</template>
<name>Template App Cosmos Gaiad</name>
<description>Cosmos Node</description>
<groups>
<group>
<name>Templates/Applications</name>
</group>
</groups>
<applications>
<application>
<name>Cosmos Gaiad</name>
</application>
</applications>
<items>
<item>
<name>nodemonitor npeers</name>
<type>ZABBIX_ACTIVE</type>
<key>logrt[{$NMLOGFILE},"npeers=([0-9\.]*)",,,skip,\1,]</key>
<delay>{$NMUPDATEINTERVAL}</delay>
<history>5d</history>
<applications>
<application>
<name>Cosmos Gaiad</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}<={$NMTHRSHLDPEERS}</expression>
<name>{$NMNODEID} npeers <= {$NMTHRSHLDPEERS} : n={ITEM.VALUE}</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>nodemonitor npersistentpeersoff</name>
<type>ZABBIX_ACTIVE</type>
<key>logrt[{$NMLOGFILE},"npersistentpeersoff=([0-9\.]*)",,,skip,\1,]</key>
<delay>{$NMUPDATEINTERVAL}</delay>
<history>5d</history>
<applications>
<application>
<name>Cosmos Gaiad</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}>={$NMTHRSHLDPERSISTENTPEERS}</expression>
<name>{$NMNODEID} npersistentpeersoff >= {$NMTHRSHLDPERSISTENTPEERS} : n={ITEM.VALUE}</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>nodemonitor %precommits</name>
<type>ZABBIX_ACTIVE</type>
<key>logrt[{$NMLOGFILE},"pctprecommits=([0-9\.]*)",,,skip,\1,]</key>
<delay>{$NMUPDATEINTERVAL}</delay>
<history>5d</history>
<value_type>FLOAT</value_type>
<applications>
<application>
<name>Cosmos Gaiad</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}<=0.5</expression>
<name>{$NMNODEID} %precommits <= 0.5 : pct={ITEM.VALUE}</name>
<priority>HIGH</priority>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{last()}<0.95 and {last()}>0.5</expression>
<name>{$NMNODEID} 0.95 > %precommits > 0.5 : pct={ITEM.VALUE}</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{last()}<1.0 and {last()}>=0.95</expression>
<name>{$NMNODEID} 1.0 > %precommits >= 0.95 : pct={ITEM.VALUE}</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>nodemonitor status</name>
<type>ZABBIX_ACTIVE</type>
<key>logrt[{$NMLOGFILE},"status=(\w*)",,,skip,\1,]</key>
<delay>{$NMUPDATEINTERVAL}</delay>
<history>5d</history>
<trends>0</trends>
<value_type>CHAR</value_type>
<description>scriptstarted | error | catchingup | synced
error can have various causes, typically the gaiad process is down.</description>
<applications>
<application>
<name>Cosmos Gaiad</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{nodata({$NMNODATA})}=1</expression>
<name>{$NMNODEID} no log data : T > {$NMNODATA}</name>
<priority>HIGH</priority>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{str(catchingup)}=1</expression>
<name>{$NMNODEID} status : catchingup</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{str(error)}=1</expression>
<name>{$NMNODEID} status : error</name>
<priority>HIGH</priority>
<manual_close>YES</manual_close>
</trigger>
<trigger>
<expression>{str(scriptstarted)}=1</expression>
<name>{$NMNODEID} status : script started</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>nodemonitor tfromnow</name>
<type>ZABBIX_ACTIVE</type>
<key>logrt[{$NMLOGFILE},"tfromnow=([0-9\.]*)",,,skip,\1,]</key>
<delay>{$NMUPDATEINTERVAL}</delay>
<history>5d</history>
<applications>
<application>
<name>Cosmos Gaiad</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}>{$NMTLASTBLOCKFROMNOW}</expression>
<name>{$NMNODEID} tfromnow > {$NMTLASTBLOCKFROMNOW} : T={ITEM.VALUE}</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
</items>
<macros>
<macro>
<macro>{$NMLOGFILE}</macro>
<description>Location of the nodemonitor log file on the host, example: /home/user/nodemonitor-user.log</description>
</macro>
<macro>
<macro>{$NMNODATA}</macro>
<value>120</value>
<description>Time is seconds for no data received trigger</description>
</macro>
<macro>
<macro>{$NMNODEID}</macro>
<value>Cosmos</value>
<description>Identifier for the node on the server (useful if more than one are hosted).</description>
</macro>
<macro>
<macro>{$NMTHRSHLDPEERS}</macro>
<value>2</value>
<description>This is the default threshold value for min. connected peers. In future versions of the nodemonitor script we intend to derive a percentage figure from node configuration data.</description>
</macro>
<macro>
<macro>{$NMTHRSHLDPERSISTENTPEERS}</macro>
<value>1</value>
<description>Default threshold value for max disconnected persistent peers.</description>
</macro>
<macro>
<macro>{$NMTLASTBLOCKFROMNOW}</macro>
<value>300</value>
<description>Time in seconds from the blockheight in the logfile that triggers a warning (chain halt detection).</description>
</macro>
<macro>
<macro>{$NMUPDATEINTERVAL}</macro>
<value>2s</value>
<description>update interval for items</description>
</macro>
</macros>
</template>
</templates>
<graphs>
<graph>
<name>gaiad metrics</name>
<graph_items>
<graph_item>
<color>199C0D</color>
<item>
<host>Template App Cosmos Gaiad</host>
<key>logrt[{$NMLOGFILE},"pctprecommits=([0-9\.]*)",,,skip,\1,]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>F63100</color>
<item>
<host>Template App Cosmos Gaiad</host>
<key>logrt[{$NMLOGFILE},"npeers=([0-9\.]*)",,,skip,\1,]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<color>2774A4</color>
<item>
<host>Template App Cosmos Gaiad</host>
<key>logrt[{$NMLOGFILE},"npersistentpeersoff=([0-9\.]*)",,,skip,\1,]</key>
</item>
</graph_item>
<graph_item>
<sortorder>3</sortorder>
<color>F7941D</color>
<item>
<host>Template App Cosmos Gaiad</host>
<key>logrt[{$NMLOGFILE},"tfromnow=([0-9\.]*)",,,skip,\1,]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>