]> granicus.if.org Git - icinga2/blob - itl/command-plugins-windows.conf
Merge pull request #7183 from hlsolutions/bugfix/systemv-returncode
[icinga2] / itl / command-plugins-windows.conf
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 object CheckCommand "disk-windows" {
4         command = [ PluginDir + "/check_disk.exe" ]
5
6         arguments = {
7                 "-w" = {
8                         value = "$disk_win_warn$"
9                         description = "Warning threshold"
10                 }
11                 "-c" = {
12                         value = "$disk_win_crit$"
13                         description = "Critical threshold"
14                 }
15                 "-p" = {
16                         value = "$disk_win_path$"
17                         description = "Optional paths to check"
18                         repeat_key = true
19                 }
20                 "-u" = {
21                         value = "$disk_win_unit$"
22                         description = "Use this unit to display disk space"
23                 }
24                 "-x" = {
25                         value = "$disk_win_exclude$"
26                         description = "Exclude these drives from check"
27                 }
28                 "-U" = {
29                         set_if = "$disk_win_show_used$"
30                         description = "Work with used instead of free space"
31                 }
32         }
33
34         //The default
35         vars.disk_win_unit = "mb"
36         vars.disk_win_warn = "20%"
37         vars.disk_win_crit = "10%"
38 }
39
40 object CheckCommand "load-windows" {
41         command = [ PluginDir + "/check_load.exe" ]
42
43         arguments = {
44                 "-w" = {
45                         value = "$load_win_warn$"
46                         description = "Warning threshold"
47                 }
48                 "-c" = {
49                         value = "$load_win_crit$"
50                         description = "Critical threshold"
51                 }
52         }
53 }
54
55 object CheckCommand "memory-windows" {
56         command = [ PluginDir + "/check_memory.exe" ]
57
58         arguments = {
59                 "-w" = {
60                         value = "$memory_win_warn$"
61                         description = "Warning Threshold"
62                 }
63                 "-c" = {
64                         value = "$memory_win_crit$"
65                         description = "Critical Threshold"
66                 }
67                 "-u" = {
68                         value = "$memory_win_unit$"
69                         description = "Use this unit to display memory"
70                 }
71                 "-U" = {
72                         set_if = "$memory_win_show_used$"
73                         description = "Show used memory instead of the free memory"
74                 }
75         }
76
77         //The default
78         vars.memory_win_unit = "mb"
79         vars.memory_win_warn = "10%"
80         vars.memory_win_crit = "5%"
81 }
82
83 object CheckCommand "network-windows" {
84         command = [ PluginDir + "/check_network.exe" ]
85
86         arguments = {
87                 "-w" = {
88                         value = "$network_win_warn$"
89                         description = "Warning threshold"
90                 }
91                 "-c" = {
92                         value = "$network_win_crit$"
93                         description = "Critical threshold"
94                 }
95                 "-n" = {
96                         set_if = "$network_no_isatap$"
97                         description = "Don't show ISATAP interfaces in output"
98                 }
99         }
100         vars.network_no_isatap = true
101 }
102
103 object CheckCommand "perfmon-windows" {
104         command = [ PluginDir + "/check_perfmon.exe" ]
105
106         arguments = {
107                 "-w" = {
108                         value = "$perfmon_win_warn$"
109                         description = "Warning threshold"
110                 }
111                 "-c" = {
112                         value = "$perfmon_win_crit$"
113                         description = "Critical threshold"
114                 }
115                 "-P" = {
116                         value = "$perfmon_win_counter$"
117                         description = "The Performance Counter string"
118                         required = true
119                 }
120                 "--performance-wait" = {
121                         value = "$perfmon_win_wait$"
122                         description = "Wait time between two counter collections in ms"
123                 }
124                 "--fmt-countertype" = {
125                         value = "$perfmon_win_type$"
126                         description = "Performance counter type"
127                 }
128                 "--perf-syntax" = {
129                         value = "$perfmon_win_syntax$"
130                         description = "Use this instead of the counter name in the perfomance data"
131                 }
132         }
133
134         vars.performance_win_wait = 1000
135         vars.perfmon_win_type = "double"
136 }
137
138
139 template CheckCommand "ping-common-windows" {
140         command = [ PluginDir + "/check_ping.exe" ]
141
142         arguments = {
143                 "-H" = {
144                         value = "$ping_win_address$"
145                         required = true
146                         description = "Address to ping"
147                 }
148                 "-w" = {
149                         value = "$ping_win_wrta$,$ping_win_wpl$%"
150                         description = "Warning threshold: RTA and package loss seperated by comma"
151                 }
152                 "-c" = {
153                         value = "$ping_win_crta$,$ping_win_cpl$%"
154                         description = "Warning threshold: RTA and package loss seperated by comma"
155                 }
156                 "-p" = {
157                         value = "$ping_win_packets$"
158                         description = "Number of packages to send"
159                 }
160                 "-t" = {
161                         value = "$ping_win_timeout$"
162                         description = "Timeout in ms"
163                 }
164         }
165
166         vars.ping_win_packets = "5"
167         vars.ping_win_timeout = "1000"
168 }
169
170 object CheckCommand "ping-windows" {
171         import "ping-common-windows"
172         import "ipv4-or-ipv6"
173
174         vars.ping_win_address = "$check_address$"
175 }
176
177 object CheckCommand "ping4-windows" {
178         import "ping-common-windows"
179
180         command += [ "-4" ]
181
182         vars.ping_win_address = "$address$"
183 }
184
185 object CheckCommand "ping6-windows" {
186         import "ping-common-windows"
187
188         command += [ "-6" ]
189
190         vars.ping_win_address = "$address6$"
191 }
192
193 object CheckCommand "procs-windows" {
194         command = [ PluginDir + "/check_procs.exe" ]
195
196         arguments = {
197                 "-w" = {
198                         value = "$procs_win_warn$"
199                         description = "Warning threshold"
200                 }
201                 "-c" = {
202                         value = "$procs_win_crit$"
203                         description = "Critical threshold"
204                 }
205                 "-u" = {
206                         value = "$procs_win_user$"
207                         description = "Count only procs of this user"
208                 }
209         }
210 }
211
212 object CheckCommand "service-windows" {
213         command = [ PluginDir + "/check_service.exe" ]
214
215         arguments = {
216                 "-w" = {
217                         set_if = "$service_win_warn$"
218                         description = "Warn instead of critical when service is not running"
219                 }
220                 "-s" = {
221                         value = "$service_win_service$"
222                         required = true
223                         description = "Service to check"
224                 }
225                 "--description" = {
226                         set_if = "$service_win_description$"
227                         description = "Use service description instead of name"
228                 }
229         }
230 }
231
232 object CheckCommand "swap-windows" {
233         command = [ PluginDir + "/check_swap.exe" ]
234
235         arguments = {
236                 "-w" = {
237                         value = "$swap_win_warn$"
238                         description = "Warning threshold"
239                 }
240                 "-c" = {
241                         value = "$swap_win_crit$"
242                         description = "Critical threshold"
243                 }
244                 "-u" = {
245                         value = "$swap_win_unit$"
246                         description = "Unit to display swap in"
247                 }
248                 "-U" = {
249                         set_if = "$swap_win_show_used$"
250                         description = "Show used swap instead of the free swap"
251                 }
252         }
253
254         // Default
255         vars.swap_win_unit = "mb"
256         vars.swap_win_warn = "10%"
257         vars.swap_win_crit = "5%"
258 }
259
260 object CheckCommand "update-windows" {
261         command = [ PluginDir + "/check_update.exe" ]
262
263         arguments = {
264                 "-w" = {
265                         value = "$update_win_warn$"
266                         description = "Number of updates to trigger a warning"
267                 }
268                 "-c" = {
269                         value = "$update_win_crit$"
270                         description = "Number of updates to trigger a critical"
271                 }
272                 "--possible-reboot" = {
273                         set_if = "$update_win_reboot$"
274                         description = "Treat 'may need update' as 'definitely needs update'"
275                 }
276                 "--no-reboot-critical" = {
277                         set_if = "$ignore_reboot$"
278                         description = "Do not automatically return critical if an update requiring reboot is present."
279                 }
280         }
281
282         timeout = 5m
283 }
284
285 object CheckCommand "uptime-windows" {
286         command = [ PluginDir + "/check_uptime.exe" ]
287
288         arguments = {
289                 "-w" = {
290                         value = "$uptime_win_warn$"
291                         description = "Warning threshold"
292                 }
293                 "-c" = {
294                         value = "$uptime_win_crit$"
295                         description = "Critical threshold"
296                 }
297                 "-u" = {
298                         value = "$uptime_win_unit$"
299                         description = "Time unit to use"
300                 }
301         }
302
303         vars.uptime_win_unit = "s"
304 }
305
306 object CheckCommand "users-windows" {
307         command = [ PluginDir + "/check_users.exe" ]
308
309         arguments = {
310                 "-w" = {
311                         value = "$users_win_warn$"
312                         description = "Warning threshold"
313                 }
314                 "-c" = {
315                         value = "$users_win_crit$"
316                         description = "Critical threshold"
317                 }
318         }
319 }