-
Notifications
You must be signed in to change notification settings - Fork 0
/
zbx_export_hosts.yaml
61 lines (61 loc) · 2.22 KB
/
zbx_export_hosts.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
zabbix_export:
version: '6.4'
host_groups:
- uuid: 6f6799aa69e844b4b3918f779f2abf08
name: 'Zabbix servers'
hosts:
- host: Backups
name: Backups
groups:
- name: 'Zabbix servers'
interfaces:
- useip: 'NO'
dns: zabbix-agent
interface_ref: if1
items:
- name: 'Last backup time'
key: 'vfs.file.time[/mnt/ssd/backup.marker]'
delay: 10m
history: 30d
trends: 90d
interface_ref: if1
triggers:
- expression: 'fuzzytime(/Backups/vfs.file.time[/mnt/ssd/backup.marker],30h)=0'
name: 'Backup not completed'
priority: HIGH
discovery_rules:
- name: 'Services with backups'
key: 'system.run[bash /var/monitoring/backup_discovery.sh]'
lifetime: 7d
interface_ref: if1
item_prototypes:
- name: 'Backup marker exists'
key: 'vfs.file.exists[/mnt/ssd/apps/{#SERVICE_NAME}/backup.marker]'
history: 30d
trends: 90d
interface_ref: if1
trigger_prototypes:
- expression: 'last(/Backups/vfs.file.exists[/mnt/ssd/apps/{#SERVICE_NAME}/backup.marker])=0'
name: '{#SERVICE_NAME} not performing backups'
priority: HIGH
- name: 'Last backup time'
key: 'vfs.file.time[/mnt/ssd/apps/{#SERVICE_NAME}/backup.marker]'
history: 30d
trends: 90d
interface_ref: if1
trigger_prototypes:
- expression: 'fuzzytime(/Backups/vfs.file.time[/mnt/ssd/apps/{#SERVICE_NAME}/backup.marker],30h)=0'
name: '{#SERVICE_NAME} backup not successful'
priority: HIGH
preprocessing:
- type: JAVASCRIPT
parameters:
- |
var services = value.split(";");
var items = [];
for (var i = 0; i < services.length; i++) {
var service = services[i];
items.push({"{#SERVICE_NAME}": service});
}
return JSON.stringify(items);
inventory_mode: DISABLED