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