]> granicus.if.org Git - icinga2/blob - itl/command-plugins-windows.conf
Add --perf-syntax option to check_perfmon
[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         }
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                 "-n" = {
100                         set_if = "$network_no_isatap$"
101                         description = "Don't show ISATAP interfaces in output"
102                 }
103         }
104         vars.network_no_isatap = true
105 }
106
107 object CheckCommand "perfmon-windows" {
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                 "--perf-syntax" = {
133                         value = "$perfmon_win_syntax$"
134                         description = "Use this instead of the counter name in the perfomance data"
135                 }
136
137         }
138         
139         vars.performance_win_wait = 1000
140         vars.perfmon_win_type = "double"
141         //The default values
142 }
143
144
145 template CheckCommand "ping-common-windows" {
146         command = [ PluginDir + "/check_ping.exe" ]
147
148         arguments = {
149                 "-H" = {
150                         value = "$ping_win_address$"
151                         required = true
152                         description = "Address to ping"
153                 }
154                 "-w" = {
155                         value = "$ping_win_wrta$,$ping_win_wpl$%"
156                         description = "Warning threshold: RTA and package loss seperated by comma"
157                 }
158                 "-c" = {
159                         value = "$ping_win_crta$,$ping_win_cpl$%"
160                         description = "Warning threshold: RTA and package loss seperated by comma"
161                 }
162                 "-p" = {
163                         value = "$ping_win_packets$"
164                         description = "Number of packages to send"
165                 }
166                 "-t" = {
167                         value = "$ping_win_timeout$"
168                         description = "Timeout in ms"
169                 }
170         }
171         
172         vars.ping_win_packets = "5"
173         vars.ping_win_timeout = "1000"
174         //The default values
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         }
233 }
234
235 object CheckCommand "swap-windows" {
236         command = [ PluginDir + "/check_swap.exe" ]
237         
238         arguments = {
239                 "-w" = {
240                         value = "$swap_win_warn$"
241                         description = "Warning threshold"
242                 }
243                 "-c" = {
244                         value = "$swap_win_crit$"
245                         description = "Critical threshold"
246                 }
247                 "-u" = {
248                         value = "$swap_win_unit$"
249                         description = "Unit to display swap in"
250                 }
251         }
252         
253         vars.swap_win_unit = "mb"
254         //The default
255 }
256
257 object CheckCommand "update-windows" {
258         command = [ PluginDir + "/check_update.exe" ]
259         
260         arguments = {
261                 "-w" = {
262                         set_if = "$update_win_warn$"
263                         description = "Warn if there are important updates available"
264                 }
265                 "-c" = {
266                         set_if = "$update_win_crit$"
267                         description = "Critical if there are important updates that require a reboot"
268                 }
269                 "--possible-reboot" = {
270                         set_if = "$update_win_reboot$"
271                         description = "Treat 'may need update' as 'definitely needs update'"
272                 }
273         }
274
275         timeout = 5m
276 }
277
278 object CheckCommand "uptime-windows" {
279         command = [ PluginDir + "/check_uptime.exe" ]
280         
281         arguments = {
282                 "-w" = {
283                         value = "$uptime_win_warn$"
284                         description = "Warning threshold"
285                 }
286                 "-c" = {
287                         value = "$uptime_win_crit$"
288                         description = "Critical threshold"
289                 }
290                 "-u" = {
291                         value = "$uptime_win_unit$"
292                         description = "Time unit to use"
293                 }
294         }
295         
296         vars.uptime_win_unit = "s"
297         //The default
298 }
299
300 object CheckCommand "users-windows" {
301         command = [ PluginDir + "/check_users.exe" ]
302         
303         arguments = {
304                 "-w" = {
305                         value = "$users_win_warn$"
306                         description = "Warning threshold"
307                 }
308                 "-c" = {
309                         value = "$users_win_crit$"
310                         description = "Critical threshold"
311                 }
312         }
313 }