]> granicus.if.org Git - icinga2/blob - itl/command-plugins-windows.conf
Merge pull request #6267 from Icinga/fix/docs-notification-users
[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         }
89
90         //The default
91         vars.memory_win_unit = "mb"
92         vars.memory_win_warn = "10%"
93         vars.memory_win_crit = "5%"
94 }
95
96 object CheckCommand "network-windows" {
97         command = [ PluginDir + "/check_network.exe" ]
98
99         arguments = {
100                 "-w" = {
101                         value = "$network_win_warn$"
102                         description = "Warning threshold"
103                 }
104                 "-c" = {
105                         value = "$network_win_crit$"
106                         description = "Critical threshold"
107                 }
108                 "-n" = {
109                         set_if = "$network_no_isatap$"
110                         description = "Don't show ISATAP interfaces in output"
111                 }
112         }
113         vars.network_no_isatap = true
114 }
115
116 object CheckCommand "perfmon-windows" {
117         command = [ PluginDir + "/check_perfmon.exe" ]
118
119         arguments = {
120                 "-w" = {
121                         value = "$perfmon_win_warn$"
122                         description = "Warning threshold"
123                 }
124                 "-c" = {
125                         value = "$perfmon_win_crit$"
126                         description = "Critical threshold"
127                 }
128                 "-P" = {
129                         value = "$perfmon_win_counter$"
130                         description = "The Performance Counter string"
131                         required = true
132                 }
133                 "--performance-wait" = {
134                         value = "$perfmon_win_wait$"
135                         description = "Wait time between two counter collections in ms"
136                 }
137                 "--fmt-countertype" = {
138                         value = "$perfmon_win_type$"
139                         description = "Performance counter type"
140                 }
141                 "--perf-syntax" = {
142                         value = "$perfmon_win_syntax$"
143                         description = "Use this instead of the counter name in the perfomance data"
144                 }
145         }
146
147         vars.performance_win_wait = 1000
148         vars.perfmon_win_type = "double"
149 }
150
151
152 template CheckCommand "ping-common-windows" {
153         command = [ PluginDir + "/check_ping.exe" ]
154
155         arguments = {
156                 "-H" = {
157                         value = "$ping_win_address$"
158                         required = true
159                         description = "Address to ping"
160                 }
161                 "-w" = {
162                         value = "$ping_win_wrta$,$ping_win_wpl$%"
163                         description = "Warning threshold: RTA and package loss seperated by comma"
164                 }
165                 "-c" = {
166                         value = "$ping_win_crta$,$ping_win_cpl$%"
167                         description = "Warning threshold: RTA and package loss seperated by comma"
168                 }
169                 "-p" = {
170                         value = "$ping_win_packets$"
171                         description = "Number of packages to send"
172                 }
173                 "-t" = {
174                         value = "$ping_win_timeout$"
175                         description = "Timeout in ms"
176                 }
177         }
178
179         vars.ping_win_packets = "5"
180         vars.ping_win_timeout = "1000"
181 }
182
183 object CheckCommand "ping-windows" {
184         import "ping-common-windows"
185         import "ipv4-or-ipv6"
186
187         vars.ping_win_address = "$check_address$"
188 }
189
190 object CheckCommand "ping4-windows" {
191         import "ping-common-windows"
192
193         command += [ "-4" ]
194
195         vars.ping_win_address = "$address$"
196 }
197
198 object CheckCommand "ping6-windows" {
199         import "ping-common-windows"
200
201         command += [ "-6" ]
202
203         vars.ping_win_address = "$address6$"
204 }
205
206 object CheckCommand "procs-windows" {
207         command = [ PluginDir + "/check_procs.exe" ]
208
209         arguments = {
210                 "-w" = {
211                         value = "$procs_win_warn$"
212                         description = "Warning threshold"
213                 }
214                 "-c" = {
215                         value = "$procs_win_crit$"
216                         description = "Critical threshold"
217                 }
218                 "-u" = {
219                         value = "$procs_win_user$"
220                         description = "Count only procs of this user"
221                 }
222         }
223 }
224
225 object CheckCommand "service-windows" {
226         command = [ PluginDir + "/check_service.exe" ]
227
228         arguments = {
229                 "-w" = {
230                         set_if = "$service_win_warn$"
231                         description = "Warn instead of critical when service is not running"
232                 }
233                 "-s" = {
234                         value = "$service_win_service$"
235                         required = true
236                         description = "Service to check"
237                 }
238                 "-d" = {
239                         set_if = "$service_win_description$"
240                         description = "Use service description instead of name"
241                 }
242         }
243 }
244
245 object CheckCommand "swap-windows" {
246         command = [ PluginDir + "/check_swap.exe" ]
247
248         arguments = {
249                 "-w" = {
250                         value = "$swap_win_warn$"
251                         description = "Warning threshold"
252                 }
253                 "-c" = {
254                         value = "$swap_win_crit$"
255                         description = "Critical threshold"
256                 }
257                 "-u" = {
258                         value = "$swap_win_unit$"
259                         description = "Unit to display swap in"
260                 }
261         }
262
263         // Default
264         vars.swap_win_unit = "mb"
265         vars.swap_win_warn = "10%"
266         vars.swap_win_crit = "5%"
267 }
268
269 object CheckCommand "update-windows" {
270         command = [ PluginDir + "/check_update.exe" ]
271
272         arguments = {
273                 "-w" = {
274                         set_if = "$update_win_warn$"
275                         description = "Warn if there are important updates available"
276                 }
277                 "-c" = {
278                         set_if = "$update_win_crit$"
279                         description = "Critical if there are important updates that require a reboot"
280                 }
281                 "--possible-reboot" = {
282                         set_if = "$update_win_reboot$"
283                         description = "Treat 'may need update' as 'definitely needs update'"
284                 }
285         }
286
287         timeout = 5m
288 }
289
290 object CheckCommand "uptime-windows" {
291         command = [ PluginDir + "/check_uptime.exe" ]
292
293         arguments = {
294                 "-w" = {
295                         value = "$uptime_win_warn$"
296                         description = "Warning threshold"
297                 }
298                 "-c" = {
299                         value = "$uptime_win_crit$"
300                         description = "Critical threshold"
301                 }
302                 "-u" = {
303                         value = "$uptime_win_unit$"
304                         description = "Time unit to use"
305                 }
306         }
307
308         vars.uptime_win_unit = "s"
309 }
310
311 object CheckCommand "users-windows" {
312         command = [ PluginDir + "/check_users.exe" ]
313
314         arguments = {
315                 "-w" = {
316                         value = "$users_win_warn$"
317                         description = "Warning threshold"
318                 }
319                 "-c" = {
320                         value = "$users_win_crit$"
321                         description = "Critical threshold"
322                 }
323         }
324 }