forked from Chucy/icinga2_vmware_snapshots
-
Notifications
You must be signed in to change notification settings - Fork 1
/
commands.conf
116 lines (108 loc) · 3.35 KB
/
commands.conf
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
#
# Check Command Definitions
#
#
#
#
template CheckCommand "check_vmware_snapshots" {
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_vmware_snapshots" ]
arguments = {
"--server" = {
value = "$snapshot_address$"
description = "IP address or name."
required = true
}
"--username" = {
value = "$snapshot_username$"
description = "username"
required = true
}
"--password" = {
value = "$snapshot_password$"
description = "password"
required = true
}
}
vars.snapshot_address = "$check_address$"
}
object CheckCommand "check_vmware_snapshots_age" {
import "check_vmware_snapshots"
arguments += {
"--mode" = {
value = "age"
description = "age (per snapshot)"
required = true
}
"--warning" = {
value = "$snapshot_age_warning$"
description = "days after a snapshot is alarmed as warning.(default 2)"
required = true
}
"--critical" = {
value = "$snapshot_age_critical$"
description = "days after a snapshot is alarmed as critical.(default 7)"
required = true
}
"--blacklist" = {
set_if = "$snapshot_age_blacklist$"
description = "regex blacklist"
}
"--whitelist" = {
set_if = "$snapshot_age_whitelist$"
description = "regex whitelist"
}
"--separator" = {
value = "$snapshot_age_separator$"
description = "field separator for VMs/snapshots (default: ', ')."
}
"--match_snapshot_names" = {
value = "$snapshot_age_count_match_names$"
description = "If set, match also names of snapshots in black/whitelist. 1 to activate (default 0)"
}
}
vars.snapshot_age_separator = ", "
vars.snapshot_age_match_names = 0
vars.snapshot_age_warning = 2
vars.snapshot_age_critical = 7
}
object CheckCommand "check_vmware_snapshots_count" {
import "check_vmware_snapshots"
arguments += {
"--mode" = {
value = "count"
description = "count (per VM)"
required = true
}
"--warning" = {
value = "$snapshot_count_warning$"
description = "days after a snapshot is alarmed as warning.(default 1)"
required = true
}
"--critical" = {
value = "$snapshot_count_critical$"
description = "days after a snapshot is alarmed as critical.(default 2)"
required = true
}
"--blacklist" = {
set_if = "$snapshot_count_blacklist$"
description = "regex blacklist"
}
"--whitelist" = {
set_if = "$snapshot_count_whitelist$"
description = "regex whitelist"
}
"--separator" = {
value = "$snapshot_count_separator$"
description = "field separator for VMs/snapshots (default: ', ')."
}
"--match_snapshot_names" = {
value = "$snapshot_count_match_names$"
description = "If set, match also names of snapshots in black/whitelist. 1 to activate (default 0)"
}
}
vars.snapshot_count_separator = ", "
vars.snapshot_count_match_names = 0
vars.snapshot_count_warning = 1
vars.snapshot_count_critical = 2
}