-
Notifications
You must be signed in to change notification settings - Fork 1
/
zbx_export_nakivo.yaml
333 lines (329 loc) · 11.8 KB
/
zbx_export_nakivo.yaml
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
zabbix_export:
version: '6.2'
date: '2023-02-24T12:28:24Z'
template_groups:
-
uuid: 7df96b18c230490a9a0a9e2307226338
name: Templates
-
uuid: 8712e702d95b4f788a7a5c5603db991b
name: 'Templates ETC'
templates:
-
uuid: 875a3fb6c65641dcab7c2ee0f7d6dee8
template: 'Template Nakivo'
name: 'Template Nakivo'
groups:
-
name: Templates
-
name: 'Templates ETC'
items:
-
uuid: 432109dc11df47188aaf47c3ebe488c7
name: 'Get Nakivo Jobs'
type: EXTERNAL
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"job",{$NAKIVOPORT}]'
delay: 5m
trends: '0'
value_type: TEXT
preprocessing:
-
type: CSV_TO_JSON
parameters:
- ''
- ''
- '1'
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- '3600'
-
uuid: b94fa96d13bd429d806fa69c6e474299
name: 'Get Nakivo Repository'
type: EXTERNAL
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
delay: 5m
trends: '0'
value_type: TEXT
preprocessing:
-
type: CSV_TO_JSON
parameters:
- ''
- ''
- '1'
-
type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- '3600'
discovery_rules:
-
uuid: 7a35ec791ba14a4c8fbb34bd1aa74aed
name: 'Nakivo Job Discover'
type: DEPENDENT
key: 'nakivo.sh[job]'
delay: '0'
item_prototypes:
-
uuid: adb48f19a9fe4414b1ceeb924661c5ff
name: 'Job [{#NAME}]: ID'
type: DEPENDENT
key: 'nakivo.jobs.id[{#ID}]'
delay: '0'
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].ID.first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"job",{$NAKIVOPORT}]'
-
uuid: ebf0dc26e512458b9989f7b6f96c187a
name: 'Job [{#NAME}]: Last Run'
type: DEPENDENT
key: 'nakivo.jobs.lastrun[{#ID}]'
delay: '0'
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Last run"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"job",{$NAKIVOPORT}]'
trigger_prototypes:
-
uuid: d31cd0a4e2b846978368310c60a92f8a
expression: 'last(/Template Nakivo/nakivo.jobs.lastrun[{#ID}])<>"Successful"'
name: 'Job [{#NAME}] not successful'
priority: AVERAGE
-
uuid: f3cc9de1237e41b4ac937cf6d90f4cfa
name: 'Job [{#NAME}]: Name'
type: DEPENDENT
key: 'nakivo.jobs.name[{#ID}]'
delay: '0'
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].Name.first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"job",{$NAKIVOPORT}]'
-
uuid: 1cbaa8cf5bbb4d81aac46919a6e6220a
name: 'Job [{#NAME}]: State'
type: DEPENDENT
key: 'nakivo.jobs.state[{#ID}]'
delay: '0'
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].State.first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"job",{$NAKIVOPORT}]'
trigger_prototypes:
-
uuid: 9f11a44506c54fae86a489a17af2aac7
expression: 'left(last(/Template Nakivo/nakivo.jobs.state[{#ID}]),7)="Running"'
name: 'Job [{#NAME}] running'
priority: INFO
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"job",{$NAKIVOPORT}]'
preprocessing:
-
type: JAVASCRIPT
parameters:
- |
var result = [];
var obj = JSON.parse(value);
obj.forEach(function (jobs) {
result.push({"{#NAME}": jobs.Name, "{#ID}": jobs.ID});
});
return JSON.stringify(result);
-
uuid: 7c874585dbdf48989b40bbb1b70d28b3
name: 'Nakivo Repository Discover'
type: DEPENDENT
key: 'nakivo.sh[repository]'
delay: '0'
item_prototypes:
-
uuid: 9ac08c5511524a01a17b603ffb54ae0c
name: 'Repository [{#NAME}]: Attached'
type: DEPENDENT
key: 'nakivo.repository.attached[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Attached"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
trigger_prototypes:
-
uuid: 1d158eab9e4d438393ef1c79d405c81f
expression: 'last(/Template Nakivo/nakivo.repository.attached[{#ID}])<>"yes"'
name: 'Repository [{#NAME}] not attached'
priority: INFO
-
uuid: d057fee3faaf4e3294bd16d7e294b904
name: 'Repository [{#NAME}]: Consistent'
type: DEPENDENT
key: 'nakivo.repository.consistent[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Consistent"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
trigger_prototypes:
-
uuid: fa6c36bf54b848cebe2c8c7b3a1de141
expression: 'last(/Template Nakivo/nakivo.repository.consistent[{#ID}])<>"yes"'
name: 'Repository [{#NAME}] not consistent'
priority: WARNING
-
uuid: 06247da4ea6f457dac8dc6cf9b5a70c3
name: 'Repository [{#NAME}]: ID'
type: DEPENDENT
key: 'nakivo.repository.id[{#ID}]'
delay: '0'
history: 7d
trends: '0'
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].ID.first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
-
uuid: 4201119b949e49ffb8c07825d9804180
name: 'Repository [{#NAME}]: State'
type: DEPENDENT
key: 'nakivo.repository.state[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["State"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
trigger_prototypes:
-
uuid: ef00cbac2fbc42b48546de321a48361d
expression: 'last(/Template Nakivo/nakivo.repository.state[{#ID}])<>"OK"'
name: 'Repository [{#NAME}] State {ITEM.LASTVALUE}'
priority: AVERAGE
-
uuid: fc11e60b3e444cdd8f9dd2f27fefdf24
name: 'Repository [{#NAME}]: Status'
type: DEPENDENT
key: 'nakivo.repository.status[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Status"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
-
uuid: ebd4b52337e44c99ac879c3a94899434
name: 'Repository [{#NAME}]: Transporter'
type: DEPENDENT
key: 'nakivo.repository.transporter[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Transporter"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
-
uuid: 5b7db6e04bc44b73b3c0de0b9365f0d8
name: 'Repository [{#NAME}]: Type'
type: DEPENDENT
key: 'nakivo.repository.type[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Type"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
-
uuid: 3e231eba1b8a42e0ba6c9ca1903d7c34
name: 'Repository [{#NAME}]: Usage Data'
type: DEPENDENT
key: 'nakivo.repository.usagedata[{#ID}]'
delay: '0'
history: 30d
trends: '0'
value_type: CHAR
preprocessing:
-
type: JSONPATH
parameters:
- '$.[?(@.ID==''{#ID}'')].["Usagedata"].first()'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
master_item:
key: 'nakivo.sh[{HOST.CONN},{$NAKIVOUSER},{$NAKIVOPASSWORD},"repository",{$NAKIVOPORT}]'
preprocessing:
-
type: JAVASCRIPT
parameters:
- |
var result = [];
var obj = JSON.parse(value);
obj.forEach(function (repository) {
result.push({"{#NAME}": repository.Name, "{#ID}": repository.ID});
});
return JSON.stringify(result);
tags:
-
tag: application
value: nakivo
macros:
-
macro: '{$NAKIVOPASSWORD}'
value: password
-
macro: '{$NAKIVOPORT}'
value: '4443'
-
macro: '{$NAKIVOUSER}'
value: user