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