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