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