-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommand.conf
124 lines (118 loc) · 3.42 KB
/
command.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
117
118
119
120
121
122
123
object CheckCommand "powershell" {
command = [ PluginDir + "/check_by_powershell" ]
arguments = {
"-H" = {
value = "$address$"
description = "Host name, IP Address of the remote host"
}
"-p" = {
value = "$powershell_port$"
description = "Port number WinRM"
}
"--user" = {
value = "$powershell_user$"
description = "Username of the remote host"
}
"--password" = {
value = "$powershell_password$"
description = "Password of the user"
}
"--no-tls" = {
value = "$powershell_no_tls$"
description = "Don't use a TLS connection"
}
"--insecure" = {
value = "$powershell_insecure$"
description = "Verify the hostname on the returned certificate"
}
"--ca" = {
value = "$powershell_ca$"
description = "CA certificate"
}
"--cert" = {
value = "$powershell_cert$"
description = "Client certificate"
}
"--key" = {
value = "$powershell_key$"
description = "Client key"
}
"--icingacmd" = {{
var command = macro("$by_powershell_command$")
var arguments = macro("$by_powershell_arguments$")
if (typeof(command) == String && !arguments) {
return command
}
var escaped_args = []
for (arg in resolve_arguments(command, arguments)) {
escaped_args.add(arg)
}
return escaped_args.join(" ")
description = "Executes commands of Icinga PowerShell Framework"
}}
"--cmd" = {
value = "$powershell_cmd$"
description = "Command to execute on the remote machine"
}
"--auth" = {
value = "$powershell_auth$"
description = "Authentication mechanism - NTLM | SSH"
}
"--sshhost" = {
value = "$powershell_sshhost$"
description = "SSH Host"
}
"--sshuser" = {
value = "$powershell_sshuser$"
description = "SSH Username"
}
"--sshpassword" = {
value = "$powershell_sshpassword$"
description = "SSH Password"
}
}
}
object CheckCommand "powershell-checkTime-sync" {
import "plugin-check-command"
command = [
"Invoke-IcingaCheckTimeSync"
]
arguments = {
"-Server" = {
value = "$powershell_ntp_server$"
description = "The NTP server you want to connect to"
}
"-TimeOffset" = {
value = "$powershell_timeoffset$"
description = "Expected offset of the ntp server relative to local server(seconds)."
}
"-Warning" = {
value = "$powershell_warning$"
description = "Offset to result in warning status e.g(10ms or 0.01s)"
}
"-Critical" = {
value = "$powershell_critical$"
description = "Offset to result in critical status e.g(60ms or 0.06s)"
}
"-Timeout" = {
value = "$powershell_timeout$"
description = "Seconds before connection times out (default: 10)"
}
"-IPV4" = {
set_if = "$powershell_server_ipv4$"
description = "Use IPv4 connection. Default to false"
}
"-Port" = {
value = "$powershell_ntp_port$"
description = "Port number ntp server"
}
"-NoPerfData" = {
set_if = "$powershell_perfdata$"
description = "No Performance data. Default to false"
}
"-Verbosity" = {
value = "$powershell_verbosity$"
description = "Set Plugin Output to verbose mode. Default 0"
}
}
}