]> granicus.if.org Git - icinga2/blob - itl/command-plugins.conf
Merge pull request #5339 from ruzickap/master
[icinga2] / itl / command-plugins.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 template CheckCommand "ipv4-or-ipv6" {
21         vars.check_address = {{
22                 var addr_v4 = macro("$address$")
23                 var addr_v6 = macro("$address6$")
24
25                 if (addr_v4 && !macro("$check_ipv6$") || macro("$check_ipv4$")) {
26                         return addr_v4
27                 } else {
28                         return addr_v6
29                 }
30         }}
31
32         vars.check_ipv4 = false
33         vars.check_ipv6 = false
34 }
35
36 template CheckCommand "ping-common" {
37         command = [ PluginDir + "/check_ping" ]
38
39         arguments = {
40                 "-H" = "$ping_address$"
41                 "-w" = "$ping_wrta$,$ping_wpl$%"
42                 "-c" = "$ping_crta$,$ping_cpl$%"
43                 "-p" = "$ping_packets$"
44                 "-t" = "$ping_timeout$"
45         }
46
47         vars.ping_wrta = 100
48         vars.ping_wpl = 5
49         vars.ping_crta = 200
50         vars.ping_cpl = 15
51 }
52
53 object CheckCommand "ping" {
54         import "ping-common"
55         import "ipv4-or-ipv6"
56
57         vars.ping_address = "$check_address$"
58 }
59
60 object CheckCommand "ping4" {
61         import "ping-common"
62
63         command += [ "-4" ]
64
65         vars.ping_address = "$address$"
66 }
67
68 object CheckCommand "ping6" {
69         import "ping-common"
70
71         command += [ "-6" ]
72
73         vars.ping_address = "$address6$"
74 }
75
76 template CheckCommand "hostalive-common" {
77         vars.ping_wrta = 3000.0
78         vars.ping_wpl = 80
79
80         vars.ping_crta = 5000.0
81         vars.ping_cpl = 100
82 }
83
84 object CheckCommand "hostalive" {
85         import "ping"
86         import "hostalive-common"
87 }
88
89 object CheckCommand "hostalive4" {
90         import "ping4"
91         import "hostalive-common"
92 }
93
94 object CheckCommand "hostalive6" {
95         import "ping6"
96         import "hostalive-common"
97 }
98
99 template CheckCommand "fping-common" {
100         command = [
101                 PluginDir + "/check_fping",
102                 "$fping_address$"
103         ]
104
105         arguments = {
106                 "-w" = "$fping_wrta$,$fping_wpl$%"
107                 "-c" = "$fping_crta$,$fping_cpl$%"
108                 "-n" = "$fping_number$"
109                 "-i" = "$fping_interval$"
110                 "-b" = "$fping_bytes$"
111                 "-T" = "$fping_target_timeout$"
112                 "-S" = "$fping_source_ip$"
113                 "-I" = "$fping_source_interface$"
114         }
115
116         vars.fping_wrta = 100
117         vars.fping_wpl = 5
118         vars.fping_crta = 200
119         vars.fping_cpl = 15
120         vars.fping_number = 5
121         vars.fping_interval = 500
122 }
123
124 object CheckCommand "fping4" {
125         import "fping-common"
126
127         command += [ "-4" ]
128
129         vars.fping_address = "$address$"
130 }
131
132 object CheckCommand "fping6" {
133         import "fping-common"
134
135         command += [ "-6" ]
136
137         vars.fping_address = "$address6$"
138 }
139
140 object CheckCommand "dummy" {
141         command = [ PluginDir + "/check_dummy" ]
142
143         arguments = {
144                 "state" = {
145                         value = "$dummy_state$"
146                         skip_key = true
147                         order = 1
148                         description = "The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0."
149                 }
150                 "text" = {
151                         value = "$dummy_text$"
152                         skip_key = true
153                         order = 2
154                         description = "Plugin output. Defaults to Check was successful."
155                 }
156         }
157
158         vars.dummy_state = 0
159         vars.dummy_text = "Check was successful."
160 }
161
162 object CheckCommand "passive" {
163         import "dummy"
164
165         vars.dummy_state = 3
166         vars.dummy_text = "No Passive Check Result Received."
167 }
168
169 object CheckCommand "tcp" {
170         import "ipv4-or-ipv6"
171
172         command = [ PluginDir + "/check_tcp" ]
173
174         arguments = {
175                 "-H" = {
176                         value =  "$tcp_address$"
177                         description = "Host name, IP Address, or unix socket (must be an absolute path)."
178                 }
179                 "-p" = {
180                         value =  "$tcp_port$"
181                         description = "The TCP port number."
182                 }
183                 "-e" = {
184                         value = "$tcp_expect$"
185                         description = "String to expect in server response (may be repeated)."
186                 }
187                 "-A" = {
188                         set_if = "$tcp_all$"
189                         description = "All expect strings need to occur in server response. Defaults to false."
190                 }
191                 "-E_send" = {
192                         key = "-E"
193                         order = 1
194                         set_if = "$tcp_escape_send$"
195                         description = "Enable usage of \n, \r, \t or \\ in send string."
196                 }
197                 "-s" = {
198                         order = 2
199                         value = "$tcp_send$"
200                         description = "String to send to the server."
201                 }
202                 "-E_quit" = {
203                         key = "-E"
204                         order = 3
205                         set_if = "$tcp_escape_quit$"
206                         description = "Enable usage of \n, \r, \t or \\ in quit string."
207                 }
208                 "-q" = {
209                         order = 4
210                         value = "$tcp_quit$"
211                         description = "String to send server to initiate a clean close of the connection."
212                 }
213                 "-r" = {
214                         value = "$tcp_refuse$"
215                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
216                 }
217                 "-M" = {
218                         value = "$tcp_mismatch$"
219                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
220                 }
221                 "-j" = {
222                         set_if = "$tcp_jail$"
223                         description = "Hide output from TCP socket."
224                 }
225                 "-m" = {
226                         value = "$tcp_maxbytes$"
227                         description = "Close connection once more than this number of bytes are received."
228                 }
229                 "-d" = {
230                         value = "$tcp_delay$"
231                         description = "Seconds to wait between sending string and polling for response."
232                 }
233                 "-D" = {
234                         value = "$tcp_certificate$"
235                         description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
236                 }
237                 "-S" = {
238                         set_if = "$tcp_ssl$"
239                         description = "Use SSL for the connection."
240                 }
241                 "-w" = {
242                         value = "$tcp_wtime$"
243                         description = "Response time to result in warning status (seconds)."
244                 }
245                 "-c" = {
246                         value = "$tcp_ctime$"
247                         description = "Response time to result in critical status (seconds)."
248                 }
249                 "-t" = {
250                         value = "$tcp_timeout$"
251                         description = "Seconds before connection times out. Defaults to 10."
252                 }
253                 "-4" = {
254                         set_if = "$tcp_ipv4$"
255                         description = "Use IPv4 connection"
256                 }
257                 "-6" = {
258                         set_if = "$tcp_ipv6$"
259                         description = "Use IPv6 connection"
260                 }
261         }
262
263         vars.tcp_address = "$check_address$"
264         vars.tcp_all = false
265         vars.tcp_refuse = "crit"
266         vars.tcp_mismatch = "warn"
267         vars.tcp_timeout = 10
268         vars.check_ipv4 = "$tcp_ipv4$"
269         vars.check_ipv6 = "$tcp_ipv6$"
270 }
271
272 object CheckCommand "ssl" {
273         import "ipv4-or-ipv6"
274
275         command = [ PluginDir + "/check_tcp" ]
276
277         arguments = {
278                 "-H" = {
279                         value = "$ssl_address$"
280                         description = "Host address"
281                 }
282                 "-p" = {
283                         value = "$ssl_port$"
284                         description ="TCP port (default: 443)"
285                 }
286                 "--ssl" = { }
287                 "-t" = {
288                         value = "$ssl_timeout$"
289                         description = "Seconds before connection times out (default: 10)"
290                 }
291                 "-D" = {{
292                         var days_warn = macro("$ssl_cert_valid_days_warn$")
293                         var days_critical = macro("$ssl_cert_valid_days_critical$")
294                         if (days_warn) {
295                                 if (days_critical) {
296                                         return days_warn + "," + days_critical
297                                 } else {
298                                         return days_warn
299                                 }
300                         }
301                 }}
302                 "-N" = "$ssl_sni$"
303         }
304
305         vars.ssl_address = "$check_address$"
306         vars.ssl_port = 443
307         vars.ssl_cert_valid_days_warn = false
308         vars.ssl_cert_valid_days_critical = false
309         vars.ssl_sni = "$ssl_address$"
310 }
311
312
313 object CheckCommand "udp" {
314         import "ipv4-or-ipv6"
315
316         command = [
317                 PluginDir + "/check_udp",
318                 "-H", "$udp_address$",
319                 "-p", "$udp_port$"
320         ]
321
322         arguments = {
323                 "-s" = {
324                         value = "$udp_send$"
325                         required = true
326                 }
327                 "-e" = {
328                         value = "$udp_expect$"
329                         required = true
330                 }
331                 "-q" = "$udp_quit$"
332                 "-4" = {
333                         set_if = "$udp_ipv4$"
334                         description = "Use IPv4 connection"
335                 }
336                 "-6" = {
337                         set_if = "$udp_ipv6$"
338                         description = "Use IPv6 connection"
339                 }
340         }
341
342         vars.udp_address = "$check_address$"
343         vars.check_ipv4 = "$udp_ipv4$"
344         vars.check_ipv6 = "$udp_ipv6$"
345 }
346
347 object CheckCommand "http" {
348         import "ipv4-or-ipv6"
349
350         command = [ PluginDir + "/check_http" ]
351
352         arguments = {
353                 "-H" = "$http_vhost$"
354                 "-I" = "$http_address$"
355                 "-u" = "$http_uri$"
356                 "-p" = "$http_port$"
357                 "-S" = {
358                         set_if = "$http_ssl$"
359                 }
360                 "-S1" = {
361                         set_if = "$http_ssl_force_tlsv1$"
362                 }
363                 "-S1.1" = {
364                         set_if = "$http_ssl_force_tlsv1_1$"
365                 }
366                 "-S1.2" = {
367                         set_if = "$http_ssl_force_tlsv1_2$"
368                 }
369                 "-S2" = {
370                         set_if = "$http_ssl_force_sslv2$"
371                 }
372                 "-S3" = {
373                         set_if = "$http_ssl_force_sslv3$"
374                 }
375                 "-S1+" = {
376                         set_if = "$http_ssl_force_tlsv1_or_higher$"
377                 }
378                 "-S1.1+" = {
379                         set_if = "$http_ssl_force_tlsv1_1_or_higher$"
380                 }
381                 "-S1.2+" = {
382                         set_if = "$http_ssl_force_tlsv1_2_or_higher$"
383                 }
384                 "-S2+" = {
385                         set_if = "$http_ssl_force_sslv2_or_higher$"
386                 }
387                 "-S3+" = {
388                         set_if = "$http_ssl_force_sslv3_or_higher$"
389                 }
390                 "--sni" = {
391                         set_if = "$http_sni$"
392                 }
393                 "-C" = {
394                         value = "$http_certificate$"
395                         description = "Minimum number of days a certificate has to be valid. This parameter explicitely sets the port to 443 and ignores the URL if passed."
396                 }
397                 "-J" = {
398                         value = "$http_clientcert$"
399                         description = "Name of file contains the client certificate (PEM format)"
400                 }
401                 "-K" = {
402                         value = "$http_privatekey$"
403                         description = "Name of file contains the private key (PEM format)"
404                 }
405                 "-a" = {
406                         value = "$http_auth_pair$"
407                         description = "Username:password on sites with basic authentication"
408                 }
409                 "--no-body" = {
410                         set_if = "$http_ignore_body$"
411                 }
412                 "-w" = "$http_warn_time$"
413                 "-c" = "$http_critical_time$"
414                 "-e" = "$http_expect$"
415                 "-d" = {
416                         value = "$http_headerstring$"
417                         description = "String to expect in the response headers"
418                 }
419                 "-s" = {
420                         value = "$http_string$"
421                         description = "String to expect in the content"
422                 }
423                 "-P" = {
424                         value = "$http_post$"
425                         description = "URL encoded http POST data"
426                 }
427                 "-j" = {
428                         value = "$http_method$"
429                         description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
430                 }
431                 "-M" = {
432                         value = "$http_maxage$"
433                         description = "Warn if document is more than seconds old"
434                 }
435                 "-T" = {
436                         value = "$http_contenttype$"
437                         description = "Specify Content-Type header when POSTing"
438                 }
439                 "-l" = {
440                         set_if = "$http_linespan$"
441                         description = "Allow regex to span newline"
442                         order = 1
443                 }
444                 "-r" = {
445                         value = "$http_expect_body_regex$"
446                         description = "Search page for regex"
447                         order = 2
448                 }
449                 "-R" = {
450                         value = "$http_expect_body_eregi$"
451                         description = "Search page for case-insensitive regex"
452                         order = 2
453                 }
454                 "--invert-regex" = {
455                         set_if = "$http_invertregex$"
456                         description = "Return CRITICAL if found, OK if not"
457                 }
458                 "-b" = {
459                         value = "$http_proxy_auth_pair$"
460                         description = "Username:password on proxy-servers with basic authentication"
461                 }
462                 "-A" = {
463                         value = "$http_useragent$"
464                         description = "String to be sent in http header as User Agent"
465                 }
466                 "-k" = {
467                         value = "$http_header$"
468                         description = "Any other tags to be sent in http header"
469                 }
470                 "-E" = {
471                         set_if = "$http_extendedperfdata$"
472                         description = "Print additional perfdata"
473                 }
474                 "-f" = {
475                         value = "$http_onredirect$"
476                         description = "How to handle redirect pages"
477                 }
478                 "-m" = {
479                         value = "$http_pagesize$"
480                         description = "Minim page size required:Maximum page size required"
481                 }
482                 "-t" = {
483                         value = "$http_timeout$"
484                         description = "Seconds before connection times out"
485                 }
486                 "-4" = {
487                         set_if = "$http_ipv4$"
488                         description = "Use IPv4 connection"
489                 }
490                 "-6" = {
491                         set_if = "$http_ipv6$"
492                         description = "Use IPv6 connection"
493                 }
494                 "-L" = {
495                         set_if = "$http_link$"
496                         description = "Wrap output in HTML link"
497                 }
498                 "-v" = {
499                         set_if = "$http_verbose$"
500                         description = "Show details for command-line debugging"
501                 }
502         }
503
504         vars.http_address = "$check_address$"
505         vars.http_ssl = false
506         vars.http_sni = false
507         vars.http_linespan = false
508         vars.http_invertregex = false
509         vars.check_ipv4 = "$http_ipv4$"
510         vars.check_ipv6 = "$http_ipv6$"
511         vars.http_link = false
512         vars.http_verbose = false
513 }
514
515 object CheckCommand "ftp" {
516         import "ipv4-or-ipv6"
517
518         command = [ PluginDir + "/check_ftp" ]
519
520         arguments = {
521                 "-H" = {
522                         value = "$ftp_address$"
523                         description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
524                 }
525                 "-p" = {
526                         value = "$ftp_port$"
527                         description = "The FTP port number. Defaults to none"
528                 }
529                 "-e" = {
530                         value = "$ftp_expect$"
531                         description = "String to expect in server response (may be repeated)."
532                 }
533                 "-A" = {
534                         set_if = "$ftp_all$"
535                         description = "All expect strings need to occur in server response. Default is any."
536                 }
537                 "-E_send" = {
538                         key = "-E"
539                         order = 1
540                         set_if = "$ftp_escape_send$"
541                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
542                 }
543                 "-s" = {
544                         order = 2
545                         value = "$ftp_send$"
546                         description = "String to send to the server."
547                 }
548                 "-E_quit" = {
549                         key = "-E"
550                         order = 3
551                         set_if = "$ftp_escape_quit$"
552                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
553                 }
554                 "-q" = {
555                         order = 4
556                         value = "$ftp_quit$"
557                         description = "String to send server to initiate a clean close of the connection."
558                 }
559                 "-r" = {
560                         value = "$ftp_refuse$"
561                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
562                 }
563                 "-M" = {
564                         value = "$ftp_mismatch$"
565                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
566                 }
567                 "-j" = {
568                         set_if = "$ftp_jail$"
569                         description = "Hide output from TCP socket."
570                 }
571                 "-m" = {
572                         value = "$ftp_maxbytes$"
573                         description = "Close connection once more than this number of bytes are received."
574                 }
575                 "-d" = {
576                         value = "$ftp_delay$"
577                         description = "Seconds to wait between sending string and polling for response."
578                 }
579                 "-D" = {
580                         value = "$ftp_certificate$"
581                         description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
582                 }
583                 "-S" = {
584                         set_if = "$ftp_ssl$"
585                         description = "Use SSL for the connection."
586                 }
587                 "-w" = {
588                         value = "$ftp_wtime$"
589                         description = "Response time to result in warning status (seconds)."
590                 }
591                 "-c" = {
592                         value = "$ftp_ctime$"
593                         description = "Response time to result in critical status (seconds)."
594                 }
595                 "-t" = {
596                         value = "$ftp_timeout$"
597                         description = "Seconds before connection times out. Defaults to 10."
598                 }
599                 "-4" = {
600                         set_if = "$ftp_ipv4$"
601                         description = "Use IPv4 connection"
602                 }
603                 "-6" = {
604                         set_if = "$ftp_ipv6$"
605                         description = "Use IPv6 connection"
606                 }
607         }
608
609         vars.ftp_address = "$check_address$"
610         vars.ftp_ssl = false
611         vars.ftp_refuse = "crit"
612         vars.ftp_mismatch = "warn"
613         vars.ftp_timeout = 10
614         vars.check_ipv4 = "$ftp_ipv4$"
615         vars.check_ipv6 = "$ftp_ipv6$"
616 }
617
618 object CheckCommand "smtp" {
619         import "ipv4-or-ipv6"
620
621         command = [ PluginDir + "/check_smtp" ]
622
623         arguments = {
624                 "-H" = "$smtp_address$"
625                 "-p" = "$smtp_port$"
626                 "-f" = "$smtp_mail_from$"
627                 "-e" = "$smtp_expect$"
628                 "-C" = "$smtp_command$"
629                 "-R" = "$smtp_response$"
630                 "-F" = "$smtp_helo_fqdn$"
631                 "-D" = "$smtp_certificate_age$"
632                 "-S" = {
633                         set_if = "$smtp_starttls$"
634                         description = "Use STARTTLS for the connection."
635                 }
636                 "-A" = "$smtp_authtype$"
637                 "-U" = "$smtp_authuser$"
638                 "-P" = "$smtp_authpass$"
639                 "-q" = "$smtp_ignore_quit$"
640                 "-w" = "$smtp_warning$"
641                 "-c" = "$smtp_critical$"
642                 "-t" = "$smtp_timeout$"
643                 "-4" = {
644                         set_if = "$smtp_ipv4$"
645                         description = "Use IPv4 connection"
646                 }
647                 "-6" = {
648                         set_if = "$smtp_ipv6$"
649                         description = "Use IPv6 connection"
650                 }
651         }
652
653         vars.smtp_address = "$check_address$"
654         vars.check_ipv4 = "$smtp_ipv4$"
655         vars.check_ipv6 = "$smtp_ipv6$"
656 }
657
658 object CheckCommand "ssmtp" {
659         import "ipv4-or-ipv6"
660
661         command = [ PluginDir + "/check_ssmtp" ]
662
663         arguments = {
664                 "-H" = "$ssmtp_address$"
665                 "-p" = "$ssmtp_port$"
666                 "-E" = "$ssmtp_escape$"
667                 "-s" = "$ssmtp_send$"
668                 "-e" = "$ssmtp_expect$"
669                 "-A" = {
670                         set_if = "$ssmtp_all$"
671                         description = "All expect strings need to occur in server response. Default is any."
672                 }
673                 "-q" = "$ssmtp_quit$"
674                 "-r" = "$ssmtp_refuse$"
675                 "-M" = "$ssmtp_mismatch$"
676                 "-j" = {
677                         set_if = "$ssmtp_jail$"
678                         description = "Hide output from TCP socket."
679                 }
680                 "-m" = "$ssmtp_maxbytes$"
681                 "-d" = "$ssmtp_delay$"
682                 "-D" = "$ssmtp_certificate_age$"
683                 "-S" = {
684                         set_if = "$ssmtp_ssl$"
685                         description = "Use SSL for the connection."
686                 }
687                 "-w" = "$ssmtp_warning$"
688                 "-c" = "$ssmtp_critical$"
689                 "-t" = "$ssmtp_timeout$"
690                 "-4" = {
691                         set_if = "$ssmtp_ipv4$"
692                         description = "Use IPv4 connection"
693                 }
694                 "-6" = {
695                         set_if = "$ssmtp_ipv6$"
696                         description = "Use IPv6 connection"
697                 }
698         }
699
700         vars.ssmtp_address = "$check_address$"
701         vars.check_ipv4 = "$ssmtp_ipv4$"
702         vars.check_ipv6 = "$ssmtp_ipv6$"
703 }
704
705 object CheckCommand "imap" {
706         import "ipv4-or-ipv6"
707
708         command = [ PluginDir + "/check_imap" ]
709
710         arguments = {
711                 "-H" = "$imap_address$"
712                 "-p" = "$imap_port$"
713                 "-E" = "$imap_escape$"
714                 "-s" = "$imap_send$"
715                 "-e" = "$imap_expect$"
716                 "-A" = {
717                         set_if = "$imap_all$"
718                         description = "All expect strings need to occur in server response. Default is any."
719                 }
720                 "-q" = "$imap_quit$"
721                 "-r" = "$imap_refuse$"
722                 "-M" = "$imap_mismatch$"
723                 "-j" = {
724                         set_if = "$imap_jail$"
725                         description = "Hide output from TCP socket."
726                 }
727                 "-m" = "$imap_maxbytes$"
728                 "-d" = "$imap_delay$"
729                 "-D" = "$imap_certificate_age$"
730                 "-S" = {
731                         set_if = "$imap_ssl$"
732                         description = "Use SSL for the connection."
733                 }
734                 "-w" = "$imap_warning$"
735                 "-c" = "$imap_critical$"
736                 "-t" = "$imap_timeout$"
737                 "-4" = {
738                         set_if = "$imap_ipv4$"
739                         description = "Use IPv4 connection"
740                 }
741                 "-6" = {
742                         set_if = "$imap_ipv6$"
743                         description = "Use IPv6 connection"
744                 }
745         }
746
747         vars.imap_address = "$check_address$"
748         vars.check_ipv4 = "$imap_ipv4$"
749         vars.check_ipv6 = "$imap_ipv6$"
750 }
751
752 object CheckCommand "simap" {
753         import "ipv4-or-ipv6"
754
755         command = [ PluginDir + "/check_simap" ]
756
757         arguments = {
758                 "-H" = "$simap_address$"
759                 "-p" = "$simap_port$"
760                 "-E" = "$simap_escape$"
761                 "-s" = "$simap_send$"
762                 "-e" = "$simap_expect$"
763                 "-A" = {
764                         set_if = "$simap_all$"
765                         description = "All expect strings need to occur in server response. Default is any."
766                 }
767                 "-q" = "$simap_quit$"
768                 "-r" = "$simap_refuse$"
769                 "-M" = "$simap_mismatch$"
770                 "-j" = {
771                         set_if = "$simap_jail$"
772                         description = "Hide output from TCP socket."
773                 }
774                 "-m" = "$simap_maxbytes$"
775                 "-d" = "$simap_delay$"
776                 "-D" = "$simap_certificate_age$"
777                 "-S" = {
778                         set_if = "$simap_ssl$"
779                         description = "Use SSL for the connection."
780                 }
781                 "-w" = "$simap_warning$"
782                 "-c" = "$simap_critical$"
783                 "-t" = "$simap_timeout$"
784                 "-4" = {
785                         set_if = "$simap_ipv4$"
786                         description = "Use IPv4 connection"
787                 }
788                 "-6" = {
789                         set_if = "$simap_ipv6$"
790                         description = "Use IPv6 connection"
791                 }
792         }
793
794         vars.simap_address = "$check_address$"
795         vars.check_ipv4 = "$simap_ipv4$"
796         vars.check_ipv6 = "$simap_ipv6$"
797 }
798
799 object CheckCommand "pop" {
800         import "ipv4-or-ipv6"
801
802         command = [ PluginDir + "/check_pop" ]
803
804         arguments = {
805                 "-H" = "$pop_address$"
806                 "-p" = "$pop_port$"
807                 "-E" = "$pop_escape$"
808                 "-s" = "$pop_send$"
809                 "-e" = "$pop_expect$"
810                 "-A" = {
811                         set_if = "$pop_all$"
812                         description = "All expect strings need to occur in server response. Default is any."
813                 }
814                 "-q" = "$pop_quit$"
815                 "-r" = "$pop_refuse$"
816                 "-M" = "$pop_mismatch$"
817                 "-j" = {
818                         set_if = "$pop_jail$"
819                         description = "Hide output from TCP socket."
820                 }
821                 "-m" = "$pop_maxbytes$"
822                 "-d" = "$pop_delay$"
823                 "-D" = "$pop_certificate_age$"
824                 "-S" = {
825                         set_if = "$pop_ssl$"
826                         description = "Use SSL for the connection."
827                 }
828                 "-w" = "$pop_warning$"
829                 "-c" = "$pop_critical$"
830                 "-t" = "$pop_timeout$"
831                 "-4" = {
832                         set_if = "$pop_ipv4$"
833                         description = "Use IPv4 connection"
834                 }
835                 "-6" = {
836                         set_if = "$pop_ipv6$"
837                         description = "Use IPv6 connection"
838                 }
839         }
840
841         vars.pop_address = "$check_address$"
842         vars.check_ipv4 = "$pop_ipv4$"
843         vars.check_ipv6 = "$pop_ipv6$"
844 }
845
846 object CheckCommand "spop" {
847         import "ipv4-or-ipv6"
848
849         command = [ PluginDir + "/check_spop" ]
850
851         arguments = {
852                 "-H" = "$spop_address$"
853                 "-p" = "$spop_port$"
854                 "-E" = "$spop_escape$"
855                 "-s" = "$spop_send$"
856                 "-e" = "$spop_expect$"
857                 "-A" = {
858                         set_if = "$spop_all$"
859                         description = "All expect strings need to occur in server response. Default is any."
860                 }
861                 "-q" = "$spop_quit$"
862                 "-r" = "$spop_refuse$"
863                 "-M" = "$spop_mismatch$"
864                 "-j" = {
865                         set_if = "$spop_jail$"
866                         description = "Hide output from TCP socket."
867                 }
868                 "-m" = "$spop_maxbytes$"
869                 "-d" = "$spop_delay$"
870                 "-D" = "$spop_certificate_age$"
871                 "-S" = {
872                         set_if = "$spop_ssl$"
873                         description = "Use SSL for the connection."
874                 }
875                 "-w" = "$spop_warning$"
876                 "-c" = "$spop_critical$"
877                 "-t" = "$spop_timeout$"
878                 "-4" = {
879                         set_if = "$spop_ipv4$"
880                         description = "Use IPv4 connection"
881                 }
882                 "-6" = {
883                         set_if = "$spop_ipv6$"
884                         description = "Use IPv6 connection"
885                 }
886         }
887
888         vars.spop_address = "$check_address$"
889         vars.check_ipv4 = "$spop_ipv4$"
890         vars.check_ipv6 = "$spop_ipv6$"
891 }
892
893 object CheckCommand "ntp_time" {
894         import "ipv4-or-ipv6"
895
896         command = [ PluginDir + "/check_ntp_time" ]
897
898         arguments = {
899                 "-H" = "$ntp_address$"
900                 "-p" = "$ntp_port$"
901                 "-q" = {
902                         set_if = "$ntp_quiet$"
903                         description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
904                 }
905                 "-w" = "$ntp_warning$"
906                 "-c" = "$ntp_critical$"
907                 "-o" = "$ntp_timeoffset$"
908                 "-t" = "$ntp_timeout$"
909                 "-4" = {
910                         set_if = "$ntp_ipv4$"
911                         description = "Use IPv4 connection"
912                 }
913                 "-6" = {
914                         set_if = "$ntp_ipv6$"
915                         description = "Use IPv6 connection"
916                 }
917         }
918
919         vars.ntp_address = "$check_address$"
920         vars.check_ipv4 = "$ntp_ipv4$"
921         vars.check_ipv6 = "$ntp_ipv6$"
922 }
923
924 object CheckCommand "ntp_peer" {
925         import "ipv4-or-ipv6"
926
927         command = [ PluginDir + "/check_ntp_peer" ]
928
929         arguments = {
930                 "-H" = "$ntp_address$"
931                 "-p" = "$ntp_port$"
932                 "-w" = "$ntp_warning$"
933                 "-c" = "$ntp_critical$"
934                 "-W" = "$ntp_wstratum$"
935                 "-C" = "$ntp_cstratum$"
936                 "-j" = "$ntp_wjitter$"
937                 "-k" = "$ntp_cjitter$"
938                 "-m" = "$ntp_wsource$"
939                 "-n" = "$ntp_csource$"
940                 "-t" = "$ntp_timeout$"
941                 "-4" = {
942                         set_if = "$ntp_ipv4$"
943                         description = "Use IPv4 connection"
944                 }
945                 "-6" = {
946                         set_if = "$ntp_ipv6$"
947                         description = "Use IPv6 connection"
948                 }
949         }
950
951         vars.ntp_address = "$check_address$"
952         vars.check_ipv4 = "$ntp_ipv4$"
953         vars.check_ipv6 = "$ntp_ipv6$"
954 }
955
956 object CheckCommand "ssh" {
957         import "ipv4-or-ipv6"
958
959         command = [ PluginDir + "/check_ssh" ]
960
961         arguments = {
962                 "-p" = "$ssh_port$"
963                 "-t" = "$ssh_timeout$"
964                 "host" = {
965                         value = "$ssh_address$"
966                         skip_key = true
967                         order = 1
968                 }
969                 "-4" = {
970                         set_if = "$ssh_ipv4$"
971                         description = "Use IPv4 connection"
972                 }
973                 "-6" = {
974                         set_if = "$ssh_ipv6$"
975                         description = "Use IPv6 connection"
976                 }
977         }
978
979         vars.ssh_address = "$check_address$"
980         vars.check_ipv4 = "$ssh_ipv4$"
981         vars.check_ipv6 = "$ssh_ipv6$"
982 }
983
984 object CheckCommand "disk" {
985         command = [ PluginDir + "/check_disk" ]
986
987         arguments = {
988                 "-w" = {
989                         value = "$disk_wfree$"
990                         description = "Exit with WARNING status if less than INTEGER units of disk are free or Exit with WARNING status if less than PERCENT of disk space is free"
991                         required = true
992                         order = -3
993                 }
994
995                 "-c" = {
996                         value = "$disk_cfree$"
997                         description = "Exit with CRITICAL status if less than INTEGER units of disk are free or Exit with CRITCAL status if less than PERCENT of disk space is free"
998                         required = true
999                         order = -3
1000                 }
1001
1002                 "-W" = {
1003                         value = "$disk_inode_wfree$"
1004                         description = "Exit with WARNING status if less than PERCENT of inode space is free"
1005                 }
1006
1007                 "-K" = {
1008                         value = "$disk_inode_cfree$"
1009                         description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1010                 }
1011
1012                 "-p" = {
1013                         value = "$disk_partitions$"
1014                         description = "Path or partition (may be repeated)"
1015                         repeat_key = true
1016                         order = 1
1017                 }
1018
1019                 "-p_old" = {
1020                         key = "-p"
1021                         value = "$disk_partition$"
1022                         order = 1
1023                 }
1024
1025                 "-x" = {
1026                         value = "$disk_partitions_excluded$"
1027                         description = "Ignore device (only works if -p unspecified)"
1028                 }
1029
1030                 "-x_old" = {
1031                         key = "-x"
1032                         value = "$disk_partition_excluded$"
1033                 }
1034
1035                 "-C" = {
1036                         set_if = "$disk_clear$"
1037                         description = "Clear thresholds"
1038                 }
1039
1040                 "-E" = {
1041                         set_if = "$disk_exact_match$"
1042                         description = "For paths or partitions specified with -p, only check for exact paths"
1043                 }
1044
1045                 "-e" = {
1046                         set_if = "$disk_errors_only$"
1047                         description = "Display only devices/mountpoints with errors"
1048                 }
1049
1050                 "-f" = {
1051                         set_if = "$disk_ignore_reserved$"
1052                         description = "Don't account root-reserved blocks into freespace in perfdata"
1053                 }
1054
1055                 "-g" = {
1056                         value = "$disk_group$"
1057                         description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1058                 }
1059
1060                 "-k" = {
1061                         set_if = "$disk_kilobytes$"
1062                         description = "Same as --units kB"
1063                 }
1064
1065                 "-l" = {
1066                         set_if = "$disk_local$"
1067                         description = " Only check local filesystems"
1068                 }
1069
1070                 "-L" = {
1071                         set_if = "$disk_stat_remote_fs$"
1072                         description = "Only check local filesystems against thresholds. Yet call stat on remote filesystems to test if they are accessible (e.g. to detect Stale NFS Handles)"
1073                 }
1074
1075                 "-M" = {
1076                         set_if = "$disk_mountpoint$"
1077                         description = "Display the mountpoint instead of the partition"
1078                 }
1079
1080                 "-m" = {
1081                         set_if = "$disk_megabytes$"
1082                         description = "Same as --units MB"
1083                 }
1084
1085                 "-A" = {
1086                         set_if = "$disk_all$"
1087                         description = "Explicitly select all paths. This is equivalent to -R .*"
1088                 }
1089
1090                 "-R" = {
1091                         value = "$disk_eregi_path$"
1092                         description = "Case insensitive regular expression for path/partition (may be repeated)"
1093                         repeat_key = true
1094                 }
1095
1096                 "-r" = {
1097                         value = "$disk_ereg_path$"
1098                         description = "Regular expression for path or partition (may be repeated)"
1099                         repeat_key = true
1100                 }
1101
1102                 "-I" = {
1103                         value = "$disk_ignore_eregi_path$"
1104                         description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1105                         repeat_key = true
1106                         order = 2
1107                 }
1108
1109                 "-i" = {
1110                         value = "$disk_ignore_ereg_path$"
1111                         description = "Regular expression to ignore selected path or partition (may be repeated)"
1112                         repeat_key = true
1113                         order = 2
1114                 }
1115
1116                 "-t" = {
1117                         value = "$disk_timeout$"
1118                         description = "Seconds before connection times out (default: 10)"
1119                 }
1120
1121                 "-u" = {
1122                         value = "$disk_units$"
1123                         description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1124                 }
1125
1126                 "-X" = {
1127                         value = "$disk_exclude_type$"
1128                         description = "Ignore all filesystems of indicated type (may be repeated)"
1129                         repeat_key = true
1130                 }
1131         }
1132
1133         vars.disk_wfree = "20%"
1134         vars.disk_cfree = "10%"
1135         vars.disk_megabytes = true
1136         vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ]
1137 }
1138
1139 object CheckCommand "disk_smb" {
1140         command = [ PluginDir + "/check_disk_smb" ]
1141
1142         arguments = {
1143                 "-H" = {
1144                         value = "$disk_smb_hostname$"
1145                         description = "NetBIOS name of the server."
1146                 }
1147                 "-s" = {
1148                         value = "$disk_smb_share$"
1149                         description = "Share name to be tested."
1150                 }
1151                 "-W" = {
1152                         value = "$disk_smb_workgroup$"
1153                         description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1154                 }
1155                 "-a" = {
1156                         value = "$disk_smb_address$"
1157                         description = "IP-address of HOST (only necessary if HOST is in another network)."
1158                 }
1159                 "-u" = {
1160                         value = "$disk_smb_username$"
1161                         description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1162                 }
1163                 "-p" = {
1164                         value = "$disk_smb_password$"
1165                         description = "Password to log in to server. (Defaults to an empty password if omitted)."
1166                 }
1167                 "-w" = {
1168                         value = "$disk_smb_wused$"
1169                         description = "Percent of used space at which a warning will be generated (Default: 85%)."
1170                 }
1171                 "-c" = {
1172                         value = "$disk_smb_cused$"
1173                         description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1174                 }
1175                 "-P" = {
1176                         value = "$disk_smb_port$"
1177                         description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1178                 }
1179         }
1180
1181         vars.disk_smb_wused = "85%"
1182         vars.disk_smb_cused = "95%"
1183 }
1184
1185 object CheckCommand "users" {
1186         command = [ PluginDir + "/check_users" ]
1187
1188         arguments = {
1189                 "-w" = "$users_wgreater$"
1190                 "-c" = "$users_cgreater$"
1191         }
1192
1193         vars.users_wgreater = 20
1194         vars.users_cgreater = 50
1195 }
1196
1197 object CheckCommand "procs" {
1198         command = [ PluginDir + "/check_procs" ]
1199
1200         arguments = {
1201                 "-w" = {
1202                         value = "$procs_warning$"
1203                         description = "Generate warning state if metric is outside this range" 
1204                 }
1205                 "-c" = {
1206                         value = "$procs_critical$"
1207                         description = "Generate critical state if metric is outside this range" 
1208                 }
1209                 "-m" = {
1210                         value = "$procs_metric$"
1211                         description = "Check thresholds against metric" 
1212                 }
1213                 "-t" = {
1214                         value = "$procs_timeout$"
1215                         description = "Seconds before plugin times out"
1216                 }
1217                 "-T" = {
1218                         set_if = "$procs_traditional$"
1219                         description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1220                 }
1221                 "-s" = {
1222                         value = "$procs_state$"
1223                         description = "Only scan for processes that have one or more of the status flags you specify"
1224                 }
1225                 "-p" = {
1226                         value = "$procs_ppid$"
1227                         description = "Only scan for children of the parent process ID indicated"
1228                 }
1229                 "-z" = {
1230                         value = "$procs_vsz$"
1231                         description = "Only scan for processes with VSZ higher than indicated"
1232                 }
1233                 "-r" = {
1234                         value = "$procs_rss$"
1235                         description = "Only scan for processes with RSS higher than indicated"
1236                 }
1237                 "-P" = {
1238                         value = "$procs_pcpu$"
1239                         description = "Only scan for processes with PCPU higher than indicated"
1240                 }
1241                 "-u" = {
1242                         value = "$procs_user$"
1243                         description = "Only scan for processes with user name or ID indicated"
1244                 }
1245                 "-a" = {
1246                         value = "$procs_argument$"
1247                         description = "Only scan for processes with args that contain STRING"
1248                 }
1249                 "--ereg-argument-array" = {
1250                         value = "$procs_argument_regex$"
1251                         description = "Only scan for processes with args that contain the regex STRING"
1252                 }
1253                 "-C" = {
1254                         value = "$procs_command$"
1255                         description = "Only scan for exact matches of COMMAND (without path)"
1256                 }
1257                 "-k" = {
1258                         set_if = "$procs_nokthreads$"
1259                         description = "Only scan for non kernel threads"
1260                 }
1261         }
1262
1263         vars.procs_traditional = false
1264         vars.procs_nokthreads = false
1265         vars.procs_warning = 250
1266         vars.procs_critical = 400
1267 }
1268
1269 object CheckCommand "swap" {
1270         command = [ PluginDir + "/check_swap" ]
1271
1272         arguments = {
1273                 "-w" = {{
1274                         if (macro("$swap_integer$")) {
1275                                 return macro("$swap_wfree$")
1276                         } else {
1277                                 return macro("$swap_wfree$%")
1278                         }
1279                 }}
1280                 "-c" = {{
1281                         if (macro("$swap_integer$")) {
1282                                 return macro("$swap_cfree$")
1283                         } else {
1284                                 return macro("$swap_cfree$%")
1285                         }
1286                 }}
1287                 "-a" = {
1288                         set_if = "$swap_allswaps$"
1289                         description = "Conduct comparisons for all swap partitions, one by one"
1290                 }
1291                 "-n" = {
1292                         value = "$swap_noswap$"
1293                         description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1294                 }
1295         }
1296
1297         vars.swap_wfree = 50
1298         vars.swap_cfree = 25
1299         vars.swap_integer = false
1300         vars.swap_allswaps = false
1301 }
1302
1303 object CheckCommand "load" {
1304         command = [ PluginDir + "/check_load" ]
1305
1306         arguments = {
1307                 "-w" = {
1308                         value = "$load_wload1$,$load_wload5$,$load_wload15$"
1309                         description = "Exit with WARNING status if load average exceeds WLOADn"
1310                 }
1311                 "-c" = {
1312                         value = "$load_cload1$,$load_cload5$,$load_cload15$"
1313                         description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1314                 }
1315                 "-r" = {
1316                         set_if = "$load_percpu$"
1317                         description = "Divide the load averages by the number of CPUs (when possible)"
1318                 }
1319         }
1320
1321         vars.load_wload1 = 5.0
1322         vars.load_wload5 = 4.0
1323         vars.load_wload15 = 3.0
1324
1325         vars.load_cload1 = 10.0
1326         vars.load_cload5 = 6.0
1327         vars.load_cload15 = 4.0
1328
1329         vars.load_percpu = false
1330 }
1331
1332 object CheckCommand "snmp" {
1333         command = [ PluginDir + "/check_snmp" ]
1334
1335         arguments = {
1336                 "-H" = "$snmp_address$"
1337                 "-o" = "$snmp_oid$"
1338                 "-C" = "$snmp_community$"
1339                 "-c" = "$snmp_crit$"
1340                 "-w" = "$snmp_warn$"
1341                 "-s" = "$snmp_string$"
1342                 "-r" = "$snmp_ereg$"
1343                 "-R" = "$snmp_eregi$"
1344                 "-l" = "$snmp_label$"
1345                 "-u" = "$snmp_units$"
1346                 "-t" = "$snmp_timeout$"
1347                 "-p" = "$snmp_port$"
1348                 "-e" = "$snmp_retries$"
1349                 "--invert-search" = {
1350                         set_if = "$snmp_invert_search$"
1351                         description = "Invert search result and return CRITICAL if found"
1352                 }
1353                 "-P" = "$snmp_version$"
1354                 "-m" = "$snmp_miblist$"
1355                 "--rate-multiplier" = "$snmp_rate_multiplier$"
1356                 "--rate" = {
1357                         set_if = "$snmp_rate$"
1358                         description = "Enable rate calculation"
1359                 }
1360                 "-n" = {
1361                         set_if = "$snmp_getnext$"
1362                         description = "Use SNMP GETNEXT instead of SNMP GET"
1363                 }
1364         }
1365
1366         vars.snmp_address = {{
1367                 var addr_v4 = macro("$address$")
1368                 var addr_v6 = macro("$address6$")
1369
1370                 if (addr_v4) {
1371                         return addr_v4
1372                 } else {
1373                         return "udp6:[" + addr_v6 + "]"
1374                 }
1375         }}
1376
1377         vars.snmp_community = "public"
1378         vars.snmp_invert_search = false
1379         vars.snmp_timeout = "10"
1380 }
1381
1382 object CheckCommand "snmpv3" {
1383         import "ipv4-or-ipv6"
1384
1385         command = [ PluginDir + "/check_snmp" ]
1386
1387         arguments = {
1388                 "-H" = {
1389                         value = "$snmpv3_address$"
1390                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1391                 }
1392                 "-p" = {
1393                         value = "$snmpv3_port$"
1394                         description = "Port number"
1395                 }
1396                 "-n" = {
1397                         set_if = "$snmpv3_getnext$"
1398                         description = "Use SNMP GETNEXT instead of SNMP GET"
1399                 }
1400                 "-P" = {
1401                         value = 3
1402                         description = "SNMP protocol version"
1403                 }
1404                 "-L" = {
1405                         value = "$snmpv3_seclevel$"
1406                         description = "SNMPv3 securityLevel"
1407                 }
1408                 "-a" = {
1409                         value = "$snmpv3_auth_alg$"
1410                         description = "SNMPv3 auth proto"
1411                 }
1412                 "-U" = {
1413                         value = "$snmpv3_user$"
1414                         description = "SNMPv3 username"
1415                 }
1416                 "-A" = {
1417                         value = "$snmpv3_auth_key$"
1418                         description = "SNMPv3 authentication password"
1419                 }
1420                 "-X" = {
1421                         value = "$snmpv3_priv_key$"
1422                         description = "SNMPv3 privacy password"
1423                 }
1424                 "-o" = {
1425                         value = "$snmpv3_oid$"
1426                         description = "Object identifier(s) or SNMP variables whose value you wish to query"
1427                 }
1428                 "-x" = {
1429                         value = "$snmpv3_priv_alg$"
1430                         description = "SNMPv3 priv proto (default DES)"
1431                 }
1432                 "-w" = {
1433                         value = "$snmpv3_warn$"
1434                         description = "Warning threshold range(s)"
1435                 }
1436                 "-c" = {
1437                         value = "$snmpv3_crit$"
1438                         description = "Critical threshold range(s)"
1439                 }
1440                 "-s" = {
1441                         value = "$snmpv3_string$"
1442                         description = "Return OK state (for that OID) if STRING is an exact match"
1443                 }
1444                 "-r" = {
1445                         value = "$snmpv3_ereg$"
1446                         description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1447                 }
1448                 "-R" = {
1449                         value = "$snmpv3_eregi$"
1450                         description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1451                 }
1452                 "--invert-search" = {
1453                         set_if = "$snmpv3_invert_search$"
1454                         description = "Invert search result and return CRITICAL if found"
1455                 }
1456                 "-l" = {
1457                         value = "$snmpv3_label$"
1458                         description = "Prefix label for output from plugin"
1459                 }
1460                 "-m" = {
1461                         value = "$snmpv3_miblist$"
1462                         description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1463                 }
1464                 "-u" = "$snmpv3_units$"
1465                 "--rate-multiplier" = "$snmpv3_rate_multiplier$"
1466                 "--rate" = {
1467                         set_if = "$snmpv3_rate$"
1468                         description = "Enable rate calculation"
1469                 }
1470                 "-t" = "$snmpv3_timeout$"
1471         }
1472
1473         vars.snmpv3_address = "$check_address$"
1474         vars.snmpv3_auth_alg = "SHA"
1475         vars.snmpv3_priv_alg = "AES"
1476         vars.snmpv3_seclevel = "authPriv"
1477         vars.snmpv3_timeout = "10"
1478 }
1479
1480 object CheckCommand "snmp-uptime" {
1481         import "snmp"
1482
1483         vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1484 }
1485
1486 object CheckCommand "apt" {
1487         command = [ PluginDir + "/check_apt" ]
1488
1489         arguments = {
1490                 "--extra-opts" = {
1491                         value = "$apt_extra_opts$"
1492                         description = "Read options from an ini file."
1493                 }
1494                 "--upgrade" = {
1495                         value = "$apt_upgrade$"
1496                         description = "[Default] Perform an upgrade. If an optional OPTS argument is provided, apt-get will be run with these command line options instead of the default."
1497                 }
1498                 "--dist-upgrade" = {
1499                         value = "$apt_dist_upgrade$"
1500                         description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1501                 }
1502                 "--include" = {
1503                         value = "$apt_include$"
1504                         description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1505                 }
1506                 "--exclude" = {
1507                         value = "$apt_exclude$"
1508                         description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1509                 }
1510                 "--critical" = {
1511                         value = "$apt_critical$"
1512                         description = "If the full package information of any of the upgradable packages match this REGEXP, the plugin will return CRITICAL status. Can be specified multiple times."
1513                 }
1514                 "--timeout" = {
1515                         value = "$apt_timeout$"
1516                         description = "Seconds before plugin times out (default: 10)."
1517                 }
1518                 "--only-critical" = {
1519                         set_if = "$apt_only_critical$"
1520                         description = "Only warn about critical upgrades."
1521                 }
1522         }
1523
1524         timeout = 5m
1525 }
1526
1527 object CheckCommand "dhcp" {
1528         command = [ PluginDir + "/check_dhcp" ]
1529
1530         arguments = {
1531                 "-s" = "$dhcp_serverip$"
1532                 "-r" = "$dhcp_requestedip$"
1533                 "-t" = "$dhcp_timeout$"
1534                 "-i" = "$dhcp_interface$"
1535                 "-m" = "$dhcp_mac$"
1536                 "-u" = {
1537                         set_if = "$dhcp_unicast$"
1538                 }
1539         }
1540
1541         vars.dhcp_unicast = false
1542 }
1543
1544 object CheckCommand "dns" {
1545         import "ipv4-or-ipv6"
1546
1547         command = [ PluginDir + "/check_dns" ]
1548
1549         arguments = {
1550                 "-H" = {
1551                         value = "$dns_lookup$"
1552                         description = "The name or address you want to query."
1553                 }
1554                 "-s" = {
1555                         value = "$dns_server$"
1556                         description = "Optional DNS server you want to use for the lookup."
1557                 }
1558                 "-q" = {
1559                         value = "$dns_query_type$"
1560                         description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
1561                 }
1562                 "-a" = {
1563                         value = "$dns_expected_answers$"
1564                         description = "Optional ip address or host you expect the DNS server to return. Host must end with a dot (.). This option can be repeated multiple times (Returns OK if any value match). If multiple addresses are returned at once, you have to match the whole string of addresses separated with commas (sorted alphabetically)."
1565                 }
1566                 "-A" = {
1567                         set_if = "$dns_authoritative$"
1568                         description = "Optionally expect the DNS server to be authoritative for the lookup"
1569                 }
1570                 "-n" = {
1571                         set_if = "$dns_accept_cname$"
1572                         description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
1573                 }
1574                 "-w" = {
1575                         value = "$dns_wtime$"
1576                         description = "Return warning if elapsed time exceeds value."
1577                 }
1578                 "-c" = {
1579                         value = "$dns_ctime$"
1580                         description = "Return critical if elapsed time exceeds value."
1581                 }
1582                 "-t" = {
1583                         value = "$dns_timeout$"
1584                         description = "Seconds before connection times out. Defaults to 10."
1585                 }
1586         }
1587
1588         vars.dns_lookup = "$host.name$"
1589         vars.dns_query_type = "A"
1590         vars.dns_timeout = 10
1591 }
1592
1593 object CheckCommand "dig" {
1594         import "ipv4-or-ipv6"
1595
1596         command = [ PluginDir + "/check_dig" ]
1597
1598         arguments = {
1599                 "-H" = "$dig_server$"
1600                 "-p" = "$dig_port$"
1601                 "-l" = {
1602                         value = "$dig_lookup$"
1603                         required = true
1604                 }
1605                 "-T" = "$dig_record_type$"
1606                 "-a" = "$dig_expected_address$"
1607                 "-A" = "$dig_arguments$"
1608                 "-r" = "$dig_retries$"
1609                 "-w" = "$dig_warning$"
1610                 "-c" = "$dig_critical$"
1611                 "-t" = "$dig_timeout$"
1612                 "-4" = {
1613                         set_if = "$dig_ipv4$"
1614                         description = "Force dig to only use IPv4 query transport"
1615                 }
1616                 "-6" = {
1617                         set_if = "$dig_ipv6$"
1618                         description = "Force dig to only use IPv6 query transport"
1619                 }
1620         }
1621
1622         vars.dig_server = "$check_address$"
1623         vars.check_ipv4 = "$dig_ipv4$"
1624         vars.check_ipv6 = "$dig_ipv6$"
1625 }
1626
1627 object CheckCommand "nscp" {
1628         import "ipv4-or-ipv6"
1629
1630         command = [ PluginDir + "/check_nt" ]
1631
1632         arguments = {
1633                 "-H" = "$nscp_address$"
1634                 "-p" = "$nscp_port$"
1635                 "-s" = "$nscp_password$"
1636                 "-v" = {
1637                         value = "$nscp_variable$"
1638                         required = true
1639                 }
1640                 "-l" = {
1641                         value = "$nscp_params$"
1642                         repeat_key = false
1643                 }
1644                 "-w" = "$nscp_warn$"
1645                 "-c" = "$nscp_crit$"
1646                 "-t" = "$nscp_timeout$"
1647                 "-d" = {
1648                         value = "SHOWALL"
1649                         description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
1650                         set_if = "$nscp_showall$"
1651                 }
1652         }
1653
1654         vars.nscp_address = "$check_address$"
1655         vars.nscp_port = 12489
1656         vars.nscp_showall = false
1657 }
1658
1659 object CheckCommand "by_ssh" {
1660         import "ipv4-or-ipv6"
1661
1662         command = [ PluginDir + "/check_by_ssh" ]
1663
1664         arguments = {
1665                 "-H" = "$by_ssh_address$"
1666                 "-p" = "$by_ssh_port$"
1667                 "-C" = {{
1668                         var command = macro("$by_ssh_command$")
1669                         var arguments = macro("$by_ssh_arguments$")
1670
1671                         if (typeof(command) == String && !arguments) {
1672                                 return command
1673                         }
1674
1675                         var escaped_args = []
1676                         for (arg in resolve_arguments(command, arguments)) {
1677                                 escaped_args.add(escape_shell_arg(arg))
1678                         }
1679                         return escaped_args.join(" ")
1680                 }}
1681                 "-l" = "$by_ssh_logname$"
1682                 "-i" = "$by_ssh_identity$"
1683                 "-q" = {
1684                         set_if = "$by_ssh_quiet$"
1685                 }
1686                 "-w" = "$by_ssh_warn$"
1687                 "-c" = "$by_ssh_crit$"
1688                 "-t" = "$by_ssh_timeout$"
1689                 "-o" = {
1690                         value = "$by_ssh_options$"
1691                         description = "Provide ssh options (may be repeated)"
1692                 }
1693                 "-4" = {
1694                         set_if = "$by_ssh_ipv4$"
1695                         description = "Use IPv4 only"
1696                 }
1697                 "-6" = {
1698                         set_if = "$by_ssh_ipv6$"
1699                         description = "Use IPv6 only"
1700                 }
1701         }
1702
1703         vars.by_ssh_address = "$check_address$"
1704         vars.by_ssh_quiet = false
1705         vars.check_ipv4 = "$by_ssh_ipv4$"
1706         vars.check_ipv6 = "$by_ssh_ipv6$"
1707 }
1708
1709 object CheckCommand "ups" {
1710         import "ipv4-or-ipv6"
1711
1712         command = [ PluginDir + "/check_ups" ]
1713
1714         arguments = {
1715                 "-H" = {
1716                         value = "$ups_address$"
1717                         description = "Address of the upsd server"
1718                         required = true
1719                 }
1720                 "-u" = {
1721                         value = "$ups_name$"
1722                         description = "Name of the UPS to monitor"
1723                         required = true
1724                 }
1725                 "-p" = {
1726                         value = "$ups_port$"
1727                         description = "Port number (default: 3493)"
1728                 }
1729                 "-v" = {
1730                         value = "$ups_variable$"
1731                         description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
1732                 }
1733                 "-w" = {
1734                         value = "$ups_warning$"
1735                         description = "Warning threshold for the selected variable"
1736                 }
1737                 "-c" = {
1738                         value = "$ups_critical$"
1739                         description = "Critical threshold for the selected variable"
1740                 }
1741                 "-T" = {
1742                         set_if = "$ups_celsius$"
1743                         description = "Display temperature in degrees Celsius instead of Fahrenheit"
1744                 }
1745                 "-t" = {
1746                         value = "$ups_timeout$"
1747                         description = "Seconds before the connection times out (default: 10)"
1748                 }
1749         }
1750
1751         vars.ups_address = "$check_address$"
1752         vars.ups_name = "ups"
1753 }
1754
1755 object CheckCommand "nrpe" {
1756         import "ipv4-or-ipv6"
1757
1758         command = [ PluginDir + "/check_nrpe" ]
1759
1760         arguments = {
1761                 "-H" = "$nrpe_address$"
1762                 "-p" = "$nrpe_port$"
1763                 "-c" = "$nrpe_command$"
1764                 "-n" = {
1765                         set_if = "$nrpe_no_ssl$"
1766                         description = "Do not use SSL."
1767                 }
1768                 "-u" = {
1769                         set_if = "$nrpe_timeout_unknown$"
1770                         description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
1771                 }
1772                 "-t" = "$nrpe_timeout$"
1773                 "-a" = {
1774                         value = "$nrpe_arguments$"
1775                         repeat_key = false
1776                         order = 1
1777                 }
1778                 "-4" = {
1779                         set_if = "$nrpe_ipv4$"
1780                         description = "Use IPv4 connection"
1781                 }
1782                 "-6" = {
1783                         set_if = "$nrpe_ipv6$"
1784                         description = "Use IPv6 connection"
1785                 }
1786                 "-2" = {
1787                         set_if = "$nrpe_version_2$"
1788                         description = "Use this if you want to connect to NRPE v2"
1789                 }
1790         }
1791
1792         vars.nrpe_address = "$check_address$"
1793         vars.nrpe_no_ssl = false
1794         vars.nrpe_timeout_unknown = false
1795         vars.check_ipv4 = "$nrpe_ipv4$"
1796         vars.check_ipv6 = "$nrpe_ipv6$"
1797         vars.nrpe_version_2 = false
1798         timeout = 5m
1799 }
1800
1801 object CheckCommand "hpjd" {
1802         import "ipv4-or-ipv6"
1803
1804         command = [ PluginDir + "/check_hpjd" ]
1805
1806         arguments = {
1807                 "-H" = "$hpjd_address$"
1808                 "-C" = "$hpjd_community$"
1809                 "-p" = "$hpjd_port$"
1810         }
1811
1812         vars.hpjd_address = "$check_address$"
1813 }
1814
1815 object CheckCommand "icmp" {
1816         command = [ PluginDir + "/check_icmp" ]
1817
1818         arguments = {
1819                 "-H" = {
1820                         value = "$icmp_address$"
1821                         repeat_key = false
1822                         order = 1
1823                 }
1824                 "-w" = "$icmp_wrta$,$icmp_wpl$%"
1825                 "-c" = "$icmp_crta$,$icmp_cpl$%"
1826                 "-s" = "$icmp_source$"
1827                 "-n" = "$icmp_packets$"
1828                 "-i" = "$icmp_packet_interval$"
1829                 "-I" = "$icmp_target_interval$"
1830                 "-m" = "$icmp_hosts_alive$"
1831                 "-b" = "$icmp_data_bytes$"
1832                 "-t" = "$icmp_timeout$"
1833                 "-l" = "$icmp_ttl$"
1834         }
1835
1836         vars.icmp_address = "$address$"
1837         vars.icmp_wrta = 100
1838         vars.icmp_wpl = 5
1839         vars.icmp_crta = 200
1840         vars.icmp_cpl = 15
1841 }
1842
1843 object CheckCommand "ldap" {
1844         import "ipv4-or-ipv6"
1845
1846         command = [ PluginDir + "/check_ldap" ]
1847
1848         arguments = {
1849                 "-H" = {
1850                         value = "$ldap_address$"
1851                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1852                 }
1853                 "-p" = {
1854                         value = "$ldap_port$"
1855                         description = "Port number (default: 389)"
1856                 }
1857                 "-a" = {
1858                         value = "$ldap_attr$"
1859                         description = "ldap attribute to search (default: \"(objectclass=*)\""
1860                 }
1861                 "-b" = {
1862                         value = "$ldap_base$"
1863                         required = true
1864                         description = "ldap base (eg. ou=my unit, o=my org, c=at"
1865                 }
1866                 "-D" = {
1867                         value = "$ldap_bind$"
1868                         description = "ldap bind DN (if required)"
1869                 }
1870                 "-P" = {
1871                         value = "$ldap_pass$"
1872                         description = "ldap password (if required)"
1873                 }
1874                 "-T" = {
1875                         set_if = "$ldap_starttls$"
1876                         description = "use starttls mechanism introduced in protocol version 3"
1877                 }
1878                 "-S" = {
1879                         set_if = "$ldap_ssl$"
1880                         description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
1881                 }
1882                 "-2" = {
1883                         set_if = "$ldap_v2$"
1884                         description = "Use LDAP protocol version 2"
1885                 }
1886                 "-3" = {
1887                         set_if = "$ldap_v3$"
1888                         description = "Use LDAP protocol version 3"
1889                 }
1890                 "-w" = {
1891                         value = "$ldap_warning$"
1892                         description = "Response time to result in warning status (seconds)"
1893                 }
1894                 "-c" = {
1895                         value = "$ldap_critical$"
1896                         description = "Response time to result in critical status (seconds)"
1897                 }
1898                 "-W" = {
1899                         value = "$ldap_warning_entries$"
1900                         description = "Number of found entries to result in warning status (optional)"
1901                 }
1902                 "-C" = {
1903                         value = "$ldap_critical_entries$"
1904                         description = "Number of found entries to result in critical status (optional)"
1905                 }
1906                 "-t" = {
1907                         value = "$ldap_timeout$"
1908                         description = "Seconds before connection times out (default: 10)"
1909                 }
1910                 "-v" = {
1911                         set_if = "$ldap_verbose$"
1912                         description = "Show details for command-line debugging"
1913                 }
1914         }
1915
1916         vars.ldap_address = "$check_address$"
1917         vars.ldap_v2 = true
1918         vars.ldap_v3 = false
1919         vars.ldap_timeout = 10s
1920         vars.ldap_verbose = false
1921 }
1922
1923 object CheckCommand "clamd" {
1924         command = [ PluginDir + "/check_clamd" ]
1925
1926         arguments = {
1927                 "-H" = {
1928                         value = "$clamd_address$"
1929                         description = "The host's address or unix socket (must be an absolute path)."
1930                         required = true
1931                 }
1932                 "-p" = {
1933                         value = "$clamd_port$"
1934                         description = "Port number (default: none)."
1935                 }
1936                 "-e" = {
1937                         value = "$clamd_expect$"
1938                         description = "String to expect in server response (may be repeated)."
1939                         repeat_key = true
1940                 }
1941                 "-A" = {
1942                         set_if = "$clamd_all$"
1943                         description = "All expect strings need to occur in server response. Default is any."
1944                 }
1945                 "-E_send" = {
1946                         key = "-E"
1947                         order = 1
1948                         set_if = "$clamd_escape_send$"
1949                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
1950                 }
1951                 "-s" = {
1952                         order = 2
1953                         value = "$clamd_send$"
1954                         description = "String to send to the server."
1955                 }
1956                 "-E_quit" = {
1957                         key = "-E"
1958                         order = 3
1959                         set_if = "$clamd_escape_quit$"
1960                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
1961                 }
1962                 "-q" = {
1963                         order = 4
1964                         value = "$clamd_quit$"
1965                         description = "String to send server to initiate a clean close of the connection."
1966                 }
1967                 "-r" = {
1968                         value = "$clamd_refuse$"
1969                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
1970                 }
1971                 "-M" = {
1972                         value = "$clamd_mismatch$"
1973                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
1974                 }
1975                 "-j" = {
1976                         set_if = "$clamd_jail$"
1977                         description = "Hide output from TCP socket."
1978                 }
1979                 "-m" = {
1980                         value = "$clamd_maxbytes$"
1981                         description = "Close connection once more than this number of bytes are received."
1982                 }
1983                 "-d" = {
1984                         value = "$clamd_delay$"
1985                         description = "Seconds to wait between sending string and polling for response."
1986                 }
1987                 "-D" = {
1988                         value = "$clamd_certificate$"
1989                         description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
1990                 }
1991                 "-S" = {
1992                         set_if = "$clamd_ssl$"
1993                         description = "Use SSL for the connection."
1994                 }
1995                 "-w" = {
1996                         value = "$clamd_wtime$"
1997                         description = "Response time to result in warning status (seconds)."
1998                 }
1999                 "-c" = {
2000                         value = "$clamd_ctime$"
2001                         description = "Response time to result in critical status (seconds)."
2002                 }
2003                 "-t" = {
2004                         value = "$clamd_timeout$"
2005                         description = "Seconds before connection times out. Defaults to 10."
2006                 }
2007                 "-4" = {
2008                         set_if = "$clamd_ipv4$"
2009                         description = "Use IPv4 only"
2010                 }
2011                 "-6" = {
2012                         set_if = "$clamd_ipv6$"
2013                         description = "Use IPv6 only"
2014                 }
2015         }
2016
2017         vars.clamd_ssl = false
2018         vars.clamd_refuse = "crit"
2019         vars.clamd_mismatch = "warn"
2020         vars.clamd_timeout = 10
2021         vars.check_ipv4 = "$clamd_ipv4$"
2022         vars.check_ipv6 = "$clamd_ipv6$"
2023 }
2024
2025 object CheckCommand "mailq" {
2026         command = [ PluginDir + "/check_mailq" ]
2027
2028         arguments = {
2029                 "-w" = {
2030                         value = "$mailq_warning$"
2031                         description = "Min. number of messages in queue to generate warning"
2032                         required = true
2033                 }
2034                 "-c" = {
2035                         value = "$mailq_critical$"
2036                         description = "Min. number of messages in queue to generate critical alert ( w < c )"
2037                         required = true
2038                 }
2039                 "-W" = {
2040                         value = "$mailq_domain_warning$"
2041                         description = "Min. number of messages for same domain in queue to generate warning"
2042                 }
2043                 "-C" = {
2044                         value = "$mailq_domain_critical$"
2045                         description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2046                 }
2047                 "-t" = {
2048                         value = "$mailq_timeout$"
2049                         description = "Plugin timeout in seconds (default = 15)"
2050                 }
2051                 "-M" = {
2052                         value = "$mailq_servertype$"
2053                         description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2054                 }
2055                 "-s" = {
2056                         set_if = "$mailq_sudo$"
2057                         description = "Use sudo for mailq command"
2058                 }
2059         }
2060 }
2061
2062 object CheckCommand "pgsql" {
2063         import "ipv4-or-ipv6"
2064
2065         command = [ PluginDir + "/check_pgsql" ]
2066
2067         arguments = {
2068                 "-H" = "$pgsql_hostname$"
2069                 "-P" = "$pgsql_port$"
2070                 "-d" = "$pgsql_database$"
2071                 "-l" = "$pgsql_username$"
2072                 "-p" = "$pgsql_password$"
2073                 "-o" = "$pgsql_options$"
2074                 "-w" = "$pgsql_warning$"
2075                 "-c" = "$pgsql_critical$"
2076                 "-t" = "$pgsql_timeout$"
2077                 "-q" = "$pgsql_query$"
2078                 "-W" = "$pgsql_query_warning$"
2079                 "-C" = "$pgsql_query_critical$"
2080         }
2081
2082         vars.pgsql_hostname = "$check_address$"
2083 }
2084
2085 object CheckCommand "mysql" {
2086         import "ipv4-or-ipv6"
2087
2088         command = [ PluginDir + "/check_mysql" ]
2089
2090         arguments = {
2091                 "-H" = "$mysql_hostname$"
2092                 "-P" = "$mysql_port$"
2093                 "-n" = {
2094                         set_if = "$mysql_ignore_auth$"
2095                 }
2096                 "-s" = "$mysql_socket$"
2097                 "-d" = "$mysql_database$"
2098                 "-f" = "$mysql_file$"
2099                 "-g" = "$mysql_group$"
2100                 "-u" = "$mysql_username$"
2101                 "-p" = "$mysql_password$"
2102                 "-S" = {
2103                         set_if = "$mysql_check_slave$"
2104                 }
2105                 "-w" = "$mysql_warning$"
2106                 "-c" = "$mysql_critical$"
2107                 "-l" = {
2108                         set_if = "$mysql_ssl$"
2109                 }
2110                 "-C" = "$mysql_cacert$"
2111                 "-a" = "$mysql_cert$"
2112                 "-k" = "$mysql_key$"
2113                 "-D" = "$mysql_cadir$"
2114                 "-L" = "$mysql_ciphers$"
2115         }
2116
2117         vars.mysql_hostname = "$check_address$"
2118 }
2119
2120 object CheckCommand "negate" {
2121         command = [ PluginDir + "/negate" ]
2122
2123         arguments = {
2124                 "-t" = "$negate_timeout$"
2125                 "-T" = "$negate_timeout_result$"
2126                 "-o" = "$negate_ok$"
2127                 "-w" = "$negate_warning$"
2128                 "-c" = "$negate_critical$"
2129                 "-s" = {
2130                         set_if = "$negate_substitute$"
2131                 }
2132                 "--wrapped-plugin" = {
2133                         value = {{
2134                                 var command = macro("$negate_command$")
2135                                 var arguments = macro("$negate_arguments$")
2136
2137                                 if (typeof(command) == String && !arguments) {
2138                                         return command
2139                                 }
2140
2141                                 var escaped_args = []
2142                                 for (arg in resolve_arguments(command, arguments)) {
2143                                         escaped_args.add(arg)
2144                                 }
2145                                 return escaped_args.join(" ")
2146                         }}
2147                         skip_key = true
2148                         order = 1
2149                 }
2150         }
2151
2152         vars.negate_timeout_result = "UNKNOWN"
2153 }
2154
2155 object CheckCommand "file_age" {
2156         command = [ PluginDir + "/check_file_age" ]
2157
2158         arguments = {
2159                 "-w" = {
2160                         value = "$file_age_warning_time$"
2161                         description = "File must be no more than this many seconds old (default: 240s)"
2162                 }
2163                 "-c" = {
2164                         value = "$file_age_critical_time$"
2165                         description = "File must be no more than this many seconds old (default: 600s)"
2166                 }
2167                 "-W" = {
2168                         value = "$file_age_warning_size$"
2169                         description = "File must be at least this many bytes long"
2170                 }
2171                 "-C" = {
2172                         value = "$file_age_critical_size$"
2173                         description = "File must be at least this many bytes long (default: 0B)"
2174                 }
2175                 "-i" = {
2176                         set_if = "$file_age_ignoremissing$"
2177                         description = "return OK if the file does not exist"
2178                 }
2179                 "-f" = {
2180                         value = "$file_age_file$"
2181                         description = "File to monitor"
2182                 }
2183         }
2184
2185         vars.file_age_ignoremissing = false
2186 }
2187
2188 object CheckCommand "smart" {
2189         command = [ PluginDir + "/check_ide_smart" ]
2190
2191         arguments = {
2192                 "-d" = {
2193                         value = "$smart_device$"
2194                         description = "Name of a local hard drive to monitor"
2195                         required = true
2196                 }
2197         }
2198 }
2199
2200 object CheckCommand "breeze" {
2201         import "ipv4-or-ipv6"
2202
2203         command = [ PluginDir + "/check_breeze" ]
2204
2205         arguments = {
2206                 "-H" = {
2207                         value = "$breeze_hostname$"
2208                         description = "Name or IP address of host to check"
2209                         required = true
2210                 }
2211                 "-C" = {
2212                         value = "$breeze_community$"
2213                         description = "SNMPv1 community (default public)"
2214                 }
2215                 "-w" = {
2216                         value = "$breeze_warning$"
2217                         description = "Percentage strength below which a WARNING status will result"
2218                         required = true
2219                 }
2220                 "-c" = {
2221                         value = "$breeze_critical$"
2222                         description = "Percentage strength below which a CRITICAL status will result"
2223                         required = true
2224                 }
2225         }
2226
2227         vars.breeze_hostname = "$check_address$"
2228         vars.breeze_warning = "50"
2229         vars.breeze_critical = "20"
2230 }
2231
2232 object CheckCommand "flexlm" {
2233         command = [ PluginDir + "/check_flexlm" ]
2234
2235         arguments = {
2236                 "-F" = {
2237                         value = "$flexlm_licensefile$"
2238                         description = "Name of license file (usually license.dat)"
2239                         required = true
2240                 }
2241                 "-t" = {
2242                         value = "$flexlm_timeout$"
2243                         description = "Plugin time out in seconds (default = 15)"
2244                 }
2245         }
2246 }
2247
2248 object CheckCommand "game" {
2249         import "ipv4-or-ipv6"
2250
2251         command = [ PluginDir + "/check_game" ]
2252
2253         arguments = {
2254                 "-P" = {
2255                         value = "$game_port$"
2256                         description = "Port to connect to"
2257                 }
2258                 "-t" = {
2259                         value = "$game_timeout$"
2260                         description = "Seconds before connection times out (default: 10)"
2261                 }
2262                 "-g" = {
2263                         value = "$game_gamefield$"
2264                         description = "Field number in raw qstat output that contains game name"
2265                 }
2266                 "-m" = {
2267                         value = "$game_mapfield$"
2268                         description = "Field number in raw qstat output that contains map name"
2269                 }
2270                 "-p" = {
2271                         value = "$game_pingfield$"
2272                         description = "Field number in raw qstat output that contains ping time"
2273                 }
2274                 "-G" = {
2275                         value = "$game_gametime$"
2276                         description = "Field number in raw qstat output that contains game time"
2277                 }
2278                 "-H" = {
2279                         value = "$game_hostname$"
2280                         description = "Name of the host running the game"
2281                 }
2282                 "game" = {
2283                         value = "$game_game$"
2284                         description = "Name of the game"
2285                         order = 1
2286                         skip_key = true
2287                 }
2288                 "ipaddress" = {
2289                         value = "$game_ipaddress$"
2290                         description = "Ipaddress of the game server to query"
2291                         order = 2
2292                         skip_key = true
2293                 }
2294         }
2295 }
2296
2297 object CheckCommand "mysql_query" {
2298         import "ipv4-or-ipv6"
2299
2300         command = [ PluginDir + "/check_mysql_query" ]
2301
2302         arguments = {
2303                 "-H" = "$mysql_query_hostname$"
2304                 "-P" = "$mysql_query_port$"
2305                 "-u" = "$mysql_query_username$"
2306                 "-p" = "$mysql_query_password$"
2307                 "-d" = "$mysql_query_database$"
2308                 "-f" = "$mysql_query_file$"
2309                 "-g" = "$mysql_query_group$"
2310                 "-q" = "$mysql_query_execute$"
2311                 "-w" = "$mysql_query_warning$"
2312                 "-c" = "$mysql_query_critical$"
2313         }
2314
2315         vars.mysql_query_hostname = "$check_address$"
2316 }
2317
2318 object CheckCommand "radius" {
2319         import "ipv4-or-ipv6"
2320
2321         command = [
2322                 PluginDir + "/check_radius",
2323         ]
2324
2325         arguments = {
2326                 "-H" = "$radius_address$",
2327                 "-F" = "$radius_config_file$",
2328                 "-u" = "$radius_username$",
2329                 "-p" = "$radius_password$",
2330                 "-P" = {
2331                         value = "$radius_port$",
2332                 },
2333                 "-n" = {
2334                         value = "$radius_nas_id$",
2335                         description = "NAS identifier"
2336                 }
2337                 "-N" = {
2338                         value = "$radius_nas_address$",
2339                         description = "NAS IP Address"
2340                 },
2341                 "-e" = {
2342                         value = "$radius_expect$",
2343                         description = "Response string to expect from the server"
2344                 },
2345                 "-r" = {
2346                         value = "$radius_retries$",
2347                         description = "Number of times to retry a failed connection"
2348                 },
2349                 "-t" = {
2350                         value = "$radius_timeout$",
2351                         description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
2352                 },
2353         }
2354
2355         vars.radius_address = "$check_address$"
2356 }