forked from zampat/icinga2-monitoring-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3000-vmware_esx.sh
62 lines (61 loc) · 1.52 KB
/
3000-vmware_esx.sh
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
#
#Commands:
# icingacli director command show check_vmware_api --json --no-defaults
#
# Check Command: check_vmware_api
#
RES=`icingacli director command exists "check_vmware_api"`
if [[ $RES =~ "does not exist" ]]
then
echo "Command 'check_vmware_api' does not exists"
icingacli director command create check_vmware_api --json '
{
"arguments": {
"-D": {
"set_if_format": "string",
"value": "$esx_datacenter$"
},
"-H": {
"set_if_format": "string",
"value": "$host.address$"
},
"-c": {
"set_if_format": "string",
"value": "$esx_critical$"
},
"-f": {
"set_if_format": "string",
"value": "$esx_authfile$"
},
"-l": {
"set_if_format": "string",
"value": "$esx_command$"
},
"-o": {
"set_if_format": "string",
"value": "$esx_optional$"
},
"-p": {
"set_if_format": "string",
"value": "$esx_password$"
},
"-s": {
"set_if_format": "string",
"value": "$esx_subcommand$"
},
"-u": {
"set_if_format": "string",
"value": "$esx_username$"
},
"-w": {
"set_if_format": "string",
"value": "$esx_warning$"
}
},
"command": "PluginDir + \/check_vmware_api",
"methods_execute": "PluginCheck",
"object_name": "check_vmware_api",
"object_type": "object"
}
'
fi