]> granicus.if.org Git - icinga2/blob - itl/command-plugins.conf
Merge pull request #6848 from BarbUk/feature/itl-check-fail2ban
[icinga2] / itl / command-plugins.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2018 Icinga Development Team (https://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" = {
41                         value = "$ping_address$"
42                         description = "host to ping"
43                 }
44                 "-w" = {
45                         value = "$ping_wrta$,$ping_wpl$%"
46                         description = "warning threshold pair"
47                 }
48                 "-c" = {
49                         value = "$ping_crta$,$ping_cpl$%"
50                         description = "critical threshold pair"
51                 }
52                 "-p" = {
53                         value = "$ping_packets$"
54                         description = "number of ICMP ECHO packets to send (Default: 5)"
55                 }
56                 "-t" = {
57                         value = "$ping_timeout$"
58                         description = "Seconds before connection times out (default: 10)"
59                 }
60         }
61
62         vars.ping_wrta = 100
63         vars.ping_wpl = 5
64         vars.ping_crta = 200
65         vars.ping_cpl = 15
66 }
67
68 object CheckCommand "ping" {
69         import "ping-common"
70         import "ipv4-or-ipv6"
71
72         vars.ping_address = "$check_address$"
73 }
74
75 object CheckCommand "ping4" {
76         import "ping-common"
77
78         command += [ "-4" ]
79
80         vars.ping_address = "$address$"
81 }
82
83 object CheckCommand "ping6" {
84         import "ping-common"
85
86         command += [ "-6" ]
87
88         vars.ping_address = "$address6$"
89 }
90
91 template CheckCommand "hostalive-common" {
92         vars.ping_wrta = 3000.0
93         vars.ping_wpl = 80
94
95         vars.ping_crta = 5000.0
96         vars.ping_cpl = 100
97 }
98
99 object CheckCommand "hostalive" {
100         import "ping"
101         import "hostalive-common"
102 }
103
104 object CheckCommand "hostalive4" {
105         import "ping4"
106         import "hostalive-common"
107 }
108
109 object CheckCommand "hostalive6" {
110         import "ping6"
111         import "hostalive-common"
112 }
113
114 template CheckCommand "fping-common" {
115         command = [
116                 PluginDir + "/check_fping",
117                 "$fping_address$"
118         ]
119
120         arguments = {
121                 "-w" = {
122                         value = "$fping_wrta$,$fping_wpl$%"
123                         description = "warning threshold pair"
124                 }
125                 "-c" = {
126                         value = "$fping_crta$,$fping_cpl$%"
127                         description = "critical threshold pair"
128                 }
129                 "-n" = {
130                         value = "$fping_number$"
131                         description = "number of ICMP packets to send (default: 1)"
132                 }
133                 "-i" = {
134                         value = "$fping_interval$"
135                         description = "Interval (ms) between sending packets (default: fping's default for -p)"
136                 }
137                 "-b" = {
138                         value = "$fping_bytes$"
139                         description = "size of ICMP packet (default: 56)"
140                 }
141                 "-T" = {
142                         value = "$fping_target_timeout$"
143                         description = "Target timeout (ms) (default: fping's default for -t)"
144                 }
145                 "-S" = {
146                         value = "$fping_source_ip$"
147                         description = "name or IP Address of sourceip"
148                 }
149                 "-I" = {
150                         value = "$fping_source_interface$"
151                         description = "source interface name"
152                 }
153         }
154
155         vars.fping_wrta = 100
156         vars.fping_wpl = 5
157         vars.fping_crta = 200
158         vars.fping_cpl = 15
159         vars.fping_number = 5
160         vars.fping_interval = 500
161 }
162
163 object CheckCommand "fping4" {
164         import "fping-common"
165
166         command += [ "-4" ]
167
168         vars.fping_address = "$address$"
169 }
170
171 object CheckCommand "fping6" {
172         import "fping-common"
173
174         command += [ "-6" ]
175
176         vars.fping_address = "$address6$"
177 }
178
179 object CheckCommand "tcp" {
180         import "ipv4-or-ipv6"
181
182         command = [ PluginDir + "/check_tcp" ]
183
184         arguments = {
185                 "-H" = {
186                         value =  "$tcp_address$"
187                         description = "Host name, IP Address, or unix socket (must be an absolute path)."
188                 }
189                 "-p" = {
190                         value =  "$tcp_port$"
191                         description = "The TCP port number."
192                 }
193                 "-e" = {
194                         value = "$tcp_expect$"
195                         description = "String to expect in server response (may be repeated)."
196                 }
197                 "-A" = {
198                         set_if = "$tcp_all$"
199                         description = "All expect strings need to occur in server response. Defaults to false."
200                 }
201                 "-E_send" = {
202                         key = "-E"
203                         order = 1
204                         set_if = "$tcp_escape_send$"
205                         description = "Enable usage of \n, \r, \t or \\ in send string."
206                 }
207                 "-s" = {
208                         order = 2
209                         value = "$tcp_send$"
210                         description = "String to send to the server."
211                 }
212                 "-E_quit" = {
213                         key = "-E"
214                         order = 3
215                         set_if = "$tcp_escape_quit$"
216                         description = "Enable usage of \n, \r, \t or \\ in quit string."
217                 }
218                 "-q" = {
219                         order = 4
220                         value = "$tcp_quit$"
221                         description = "String to send server to initiate a clean close of the connection."
222                 }
223                 "-r" = {
224                         value = "$tcp_refuse$"
225                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
226                 }
227                 "-M" = {
228                         value = "$tcp_mismatch$"
229                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
230                 }
231                 "-j" = {
232                         set_if = "$tcp_jail$"
233                         description = "Hide output from TCP socket."
234                 }
235                 "-m" = {
236                         value = "$tcp_maxbytes$"
237                         description = "Close connection once more than this number of bytes are received."
238                 }
239                 "-d" = {
240                         value = "$tcp_delay$"
241                         description = "Seconds to wait between sending string and polling for response."
242                 }
243                 "-D" = {
244                         value = "$tcp_certificate$"
245                         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."
246                 }
247                 "-S" = {
248                         set_if = "$tcp_ssl$"
249                         description = "Use SSL for the connection."
250                 }
251                 "-w" = {
252                         value = "$tcp_wtime$"
253                         description = "Response time to result in warning status (seconds)."
254                 }
255                 "-c" = {
256                         value = "$tcp_ctime$"
257                         description = "Response time to result in critical status (seconds)."
258                 }
259                 "-t" = {
260                         value = "$tcp_timeout$"
261                         description = "Seconds before connection times out. Defaults to 10."
262                 }
263                 "-4" = {
264                         set_if = "$tcp_ipv4$"
265                         description = "Use IPv4 connection"
266                 }
267                 "-6" = {
268                         set_if = "$tcp_ipv6$"
269                         description = "Use IPv6 connection"
270                 }
271         }
272
273         vars.tcp_address = "$check_address$"
274         vars.tcp_all = false
275         vars.tcp_refuse = "crit"
276         vars.tcp_mismatch = "warn"
277         vars.tcp_timeout = 10
278         vars.check_ipv4 = "$tcp_ipv4$"
279         vars.check_ipv6 = "$tcp_ipv6$"
280 }
281
282 object CheckCommand "ssl" {
283         import "ipv4-or-ipv6"
284
285         command = [ PluginDir + "/check_tcp" ]
286
287         arguments = {
288                 "-H" = {
289                         value = "$ssl_address$"
290                         description = "Host address"
291                 }
292                 "-p" = {
293                         value = "$ssl_port$"
294                         description ="TCP port (default: 443)"
295                 }
296                 "--ssl" = {
297                         description = "Use SSL for the connection"
298                 }
299                 "-t" = {
300                         value = "$ssl_timeout$"
301                         description = "Seconds before connection times out (default: 10)"
302                 }
303                 "-D" = {{
304                         var days_warn = macro("$ssl_cert_valid_days_warn$")
305                         var days_critical = macro("$ssl_cert_valid_days_critical$")
306                         if (days_warn) {
307                                 if (days_critical) {
308                                         return days_warn + "," + days_critical
309                                 } else {
310                                         return days_warn
311                                 }
312                         }
313                 }}
314                 "-N" = {
315                         value = "$ssl_sni$"
316                         description = "Enable SSL/TLS hostname extension support (SNI)"
317                 }
318         }
319
320         vars.ssl_address = "$check_address$"
321         vars.ssl_port = 443
322         vars.ssl_cert_valid_days_warn = false
323         vars.ssl_cert_valid_days_critical = false
324 }
325
326
327 object CheckCommand "udp" {
328         import "ipv4-or-ipv6"
329
330         command = [
331                 PluginDir + "/check_udp",
332                 "-H", "$udp_address$",
333                 "-p", "$udp_port$"
334         ]
335
336         arguments = {
337                 "-s" = {
338                         value = "$udp_send$"
339                         required = true
340                         description = "String to send to the server"
341                 }
342                 "-e" = {
343                         value = "$udp_expect$"
344                         required = true
345                         description = " String to expect in server response"
346                 }
347                 "-q" = {
348                         value = "$udp_quit$"
349                         description = "String to send server to initiate a clean close of the connection"
350                 }
351                 "-4" = {
352                         set_if = "$udp_ipv4$"
353                         description = "Use IPv4 connection"
354                 }
355                 "-6" = {
356                         set_if = "$udp_ipv6$"
357                         description = "Use IPv6 connection"
358                 }
359         }
360
361         vars.udp_address = "$check_address$"
362         vars.check_ipv4 = "$udp_ipv4$"
363         vars.check_ipv6 = "$udp_ipv6$"
364 }
365
366 object CheckCommand "http" {
367         import "ipv4-or-ipv6"
368
369         command = [ PluginDir + "/check_http" ]
370
371         arguments = {
372                 "-H" = {
373                         value = "$http_vhost$"
374                         description = "Host name argument for servers using host headers (virtual host)"
375                 }
376                 "-I" = {
377                         value = "$http_address$"
378                         description = "IP address or name (use numeric address if possible to bypass DNS lookup)"
379                 }
380                 "-u" = {
381                         value = "$http_uri$"
382                         description = "URL to GET or POST (default: /)"
383                 }
384                 "-p" = {
385                         value = "$http_port$"
386                         description = "Port number (default: 80)"
387                 }
388                 "-S" = {
389                         set_if = "$http_ssl$"
390                         description = "Connect via SSL"
391                 }
392                 "-S1" = {
393                         set_if = "$http_ssl_force_tlsv1$"
394                         description = "Connect via SSL version TLSv1"
395                 }
396                 "-S1.1" = {
397                         set_if = "$http_ssl_force_tlsv1_1$"
398                         description = "Connect via SSL version TLSv1.1"
399                 }
400                 "-S1.2" = {
401                         set_if = "$http_ssl_force_tlsv1_2$"
402                         description = "Connect via SSL version TLSv1.2"
403                 }
404                 "-S2" = {
405                         set_if = "$http_ssl_force_sslv2$"
406                         description = "Connect via SSL version SSLv2"
407                 }
408                 "-S3" = {
409                         set_if = "$http_ssl_force_sslv3$"
410                         description = "Connect via SSL version SSLv3"
411                 }
412                 "-S1+" = {
413                         set_if = "$http_ssl_force_tlsv1_or_higher$"
414                         description = "Connect via SSL version TLSv1 and newer"
415                 }
416                 "-S1.1+" = {
417                         set_if = "$http_ssl_force_tlsv1_1_or_higher$"
418                         description = "Connect via SSL version TLSv1.1 and newer"
419                 }
420                 "-S1.2+" = {
421                         set_if = "$http_ssl_force_tlsv1_2_or_higher$"
422                         description = "Connect via SSL version TLSv1.2 and newer"
423                 }
424                 "-S2+" = {
425                         set_if = "$http_ssl_force_sslv2_or_higher$"
426                         description = "Connect via SSL version SSLv2 and newer"
427                 }
428                 "-S3+" = {
429                         set_if = "$http_ssl_force_sslv3_or_higher$"
430                         description = "Connect via SSL version SSLv3 and newer"
431                 }
432                 "--sni" = {
433                         set_if = "$http_sni$"
434                         description = "Enable SSL/TLS hostname extension support (SNI)"
435                 }
436                 "-C" = {
437                         value = "$http_certificate$"
438                         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."
439                 }
440                 "-J" = {
441                         value = "$http_clientcert$"
442                         description = "Name of file contains the client certificate (PEM format)"
443                 }
444                 "-K" = {
445                         value = "$http_privatekey$"
446                         description = "Name of file contains the private key (PEM format)"
447                 }
448                 "-a" = {
449                         value = "$http_auth_pair$"
450                         description = "Username:password on sites with basic authentication"
451                 }
452                 "--no-body" = {
453                         set_if = "$http_ignore_body$"
454                         description = "Don't wait for document body: stop reading after headers"
455                 }
456                 "-w" = {
457                         value = "$http_warn_time$"
458                         description = "Response time to result in warning status (seconds)"
459                 }
460                 "-c" = {
461                         value = "$http_critical_time$"
462                         description = "Response time to result in critical status (seconds)"
463                 }
464                 "-e" = {
465                         value = "$http_expect$"
466                         description = "Comma-delimited list of strings, at least one of them is expected in the first (status) line of the server response (default: HTTP/1.)"
467                 }
468                 "-d" = {
469                         value = "$http_headerstring$"
470                         description = "String to expect in the response headers"
471                 }
472                 "-s" = {
473                         value = "$http_string$"
474                         description = "String to expect in the content"
475                 }
476                 "-P" = {
477                         value = "$http_post$"
478                         description = "URL encoded http POST data"
479                 }
480                 "-j" = {
481                         value = "$http_method$"
482                         description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
483                 }
484                 "-M" = {
485                         value = "$http_maxage$"
486                         description = "Warn if document is more than seconds old"
487                 }
488                 "-T" = {
489                         value = "$http_contenttype$"
490                         description = "Specify Content-Type header when POSTing"
491                 }
492                 "-l" = {
493                         set_if = "$http_linespan$"
494                         description = "Allow regex to span newline"
495                         order = 1
496                 }
497                 "-r" = {
498                         value = "$http_expect_body_regex$"
499                         description = "Search page for regex"
500                         order = 2
501                 }
502                 "-R" = {
503                         value = "$http_expect_body_eregi$"
504                         description = "Search page for case-insensitive regex"
505                         order = 2
506                 }
507                 "--invert-regex" = {
508                         set_if = "$http_invertregex$"
509                         description = "Return CRITICAL if found, OK if not"
510                 }
511                 "-b" = {
512                         value = "$http_proxy_auth_pair$"
513                         description = "Username:password on proxy-servers with basic authentication"
514                 }
515                 "-A" = {
516                         value = "$http_useragent$"
517                         description = "String to be sent in http header as User Agent"
518                 }
519                 "-k" = {
520                         value = "$http_header$"
521                         description = "Any other tags to be sent in http header"
522                 }
523                 "-E" = {
524                         set_if = "$http_extendedperfdata$"
525                         description = "Print additional perfdata"
526                 }
527                 "-f" = {
528                         value = "$http_onredirect$"
529                         description = "How to handle redirect pages"
530                 }
531                 "-m" = {
532                         value = "$http_pagesize$"
533                         description = "Minim page size required:Maximum page size required"
534                 }
535                 "-t" = {
536                         value = "$http_timeout$"
537                         description = "Seconds before connection times out"
538                 }
539                 "-4" = {
540                         set_if = "$http_ipv4$"
541                         description = "Use IPv4 connection"
542                 }
543                 "-6" = {
544                         set_if = "$http_ipv6$"
545                         description = "Use IPv6 connection"
546                 }
547                 "-L" = {
548                         set_if = "$http_link$"
549                         description = "Wrap output in HTML link"
550                 }
551                 "-v" = {
552                         set_if = "$http_verbose$"
553                         description = "Show details for command-line debugging"
554                 }
555         }
556
557         vars.http_address = "$check_address$"
558         vars.http_ssl = false
559         vars.http_sni = false
560         vars.http_linespan = false
561         vars.http_invertregex = false
562         vars.check_ipv4 = "$http_ipv4$"
563         vars.check_ipv6 = "$http_ipv6$"
564         vars.http_link = false
565         vars.http_verbose = false
566 }
567
568 object CheckCommand "ftp" {
569         import "ipv4-or-ipv6"
570
571         command = [ PluginDir + "/check_ftp" ]
572
573         arguments = {
574                 "-H" = {
575                         value = "$ftp_address$"
576                         description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
577                 }
578                 "-p" = {
579                         value = "$ftp_port$"
580                         description = "The FTP port number. Defaults to none"
581                 }
582                 "-e" = {
583                         value = "$ftp_expect$"
584                         description = "String to expect in server response (may be repeated)."
585                 }
586                 "-A" = {
587                         set_if = "$ftp_all$"
588                         description = "All expect strings need to occur in server response. Default is any."
589                 }
590                 "-E_send" = {
591                         key = "-E"
592                         order = 1
593                         set_if = "$ftp_escape_send$"
594                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
595                 }
596                 "-s" = {
597                         order = 2
598                         value = "$ftp_send$"
599                         description = "String to send to the server."
600                 }
601                 "-E_quit" = {
602                         key = "-E"
603                         order = 3
604                         set_if = "$ftp_escape_quit$"
605                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
606                 }
607                 "-q" = {
608                         order = 4
609                         value = "$ftp_quit$"
610                         description = "String to send server to initiate a clean close of the connection."
611                 }
612                 "-r" = {
613                         value = "$ftp_refuse$"
614                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
615                 }
616                 "-M" = {
617                         value = "$ftp_mismatch$"
618                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
619                 }
620                 "-j" = {
621                         set_if = "$ftp_jail$"
622                         description = "Hide output from TCP socket."
623                 }
624                 "-m" = {
625                         value = "$ftp_maxbytes$"
626                         description = "Close connection once more than this number of bytes are received."
627                 }
628                 "-d" = {
629                         value = "$ftp_delay$"
630                         description = "Seconds to wait between sending string and polling for response."
631                 }
632                 "-D" = {
633                         value = "$ftp_certificate$"
634                         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."
635                 }
636                 "-S" = {
637                         set_if = "$ftp_ssl$"
638                         description = "Use SSL for the connection."
639                 }
640                 "-w" = {
641                         value = "$ftp_wtime$"
642                         description = "Response time to result in warning status (seconds)."
643                 }
644                 "-c" = {
645                         value = "$ftp_ctime$"
646                         description = "Response time to result in critical status (seconds)."
647                 }
648                 "-t" = {
649                         value = "$ftp_timeout$"
650                         description = "Seconds before connection times out. Defaults to 10."
651                 }
652                 "-4" = {
653                         set_if = "$ftp_ipv4$"
654                         description = "Use IPv4 connection"
655                 }
656                 "-6" = {
657                         set_if = "$ftp_ipv6$"
658                         description = "Use IPv6 connection"
659                 }
660         }
661
662         vars.ftp_address = "$check_address$"
663         vars.ftp_ssl = false
664         vars.ftp_refuse = "crit"
665         vars.ftp_mismatch = "warn"
666         vars.ftp_timeout = 10
667         vars.check_ipv4 = "$ftp_ipv4$"
668         vars.check_ipv6 = "$ftp_ipv6$"
669 }
670
671 object CheckCommand "smtp" {
672         import "ipv4-or-ipv6"
673
674         command = [ PluginDir + "/check_smtp" ]
675
676         arguments = {
677                 "-H" = {
678                         value = "$smtp_address$"
679                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
680                 }
681                 "-p" = {
682                         value = "$smtp_port$"
683                         description = "Port number (default: 25)"
684                 }
685                 "-f" = {
686                         value = "$smtp_mail_from$"
687                         description = "FROM-address to include in MAIL command, required by Exchange 2000"
688                 }
689                 "-e" = {
690                         value = "$smtp_expect$"
691                         description = "String to expect in first line of server response (default: '220')"
692                 }
693                 "-C" = {
694                         value = "$smtp_command$"
695                         description = "SMTP command"
696                 }
697                 "-R" = {
698                         value = "$smtp_response$"
699                         description = "Expected response to command (may be used repeatedly)"
700                 }
701                 "-F" = {
702                         value = "$smtp_helo_fqdn$"
703                         description = "FQDN used for HELO"
704                 }
705                 "-D" = {
706                         value = "$smtp_certificate_age$"
707                         description = "Minimum number of days a certificate has to be valid"
708                 }
709                 "-S" = {
710                         set_if = "$smtp_starttls$"
711                         description = "Use STARTTLS for the connection."
712                 }
713                 "-A" = {
714                         value = "$smtp_authtype$"
715                         description = "SMTP AUTH type to check (default none, only LOGIN supported)"
716                 }
717                 "-U" = {
718                         value = "$smtp_authuser$"
719                         description = "SMTP AUTH username"
720                 }
721                 "-P" = {
722                         value = "$smtp_authpass$"
723                         description = "SMTP AUTH password"
724                 }
725                 "-q" = {
726                         value = "$smtp_ignore_quit$"
727                         description = "Ignore failure when sending QUIT command to server"
728                 }
729                 "-w" = {
730                         value = "$smtp_warning$"
731                         description = "Response time to result in warning status (seconds)"
732                 }
733                 "-c" = {
734                         value = "$smtp_critical$"
735                         description = "Response time to result in critical status (seconds)"
736                 }
737                 "-t" = {
738                         value = "$smtp_timeout$"
739                         description = "Seconds before connection times out (default: 10)"
740                 }
741                 "-4" = {
742                         set_if = "$smtp_ipv4$"
743                         description = "Use IPv4 connection"
744                 }
745                 "-6" = {
746                         set_if = "$smtp_ipv6$"
747                         description = "Use IPv6 connection"
748                 }
749         }
750
751         vars.smtp_address = "$check_address$"
752         vars.check_ipv4 = "$smtp_ipv4$"
753         vars.check_ipv6 = "$smtp_ipv6$"
754 }
755
756 object CheckCommand "ssmtp" {
757         import "ipv4-or-ipv6"
758
759         command = [ PluginDir + "/check_ssmtp" ]
760
761         arguments = {
762                 "-H" = {
763                         value = "$ssmtp_address$"
764                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
765                 }
766                 "-p" = {
767                         value = "$ssmtp_port$"
768                         description = "Port number (default: none)"
769                 }
770                 "-E" = {
771                         value = "$ssmtp_escape$"
772                         description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
773                 }
774                 "-s" = {
775                         value = "$ssmtp_send$"
776                         description = "String to send to the server"
777                 }
778                 "-e" = {
779                         value = "$ssmtp_expect$"
780                         description = "String to expect in server response (may be repeated)"
781                 }
782                 "-A" = {
783                         set_if = "$ssmtp_all$"
784                         description = "All expect strings need to occur in server response. Default is any."
785                 }
786                 "-q" = {
787                         value = "$ssmtp_quit$"
788                         description = "String to send server to initiate a clean close of the connection"
789                 }
790                 "-r" = {
791                         value = "$ssmtp_refuse$"
792                         description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
793                 }
794                 "-M" = {
795                         value = "$ssmtp_mismatch$"
796                         description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
797                 }
798                 "-j" = {
799                         set_if = "$ssmtp_jail$"
800                         description = "Hide output from TCP socket."
801                 }
802                 "-m" = {
803                         value = "$ssmtp_maxbytes$"
804                         description = "Close connection once more than this number of bytes are received"
805                 }
806                 "-d" = {
807                         value = "$ssmtp_delay$"
808                         description = "Seconds to wait between sending string and polling for response"
809                 }
810                 "-D" = {
811                         value = "$ssmtp_certificate_age$"
812                         description = "Minimum number of days a certificate has to be valid"
813                 }
814                 "-S" = {
815                         set_if = "$ssmtp_ssl$"
816                         description = "Use SSL for the connection."
817                 }
818                 "-w" = {
819                         value = "$ssmtp_warning$"
820                         description = "Response time to result in warning status (seconds)"
821                 }
822                 "-c" = {
823                         value = "$ssmtp_critical$"
824                         description = "Response time to result in critical status (seconds)"
825                 }
826                 "-t" = {
827                         value = "$ssmtp_timeout$"
828                         description = "Seconds before connection times out (default: 10)"
829                 }
830                 "-4" = {
831                         set_if = "$ssmtp_ipv4$"
832                         description = "Use IPv4 connection"
833                 }
834                 "-6" = {
835                         set_if = "$ssmtp_ipv6$"
836                         description = "Use IPv6 connection"
837                 }
838         }
839
840         vars.ssmtp_address = "$check_address$"
841         vars.check_ipv4 = "$ssmtp_ipv4$"
842         vars.check_ipv6 = "$ssmtp_ipv6$"
843 }
844
845 object CheckCommand "imap" {
846         import "ipv4-or-ipv6"
847
848         command = [ PluginDir + "/check_imap" ]
849
850         arguments = {
851                 "-H" = {
852                         value = "$imap_address$"
853                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
854                 }
855                 "-p" = {
856                         value = "$imap_port$"
857                         description = "Port number (default: none)"
858                 }
859                 "-E" = {
860                         value = "$imap_escape$"
861                         description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
862                 }
863                 "-s" = {
864                         value = "$imap_send$"
865                         description = "String to send to the server"
866                 }
867                 "-e" = {
868                         value = "$imap_expect$"
869                         description = "String to expect in server response (may be repeated)"
870                 }
871                 "-A" = {
872                         set_if = "$imap_all$"
873                         description = "All expect strings need to occur in server response. Default is any."
874                 }
875                 "-q" = {
876                         value = "$imap_quit$"
877                         description = "String to send server to initiate a clean close of the connection"
878                 }
879                 "-r" = {
880                         value = "$imap_refuse$"
881                         description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
882                 }
883                 "-M" = {
884                         value = "$imap_mismatch$"
885                         description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
886                 }
887                 "-j" = {
888                         set_if = "$imap_jail$"
889                         description = "Hide output from TCP socket."
890                 }
891                 "-m" = {
892                         value = "$imap_maxbytes$"
893                         description = "Close connection once more than this number of bytes are received"
894                 }
895                 "-d" = {
896                         value = "$imap_delay$"
897                         description = "Seconds to wait between sending string and polling for response"
898                 }
899                 "-D" = {
900                         value = "$imap_certificate_age$"
901                         description = "Minimum number of days a certificate has to be valid"
902                 }
903                 "-S" = {
904                         set_if = "$imap_ssl$"
905                         description = "Use SSL for the connection."
906                 }
907                 "-w" = {
908                         value = "$imap_warning$"
909                         description = "Response time to result in warning status (seconds)"
910                 }
911                 "-c" = {
912                         value = "$imap_critical$"
913                         description = "Response time to result in critical status (seconds)"
914                 }
915                 "-t" = {
916                         value = "$imap_timeout$"
917                         description = "Seconds before connection times out (default: 10)"
918                 }
919                 "-4" = {
920                         set_if = "$imap_ipv4$"
921                         description = "Use IPv4 connection"
922                 }
923                 "-6" = {
924                         set_if = "$imap_ipv6$"
925                         description = "Use IPv6 connection"
926                 }
927         }
928
929         vars.imap_address = "$check_address$"
930         vars.check_ipv4 = "$imap_ipv4$"
931         vars.check_ipv6 = "$imap_ipv6$"
932 }
933
934 object CheckCommand "simap" {
935         import "ipv4-or-ipv6"
936
937         command = [ PluginDir + "/check_simap" ]
938
939         arguments = {
940                 "-H" = {
941                         value = "$simap_address$"
942                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
943                 }
944                 "-p" = {
945                         value = "$simap_port$"
946                         description = "Port number (default: none)"
947                 }
948                 "-E" = {
949                         value = "$simap_escape$"
950                         description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
951                 }
952                 "-s" = {
953                         value = "$simap_send$"
954                         description = "String to send to the server"
955                 }
956                 "-e" = {
957                         value = "$simap_expect$"
958                         description = "String to expect in server response (may be repeated)"
959                 }
960                 "-A" = {
961                         set_if = "$simap_all$"
962                         description = "All expect strings need to occur in server response. Default is any."
963                 }
964                 "-q" = {
965                         value = "$simap_quit$"
966                         description = "String to send server to initiate a clean close of the connection"
967                 }
968                 "-r" = {
969                         value = "$simap_refuse$"
970                         description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
971                 }
972                 "-M" = {
973                         value = "$simap_mismatch$"
974                         description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
975                         }
976                 "-j" = {
977                         set_if = "$simap_jail$"
978                         description = "Hide output from TCP socket."
979                 }
980                 "-m" = {
981                         value = "$simap_maxbytes$"
982                         description = "Close connection once more than this number of bytes are received"
983                 }
984                 "-d" = {
985                         value = "$simap_delay$"
986                         description = "Seconds to wait between sending string and polling for response"
987                 }
988                 "-D" = {
989                         value = "$simap_certificate_age$"
990                         description = "Minimum number of days a certificate has to be valid"
991                 }
992                 "-S" = {
993                         set_if = "$simap_ssl$"
994                         description = "Use SSL for the connection."
995                 }
996                 "-w" = {
997                         value = "$simap_warning$"
998                         description = "Response time to result in warning status (seconds)"
999                 }
1000                 "-c" = {
1001                         value = "$simap_critical$"
1002                         description = "Response time to result in critical status (seconds)"
1003                 }
1004                 "-t" = {
1005                         value = "$simap_timeout$"
1006                         description = "Seconds before connection times out (default: 10)"
1007                 }
1008                 "-4" = {
1009                         set_if = "$simap_ipv4$"
1010                         description = "Use IPv4 connection"
1011                 }
1012                 "-6" = {
1013                         set_if = "$simap_ipv6$"
1014                         description = "Use IPv6 connection"
1015                 }
1016         }
1017
1018         vars.simap_address = "$check_address$"
1019         vars.check_ipv4 = "$simap_ipv4$"
1020         vars.check_ipv6 = "$simap_ipv6$"
1021 }
1022
1023 object CheckCommand "pop" {
1024         import "ipv4-or-ipv6"
1025
1026         command = [ PluginDir + "/check_pop" ]
1027
1028         arguments = {
1029                 "-H" = {
1030                         value = "$pop_address$"
1031                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1032                 }
1033                 "-p" = {
1034                         value = "$pop_port$"
1035                         description = "Port number (default: none)"
1036                 }
1037                 "-E" = {
1038                         value = "$pop_escape$"
1039                         description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
1040                 }
1041                 "-s" = {
1042                         value = "$pop_send$"
1043                         description = "String to send to the server"
1044                 }
1045                 "-e" = {
1046                         value = "$pop_expect$"
1047                         description = "String to expect in server response (may be repeated)"
1048                 }
1049                 "-A" = {
1050                         set_if = "$pop_all$"
1051                         description = "All expect strings need to occur in server response. Default is any."
1052                 }
1053                 "-q" = {
1054                         value = "$pop_quit$"
1055                         description = "String to send server to initiate a clean close of the connection"
1056                 }
1057                 "-r" = {
1058                         value = "$pop_refuse$"
1059                         description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1060                 }
1061                 "-M" = {
1062                         value = "$pop_mismatch$"
1063                         description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1064                 }
1065                 "-j" = {
1066                         set_if = "$pop_jail$"
1067                         description = "Hide output from TCP socket."
1068                 }
1069                 "-m" = {
1070                         value = "$pop_maxbytes$"
1071                         description = "Close connection once more than this number of bytes are received"
1072                 }
1073                 "-d" = {
1074                         value = "$pop_delay$"
1075                         description = "Seconds to wait between sending string and polling for response"
1076                 }
1077                 "-D" = {
1078                         value = "$pop_certificate_age$"
1079                         description = "Minimum number of days a certificate has to be valid"
1080                 }
1081                 "-S" = {
1082                         set_if = "$pop_ssl$"
1083                         description = "Use SSL for the connection."
1084                 }
1085                 "-w" = {
1086                         value = "$pop_warning$"
1087                         description = "Response time to result in warning status (seconds)"
1088                 }
1089                 "-c" = {
1090                         value = "$pop_critical$"
1091                         description = "Response time to result in critical status (seconds)"
1092                 }
1093                 "-t" = {
1094                         value = "$pop_timeout$"
1095                         description = "Seconds before connection times out (default: 10)"
1096                 }
1097                 "-4" = {
1098                         set_if = "$pop_ipv4$"
1099                         description = "Use IPv4 connection"
1100                 }
1101                 "-6" = {
1102                         set_if = "$pop_ipv6$"
1103                         description = "Use IPv6 connection"
1104                 }
1105         }
1106
1107         vars.pop_address = "$check_address$"
1108         vars.check_ipv4 = "$pop_ipv4$"
1109         vars.check_ipv6 = "$pop_ipv6$"
1110 }
1111
1112 object CheckCommand "spop" {
1113         import "ipv4-or-ipv6"
1114
1115         command = [ PluginDir + "/check_spop" ]
1116
1117         arguments = {
1118                 "-H" = {
1119                         value = "$spop_address$"
1120                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1121                 }
1122                 "-p" = {
1123                         value = "$spop_port$"
1124                         description = "Port number (default: none)"
1125                 }
1126                 "-E" = {
1127                         value = "$spop_escape$"
1128                         description = "Can use \n, \r, \t or \\ in send or quit string. Must come before send or quit option. Default: nothing added to send, \r\n added to end of quit"
1129                 }
1130                 "-s" = {
1131                         value = "$spop_send$"
1132                         description = "String to send to the server"
1133                 }
1134                 "-e" = {
1135                         value = "$spop_expect$"
1136                         description = "String to expect in server response (may be repeated)"
1137                 }
1138                 "-A" = {
1139                         set_if = "$spop_all$"
1140                         description = "All expect strings need to occur in server response. Default is any."
1141                 }
1142                 "-q" = {
1143                         value = "$spop_quit$"
1144                         description = "String to send server to initiate a clean close of the connection"
1145                 }
1146                 "-r" = {
1147                         value = "$spop_refuse$"
1148                         description = "Accept TCP refusals with states ok, warn, crit (default: crit)"
1149                 }
1150                 "-M" = {
1151                         value = "$spop_mismatch$"
1152                         description = "Accept expected string mismatches with states ok, warn, crit (default: warn)"
1153                 }
1154                 "-j" = {
1155                         set_if = "$spop_jail$"
1156                         description = "Hide output from TCP socket."
1157                 }
1158                 "-m" = {
1159                         value = "$spop_maxbytes$"
1160                         description = "Close connection once more than this number of bytes are received"
1161                 }
1162                 "-d" = {
1163                         value = "$spop_delay$"
1164                         description = "Seconds to wait between sending string and polling for response"
1165                 }
1166                 "-D" = {
1167                         value = "$spop_certificate_age$"
1168                         description = "Minimum number of days a certificate has to be valid"
1169                 }
1170                 "-S" = {
1171                         set_if = "$spop_ssl$"
1172                         description = "Use SSL for the connection."
1173                 }
1174                 "-w" = {
1175                         value = "$spop_warning$"
1176                         description = "Response time to result in warning status (seconds)"
1177                 }
1178                 "-c" = {
1179                         value = "$spop_critical$"
1180                         description = "Response time to result in critical status (seconds)"
1181                 }
1182                 "-t" = {
1183                         value = "$spop_timeout$"
1184                         description = "Seconds before connection times out (default: 10)"
1185                 }
1186                 "-4" = {
1187                         set_if = "$spop_ipv4$"
1188                         description = "Use IPv4 connection"
1189                 }
1190                 "-6" = {
1191                         set_if = "$spop_ipv6$"
1192                         description = "Use IPv6 connection"
1193                 }
1194         }
1195
1196         vars.spop_address = "$check_address$"
1197         vars.check_ipv4 = "$spop_ipv4$"
1198         vars.check_ipv6 = "$spop_ipv6$"
1199 }
1200
1201 object CheckCommand "ntp_time" {
1202         import "ipv4-or-ipv6"
1203
1204         command = [ PluginDir + "/check_ntp_time" ]
1205
1206         arguments = {
1207                 "-H" = {
1208                         value = "$ntp_address$"
1209                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1210                 }
1211                 "-p" = {
1212                         value = "$ntp_port$"
1213                         description = "Port number (default: 123)"
1214                 }
1215                 "-q" = {
1216                         set_if = "$ntp_quiet$"
1217                         description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
1218                 }
1219                 "-w" = {
1220                         value = "$ntp_warning$"
1221                         description = "Offset to result in warning status (seconds)"
1222                 }
1223                 "-c" = {
1224                         value = "$ntp_critical$"
1225                         description = "Offset to result in critical status (seconds)"
1226                 }
1227                 "-o" = {
1228                         value = "$ntp_timeoffset$"
1229                         description = "Expected offset of the ntp server relative to local server (seconds)"
1230                 }
1231                 "-t" = {
1232                         value = "$ntp_timeout$"
1233                         description = "Seconds before connection times out (default: 10)"
1234                 }
1235                 "-4" = {
1236                         set_if = "$ntp_ipv4$"
1237                         description = "Use IPv4 connection"
1238                 }
1239                 "-6" = {
1240                         set_if = "$ntp_ipv6$"
1241                         description = "Use IPv6 connection"
1242                 }
1243         }
1244
1245         vars.ntp_address = "$check_address$"
1246         vars.check_ipv4 = "$ntp_ipv4$"
1247         vars.check_ipv6 = "$ntp_ipv6$"
1248 }
1249
1250 object CheckCommand "ntp_peer" {
1251         import "ipv4-or-ipv6"
1252
1253         command = [ PluginDir + "/check_ntp_peer" ]
1254
1255         arguments = {
1256                 "-H" = {
1257                         value = "$ntp_address$"
1258                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1259                 }
1260                 "-p" = {
1261                         value = "$ntp_port$"
1262                         description = "Port number (default: 123)"
1263                 }
1264                 "-q" = {
1265                         set_if = "$ntp_quiet$"
1266                         description = "Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized"
1267                 }
1268                 "-w" = {
1269                         value = "$ntp_warning$"
1270                         description = "Offset to result in warning status (seconds)"
1271                 }
1272                 "-c" = {
1273                         value = "$ntp_critical$"
1274                         description = "Offset to result in critical status (seconds)"
1275                 }
1276                 "-W" = {
1277                         value = "$ntp_wstratum$"
1278                         description = "Warning threshold for stratum of server's synchronization peer"
1279                 }
1280                 "-C" = {
1281                         value = "$ntp_cstratum$"
1282                         description = "Critical threshold for stratum of server's synchronization peer"
1283                 }
1284                 "-j" = {
1285                         value = "$ntp_wjitter$"
1286                         description = "Warning threshold for jitter"
1287                 }
1288                 "-k" = {
1289                         value = "$ntp_cjitter$"
1290                         description = "Critical threshold for jitter"
1291                 }
1292                 "-m" = {
1293                         value = "$ntp_wsource$"
1294                         description = "Warning threshold for number of usable time sources (truechimers)"
1295                 }
1296                 "-n" = {
1297                         value = "$ntp_csource$"
1298                         description = "Critical threshold for number of usable time sources (truechimers)"
1299                 }
1300                 "-t" = {
1301                         value = "$ntp_timeout$"
1302                         description = "Seconds before connection times out (default: 10)"
1303                 }
1304                 "-4" = {
1305                         set_if = "$ntp_ipv4$"
1306                         description = "Use IPv4 connection"
1307                 }
1308                 "-6" = {
1309                         set_if = "$ntp_ipv6$"
1310                         description = "Use IPv6 connection"
1311                 }
1312         }
1313
1314         vars.ntp_address = "$check_address$"
1315         vars.check_ipv4 = "$ntp_ipv4$"
1316         vars.check_ipv6 = "$ntp_ipv6$"
1317 }
1318
1319 object CheckCommand "ssh" {
1320         import "ipv4-or-ipv6"
1321
1322         command = [ PluginDir + "/check_ssh" ]
1323
1324         arguments = {
1325                 "-p" = {
1326                         value = "$ssh_port$"
1327                         description = "Port number (default: 22)"
1328                 }
1329                 "-t" = {
1330                         value = "$ssh_timeout$"
1331                         description = "Seconds before connection times out (default: 10)"
1332                 }
1333                 "host" = {
1334                         value = "$ssh_address$"
1335                         skip_key = true
1336                         order = 1
1337                 }
1338                 "-4" = {
1339                         set_if = "$ssh_ipv4$"
1340                         description = "Use IPv4 connection"
1341                 }
1342                 "-6" = {
1343                         set_if = "$ssh_ipv6$"
1344                         description = "Use IPv6 connection"
1345                 }
1346         }
1347
1348         vars.ssh_address = "$check_address$"
1349         vars.check_ipv4 = "$ssh_ipv4$"
1350         vars.check_ipv6 = "$ssh_ipv6$"
1351 }
1352
1353 object CheckCommand "disk" {
1354         command = [ PluginDir + "/check_disk" ]
1355
1356         arguments = {
1357                 "-w" = {
1358                         value = "$disk_wfree$"
1359                         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"
1360                         required = true
1361                         order = -3
1362                 }
1363                 "-c" = {
1364                         value = "$disk_cfree$"
1365                         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"
1366                         required = true
1367                         order = -3
1368                 }
1369                 "-W" = {
1370                         value = "$disk_inode_wfree$"
1371                         description = "Exit with WARNING status if less than PERCENT of inode space is free"
1372                         order = -3
1373                 }
1374                 "-K" = {
1375                         value = "$disk_inode_cfree$"
1376                         description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1377                         order = -3
1378                 }
1379                 "-p" = {
1380                         value = "$disk_partitions$"
1381                         description = "Path or partition (may be repeated)"
1382                         repeat_key = true
1383                         order = 1
1384                 }
1385                 "-p_old" = {
1386                         key = "-p"
1387                         value = "$disk_partition$"
1388                         order = 1
1389                 }
1390                 "-x" = {
1391                         value = "$disk_partitions_excluded$"
1392                         description = "Ignore device (only works if -p unspecified)"
1393                 }
1394                 "-x_old" = {
1395                         key = "-x"
1396                         value = "$disk_partition_excluded$"
1397                 }
1398                 "-C" = {
1399                         set_if = "$disk_clear$"
1400                         description = "Clear thresholds"
1401                 }
1402                 "-E" = {
1403                         set_if = "$disk_exact_match$"
1404                         description = "For paths or partitions specified with -p, only check for exact paths"
1405                 }
1406                 "-e" = {
1407                         set_if = "$disk_errors_only$"
1408                         description = "Display only devices/mountpoints with errors"
1409                 }
1410                 "-f" = {
1411                         set_if = "$disk_ignore_reserved$"
1412                         description = "Don't account root-reserved blocks into freespace in perfdata"
1413                 }
1414                 "-g" = {
1415                         value = "$disk_group$"
1416                         description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1417                 }
1418                 "-k" = {
1419                         set_if = "$disk_kilobytes$"
1420                         description = "Same as --units kB"
1421                 }
1422                 "-l" = {
1423                         set_if = "$disk_local$"
1424                         description = " Only check local filesystems"
1425                 }
1426                 "-L" = {
1427                         set_if = "$disk_stat_remote_fs$"
1428                         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)"
1429                 }
1430                 "-M" = {
1431                         set_if = "$disk_mountpoint$"
1432                         description = "Display the mountpoint instead of the partition"
1433                 }
1434                 "-m" = {
1435                         set_if = "$disk_megabytes$"
1436                         description = "Same as --units MB"
1437                 }
1438                 "-A" = {
1439                         set_if = "$disk_all$"
1440                         description = "Explicitly select all paths. This is equivalent to -R .*"
1441                         order = 1
1442                 }
1443                 "-R" = {
1444                         value = "$disk_eregi_path$"
1445                         description = "Case insensitive regular expression for path/partition (may be repeated)"
1446                         repeat_key = true
1447                 }
1448                 "-r" = {
1449                         value = "$disk_ereg_path$"
1450                         description = "Regular expression for path or partition (may be repeated)"
1451                         repeat_key = true
1452                 }
1453                 "-I" = {
1454                         value = "$disk_ignore_eregi_path$"
1455                         description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1456                         repeat_key = true
1457                         order = 2
1458                 }
1459                 "-i" = {
1460                         value = "$disk_ignore_ereg_path$"
1461                         description = "Regular expression to ignore selected path or partition (may be repeated)"
1462                         repeat_key = true
1463                         order = 2
1464                 }
1465                 "-t" = {
1466                         value = "$disk_timeout$"
1467                         description = "Seconds before connection times out (default: 10)"
1468                 }
1469                 "-u" = {
1470                         value = "$disk_units$"
1471                         description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1472                 }
1473                 "-X" = {
1474                         value = "$disk_exclude_type$"
1475                         description = "Ignore all filesystems of indicated type (may be repeated)"
1476                         repeat_key = true
1477                 }
1478                 "-N" = {
1479                         value = "$disk_include_type$"
1480                         description = "Check only filesystems of indicated type (may be repeated)"
1481                         repeat_key = true
1482                 }
1483         }
1484
1485         vars.disk_wfree = "20%"
1486         vars.disk_cfree = "10%"
1487         vars.disk_megabytes = true
1488         vars.disk_exclude_type = [
1489                 "none",
1490                 "tmpfs",
1491                 "sysfs",
1492                 "proc",
1493                 "configfs",
1494                 "devtmpfs",
1495                 "devfs",
1496                 "mtmfs",
1497                 "tracefs",
1498                 "cgroup",
1499                 "fuse.gvfsd-fuse",
1500                 "fuse.gvfs-fuse-daemon",
1501                 "fdescfs",
1502                 "overlay",
1503                 "nsfs",
1504                 "squashfs"
1505         ]
1506 }
1507
1508 object CheckCommand "disk_smb" {
1509         command = [ PluginDir + "/check_disk_smb" ]
1510
1511         arguments = {
1512                 "-H" = {
1513                         value = "$disk_smb_hostname$"
1514                         description = "NetBIOS name of the server."
1515                 }
1516                 "-s" = {
1517                         value = "$disk_smb_share$"
1518                         description = "Share name to be tested."
1519                 }
1520                 "-W" = {
1521                         value = "$disk_smb_workgroup$"
1522                         description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1523                 }
1524                 "-a" = {
1525                         value = "$disk_smb_address$"
1526                         description = "IP-address of HOST (only necessary if HOST is in another network)."
1527                 }
1528                 "-u" = {
1529                         value = "$disk_smb_username$"
1530                         description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1531                 }
1532                 "-p" = {
1533                         value = "$disk_smb_password$"
1534                         description = "Password to log in to server. (Defaults to an empty password if omitted)."
1535                 }
1536                 "-w" = {
1537                         value = "$disk_smb_wused$"
1538                         description = "Percent of used space at which a warning will be generated (Default: 85%)."
1539                 }
1540                 "-c" = {
1541                         value = "$disk_smb_cused$"
1542                         description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1543                 }
1544                 "-P" = {
1545                         value = "$disk_smb_port$"
1546                         description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1547                 }
1548         }
1549
1550         vars.disk_smb_wused = "85%"
1551         vars.disk_smb_cused = "95%"
1552 }
1553
1554 object CheckCommand "users" {
1555         command = [ PluginDir + "/check_users" ]
1556
1557         arguments = {
1558                 "-w" = {
1559                         value = "$users_wgreater$"
1560                         description = "Set WARNING status if more than INTEGER users are logged in"
1561                 }
1562                 "-c" = {
1563                         value = "$users_cgreater$"
1564                         description = "Set CRITICAL status if more than INTEGER users are logged in"
1565                 }
1566         }
1567
1568         vars.users_wgreater = 20
1569         vars.users_cgreater = 50
1570 }
1571
1572 object CheckCommand "procs" {
1573         command = [ PluginDir + "/check_procs" ]
1574
1575         arguments = {
1576                 "-w" = {
1577                         value = "$procs_warning$"
1578                         description = "Generate warning state if metric is outside this range"
1579                 }
1580                 "-c" = {
1581                         value = "$procs_critical$"
1582                         description = "Generate critical state if metric is outside this range"
1583                 }
1584                 "-m" = {
1585                         value = "$procs_metric$"
1586                         description = "Check thresholds against metric"
1587                 }
1588                 "-t" = {
1589                         value = "$procs_timeout$"
1590                         description = "Seconds before plugin times out"
1591                 }
1592                 "-T" = {
1593                         set_if = "$procs_traditional$"
1594                         description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1595                 }
1596                 "-s" = {
1597                         value = "$procs_state$"
1598                         description = "Only scan for processes that have one or more of the status flags you specify"
1599                 }
1600                 "-p" = {
1601                         value = "$procs_ppid$"
1602                         description = "Only scan for children of the parent process ID indicated"
1603                 }
1604                 "-z" = {
1605                         value = "$procs_vsz$"
1606                         description = "Only scan for processes with VSZ higher than indicated"
1607                 }
1608                 "-r" = {
1609                         value = "$procs_rss$"
1610                         description = "Only scan for processes with RSS higher than indicated"
1611                 }
1612                 "-P" = {
1613                         value = "$procs_pcpu$"
1614                         description = "Only scan for processes with PCPU higher than indicated"
1615                 }
1616                 "-u" = {
1617                         value = "$procs_user$"
1618                         description = "Only scan for processes with user name or ID indicated"
1619                 }
1620                 "-a" = {
1621                         value = "$procs_argument$"
1622                         description = "Only scan for processes with args that contain STRING"
1623                 }
1624                 "--ereg-argument-array" = {
1625                         value = "$procs_argument_regex$"
1626                         description = "Only scan for processes with args that contain the regex STRING"
1627                 }
1628                 "-C" = {
1629                         value = "$procs_command$"
1630                         description = "Only scan for exact matches of COMMAND (without path)"
1631                 }
1632                 "-k" = {
1633                         set_if = "$procs_nokthreads$"
1634                         description = "Only scan for non kernel threads"
1635                 }
1636         }
1637
1638         vars.procs_traditional = false
1639         vars.procs_nokthreads = false
1640         vars.procs_warning = 250
1641         vars.procs_critical = 400
1642 }
1643
1644 object CheckCommand "swap" {
1645         command = [ PluginDir + "/check_swap" ]
1646
1647         arguments = {
1648                 "-w" = {{
1649                         if (macro("$swap_integer$")) {
1650                                 return macro("$swap_wfree$")
1651                         } else {
1652                                 return macro("$swap_wfree$%")
1653                         }
1654                 }}
1655                 "-c" = {{
1656                         if (macro("$swap_integer$")) {
1657                                 return macro("$swap_cfree$")
1658                         } else {
1659                                 return macro("$swap_cfree$%")
1660                         }
1661                 }}
1662                 "-a" = {
1663                         set_if = "$swap_allswaps$"
1664                         description = "Conduct comparisons for all swap partitions, one by one"
1665                 }
1666                 "-n" = {
1667                         value = "$swap_noswap$"
1668                         description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1669                 }
1670         }
1671
1672         vars.swap_wfree = 50
1673         vars.swap_cfree = 25
1674         vars.swap_integer = false
1675         vars.swap_allswaps = false
1676 }
1677
1678 object CheckCommand "load" {
1679         command = [ PluginDir + "/check_load" ]
1680
1681         arguments = {
1682                 "-w" = {
1683                         value = "$load_wload1$,$load_wload5$,$load_wload15$"
1684                         description = "Exit with WARNING status if load average exceeds WLOADn"
1685                 }
1686                 "-c" = {
1687                         value = "$load_cload1$,$load_cload5$,$load_cload15$"
1688                         description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1689                 }
1690                 "-r" = {
1691                         set_if = "$load_percpu$"
1692                         description = "Divide the load averages by the number of CPUs (when possible)"
1693                 }
1694         }
1695
1696         vars.load_wload1 = 5.0
1697         vars.load_wload5 = 4.0
1698         vars.load_wload15 = 3.0
1699
1700         vars.load_cload1 = 10.0
1701         vars.load_cload5 = 6.0
1702         vars.load_cload15 = 4.0
1703
1704         vars.load_percpu = false
1705 }
1706
1707 object CheckCommand "snmp" {
1708         command = [ PluginDir + "/check_snmp" ]
1709
1710         arguments = {
1711                 "-H" = {
1712                         value = "$snmp_address$"
1713                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1714                 }
1715                 "-o" = {
1716                         value = "$snmp_oid$"
1717                         description = "Object identifier(s) or SNMP variables whose value you wish to query"
1718                 }
1719                 "-C" = {
1720                         value = "$snmp_community$"
1721                         description = "Optional community string for SNMP communication (default is 'public')"
1722                 }
1723                 "-c" = {
1724                         value = "$snmp_crit$"
1725                         description = "Critical threshold range(s)"
1726                 }
1727                 "-w" = {
1728                         value = "$snmp_warn$"
1729                         description = "Warning threshold range(s)"
1730                 }
1731                 "-s" = {
1732                         value = "$snmp_string$"
1733                         description = "Return OK state (for that OID) if STRING is an exact match"
1734                 }
1735                 "-r" = {
1736                         value = "$snmp_ereg$"
1737                         description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1738                 }
1739                 "-R" = {
1740                         value = "$snmp_eregi$"
1741                         description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1742                 }
1743                 "-l" = {
1744                         value = "$snmp_label$"
1745                         description = "Prefix label for output from plugin"
1746                 }
1747                 "-u" = {
1748                         value = "$snmp_units$"
1749                         description = "Units label(s) for output data (e.g., 'sec.')"
1750                 }
1751                 "-t" = {
1752                         value = "$snmp_timeout$"
1753                         description = "Seconds before connection times out (default: 10)"
1754                 }
1755                 "-p" = {
1756                         value = "$snmp_port$"
1757                         description = "Port number (default: 161)"
1758                 }
1759                 "-e" = {
1760                         value = "$snmp_retries$"
1761                         description = "Number of retries to be used in the requests"
1762                 }
1763                 "--invert-search" = {
1764                         set_if = "$snmp_invert_search$"
1765                         description = "Invert search result and return CRITICAL if found"
1766                 }
1767                 "-P" = {
1768                         value = "$snmp_version$"
1769                         description = "SNMP protocol version"
1770                 }
1771                 "-m" = {
1772                         value = "$snmp_miblist$"
1773                         description = "List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL' for symbolic OIDs.)"
1774                 }
1775                 "--rate-multiplier" = {
1776                         value = "$snmp_rate_multiplier$"
1777                         description = "Converts rate per second. For example, set to 60 to convert to per minute"
1778                 }
1779                 "--rate" = {
1780                         set_if = "$snmp_rate$"
1781                         description = "Enable rate calculation"
1782                 }
1783                 "-n" = {
1784                         set_if = "$snmp_getnext$"
1785                         description = "Use SNMP GETNEXT instead of SNMP GET"
1786                 }
1787                 "--offset" = {
1788                         value = "$snmp_offset$"
1789                         description = "Add/substract the specified OFFSET to numeric sensor data"
1790                 }
1791                 "-D" = {
1792                         value = "$snmp_output_delimiter$"
1793                         description = "Separates output on multiple OID requests"
1794                 }
1795                 "-O" = {
1796                         set_if = "$snmp_perf_oids$"
1797                         description = "Label performance data with OIDs instead of --label's"
1798                 }
1799         }
1800
1801         vars.snmp_address = {{
1802                 var addr_v4 = macro("$address$")
1803                 var addr_v6 = macro("$address6$")
1804
1805                 if (addr_v4) {
1806                         return addr_v4
1807                 } else {
1808                         return "udp6:[" + addr_v6 + "]"
1809                 }
1810         }}
1811
1812         vars.snmp_community = "public"
1813         vars.snmp_invert_search = false
1814         vars.snmp_timeout = "10"
1815 }
1816
1817 object CheckCommand "snmpv3" {
1818         import "ipv4-or-ipv6"
1819
1820         command = [ PluginDir + "/check_snmp" ]
1821
1822         arguments = {
1823                 "-H" = {
1824                         value = "$snmpv3_address$"
1825                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1826                 }
1827                 "-p" = {
1828                         value = "$snmpv3_port$"
1829                         description = "Port number"
1830                 }
1831                 "-n" = {
1832                         set_if = "$snmpv3_getnext$"
1833                         description = "Use SNMP GETNEXT instead of SNMP GET"
1834                 }
1835                 "-P" = {
1836                         value = 3
1837                         description = "SNMP protocol version"
1838                 }
1839                 "-L" = {
1840                         value = "$snmpv3_seclevel$"
1841                         description = "SNMPv3 securityLevel"
1842                 }
1843                 "-a" = {
1844                         value = "$snmpv3_auth_alg$"
1845                         description = "SNMPv3 auth proto"
1846                 }
1847                 "-U" = {
1848                         value = "$snmpv3_user$"
1849                         description = "SNMPv3 username"
1850                 }
1851                 "-A" = {
1852                         value = "$snmpv3_auth_key$"
1853                         description = "SNMPv3 authentication password"
1854                 }
1855                 "-X" = {
1856                         value = "$snmpv3_priv_key$"
1857                         description = "SNMPv3 privacy password"
1858                 }
1859                 "-o" = {
1860                         value = "$snmpv3_oid$"
1861                         description = "Object identifier(s) or SNMP variables whose value you wish to query"
1862                 }
1863                 "-x" = {
1864                         value = "$snmpv3_priv_alg$"
1865                         description = "SNMPv3 priv proto (default DES)"
1866                 }
1867                 "-w" = {
1868                         value = "$snmpv3_warn$"
1869                         description = "Warning threshold range(s)"
1870                 }
1871                 "-c" = {
1872                         value = "$snmpv3_crit$"
1873                         description = "Critical threshold range(s)"
1874                 }
1875                 "-s" = {
1876                         value = "$snmpv3_string$"
1877                         description = "Return OK state (for that OID) if STRING is an exact match"
1878                 }
1879                 "-r" = {
1880                         value = "$snmpv3_ereg$"
1881                         description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1882                 }
1883                 "-R" = {
1884                         value = "$snmpv3_eregi$"
1885                         description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1886                 }
1887                 "--invert-search" = {
1888                         set_if = "$snmpv3_invert_search$"
1889                         description = "Invert search result and return CRITICAL if found"
1890                 }
1891                 "-l" = {
1892                         value = "$snmpv3_label$"
1893                         description = "Prefix label for output from plugin"
1894                 }
1895                 "-m" = {
1896                         value = "$snmpv3_miblist$"
1897                         description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1898                 }
1899                 "-u" = {
1900                         value = "$snmpv3_units$"
1901                         description = "Units label(s) for output data (e.g., 'sec.')"
1902                 }
1903                 "--rate-multiplier" = {
1904                         value = "$snmpv3_rate_multiplier$"
1905                         description = "Converts rate per second. For example, set to 60 to convert to per minute"
1906                 }
1907                 "--rate" = {
1908                         set_if = "$snmpv3_rate$"
1909                         description = "Enable rate calculation"
1910                 }
1911                 "-t" = {
1912                         value = "$snmpv3_timeout$"
1913                         description = "Seconds before connection times out (default: 10)"
1914                 }
1915         }
1916
1917         vars.snmpv3_address = "$check_address$"
1918         vars.snmpv3_auth_alg = "SHA"
1919         vars.snmpv3_priv_alg = "AES"
1920         vars.snmpv3_seclevel = "authPriv"
1921         vars.snmpv3_timeout = "10"
1922 }
1923
1924 object CheckCommand "snmp-uptime" {
1925         import "snmp"
1926
1927         vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1928 }
1929
1930 object CheckCommand "apt" {
1931         command = [ PluginDir + "/check_apt" ]
1932
1933         arguments = {
1934                 "--extra-opts" = {
1935                         value = "$apt_extra_opts$"
1936                         description = "Read options from an ini file."
1937                 }
1938                 "--upgrade" = {
1939                         value = "$apt_upgrade$"
1940                         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."
1941                 }
1942                 "--dist-upgrade" = {
1943                         value = "$apt_dist_upgrade$"
1944                         description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1945                 }
1946                 "--include" = {
1947                         value = "$apt_include$"
1948                         description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1949                 }
1950                 "--exclude" = {
1951                         value = "$apt_exclude$"
1952                         description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1953                 }
1954                 "--critical" = {
1955                         value = "$apt_critical$"
1956                         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."
1957                 }
1958                 "--timeout" = {
1959                         value = "$apt_timeout$"
1960                         description = "Seconds before plugin times out (default: 10)."
1961                 }
1962                 "--only-critical" = {
1963                         set_if = "$apt_only_critical$"
1964                         description = "Only warn about critical upgrades."
1965                 }
1966                 "--list" = {
1967                         set_if = "$apt_list$"
1968                         description = "List packages available for upgrade."
1969                 }
1970         }
1971
1972         timeout = 5m
1973 }
1974
1975 object CheckCommand "dhcp" {
1976         command = [ PluginDir + "/check_dhcp" ]
1977
1978         arguments = {
1979                 "-s" = {
1980                         value = "$dhcp_serverip$"
1981                         description = "IP address of DHCP server that we must hear from"
1982                 }
1983                 "-r" = {
1984                         value = "$dhcp_requestedip$"
1985                         description = "IP address that should be offered by at least one DHCP server"
1986                 }
1987                 "-t" = {
1988                         value = "$dhcp_timeout$"
1989                         description = "Seconds to wait for DHCPOFFER before timeout occurs"
1990                 }
1991                 "-i" = {
1992                         value = "$dhcp_interface$"
1993                         description = "Interface to to use for listening (i.e. eth0)"
1994                 }
1995                 "-m" = {
1996                         value = "$dhcp_mac$"
1997                         description = "MAC address to use in the DHCP request"
1998                 }
1999                 "-u" = {
2000                         set_if = "$dhcp_unicast$"
2001                         description = "Unicast testing: mimic a DHCP relay"
2002                 }
2003         }
2004
2005         vars.dhcp_unicast = false
2006 }
2007
2008 object CheckCommand "dns" {
2009         import "ipv4-or-ipv6"
2010
2011         command = [ PluginDir + "/check_dns" ]
2012
2013         arguments = {
2014                 "-H" = {
2015                         value = "$dns_lookup$"
2016                         description = "The name or address you want to query."
2017                 }
2018                 "-s" = {
2019                         value = "$dns_server$"
2020                         description = "Optional DNS server you want to use for the lookup."
2021                 }
2022                 "-q" = {
2023                         value = "$dns_query_type$"
2024                         description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
2025                 }
2026                 "-a" = {
2027                         value = "$dns_expected_answers$"
2028                         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)."
2029                 }
2030                 "-A" = {
2031                         set_if = "$dns_authoritative$"
2032                         description = "Optionally expect the DNS server to be authoritative for the lookup"
2033                 }
2034                 "-n" = {
2035                         set_if = "$dns_accept_cname$"
2036                         description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
2037                 }
2038                 "-w" = {
2039                         value = "$dns_wtime$"
2040                         description = "Return warning if elapsed time exceeds value."
2041                 }
2042                 "-c" = {
2043                         value = "$dns_ctime$"
2044                         description = "Return critical if elapsed time exceeds value."
2045                 }
2046                 "-t" = {
2047                         value = "$dns_timeout$"
2048                         description = "Seconds before connection times out. Defaults to 10."
2049                 }
2050         }
2051
2052         vars.dns_lookup = "$host.name$"
2053         vars.dns_timeout = 10
2054 }
2055
2056 object CheckCommand "dig" {
2057         import "ipv4-or-ipv6"
2058
2059         command = [ PluginDir + "/check_dig" ]
2060
2061         arguments = {
2062                 "-H" = {
2063                         value = "$dig_server$"
2064                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2065                 }
2066                 "-p" = {
2067                         value = "$dig_port$"
2068                         description = "Port number (default: 53)"
2069                 }
2070                 "-l" = {
2071                         value = "$dig_lookup$"
2072                         required = true
2073                         description = "Machine name to lookup"
2074                 }
2075                 "-T" = {
2076                         value = "$dig_record_type$"
2077                         description = "Record type to lookup (default: A)"
2078                 }
2079                 "-a" = {
2080                         value = "$dig_expected_address$"
2081                         description = "An address expected to be in the answer section"
2082                 }
2083                 "-A" = {
2084                         value = "$dig_arguments$"
2085                         description = "Pass STRING as argument(s) to dig"
2086                 }
2087                 "-w" = {
2088                         value = "$dig_warning$"
2089                         description = "Response time to result in warning status (seconds)"
2090                 }
2091                 "-c" = {
2092                         value = "$dig_critical$"
2093                         description = "Response time to result in critical status (seconds)"
2094                 }
2095                 "-t" = {
2096                         value = "$dig_timeout$"
2097                         description = "Seconds before connection times out (default: 10)"
2098                 }
2099                 "-4" = {
2100                         set_if = "$dig_ipv4$"
2101                         description = "Force dig to only use IPv4 query transport"
2102                 }
2103                 "-6" = {
2104                         set_if = "$dig_ipv6$"
2105                         description = "Force dig to only use IPv6 query transport"
2106                 }
2107         }
2108
2109         vars.dig_server = "$check_address$"
2110         vars.check_ipv4 = "$dig_ipv4$"
2111         vars.check_ipv6 = "$dig_ipv6$"
2112 }
2113
2114 object CheckCommand "nscp" {
2115         import "ipv4-or-ipv6"
2116
2117         command = [ PluginDir + "/check_nt" ]
2118
2119         arguments = {
2120                 "-H" = {
2121                         value = "$nscp_address$"
2122                         description = "Name of the host to check"
2123                 }
2124                 "-p" = {
2125                         value = "$nscp_port$"
2126                         description = "Optional port number (default: 1248)"
2127                 }
2128                 "-s" = {
2129                         value = "$nscp_password$"
2130                         description = "Password needed for the request"
2131                 }
2132                 "-v" = {
2133                         value = "$nscp_variable$"
2134                         required = true
2135                         description = "Variable to check"
2136                 }
2137                 "-l" = {
2138                         value = "$nscp_params$"
2139                         repeat_key = false
2140                 }
2141                 "-w" = {
2142                         value = "$nscp_warn$"
2143                         description = "Threshold which will result in a warning status"
2144                 }
2145                 "-c" = {
2146                         value = "$nscp_crit$"
2147                         description = "Threshold which will result in a critical status"
2148                 }
2149                 "-t" = {
2150                         value = "$nscp_timeout$"
2151                         description = "Seconds before connection attempt times out"
2152                 }
2153                 "-d" = {
2154                         value = "SHOWALL"
2155                         set_if = "$nscp_showall$"
2156                         description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
2157                 }
2158         }
2159
2160         vars.nscp_address = "$check_address$"
2161         vars.nscp_port = 12489
2162         vars.nscp_showall = false
2163 }
2164
2165 object CheckCommand "by_ssh" {
2166         import "ipv4-or-ipv6"
2167
2168         command = [ PluginDir + "/check_by_ssh" ]
2169
2170         arguments = {
2171                 "-H" = {
2172                         value = "$by_ssh_address$"
2173                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2174                 }
2175                 "-p" = {
2176                         value = "$by_ssh_port$"
2177                         description = "Port number (default: none)"
2178                 }
2179                 "-C" = {{
2180                         var command = macro("$by_ssh_command$")
2181                         var arguments = macro("$by_ssh_arguments$")
2182
2183                         if (typeof(command) == String && !arguments) {
2184                                 return command
2185                         }
2186
2187                         var escaped_args = []
2188                         for (arg in resolve_arguments(command, arguments)) {
2189                                 escaped_args.add(escape_shell_arg(arg))
2190                         }
2191                         return escaped_args.join(" ")
2192                 }}
2193                 "-l" = {
2194                         value = "$by_ssh_logname$"
2195                         description = "SSH user name on remote host [optional]"
2196                 }
2197                 "-i" = {
2198                         value = "$by_ssh_identity$"
2199                         description = "identity of an authorized key [optional]"
2200                 }
2201                 "-q" = {
2202                         set_if = "$by_ssh_quiet$"
2203                         description = "Tell ssh to suppress warning and diagnostic messages [optional]"
2204                 }
2205                 "-w" = {
2206                         value = "$by_ssh_warn$"
2207                         description = "Response time to result in warning status (seconds)"
2208                 }
2209                 "-c" = {
2210                         value = "$by_ssh_crit$"
2211                         description = "Response time to result in critical status (seconds)"
2212                 }
2213                 "-t" = {
2214                         value = "$by_ssh_timeout$"
2215                         description = "Seconds before connection times out (default: 10)"
2216                 }
2217                 "-o" = {
2218                         value = "$by_ssh_options$"
2219                         description = "Provide ssh options (may be repeated)"
2220                 }
2221                 "-4" = {
2222                         set_if = "$by_ssh_ipv4$"
2223                         description = "Use IPv4 only"
2224                 }
2225                 "-6" = {
2226                         set_if = "$by_ssh_ipv6$"
2227                         description = "Use IPv6 only"
2228                 }
2229                 "-E" = {
2230                         value = "$by_ssh_skip_stderr$"
2231                         description = "Ignore all or (if specified) first n lines on STDERR [optional]"
2232                 }
2233         }
2234
2235         vars.by_ssh_address = "$check_address$"
2236         vars.by_ssh_quiet = false
2237         vars.check_ipv4 = "$by_ssh_ipv4$"
2238         vars.check_ipv6 = "$by_ssh_ipv6$"
2239 }
2240
2241 object CheckCommand "ups" {
2242         import "ipv4-or-ipv6"
2243
2244         command = [ PluginDir + "/check_ups" ]
2245
2246         arguments = {
2247                 "-H" = {
2248                         value = "$ups_address$"
2249                         description = "Address of the upsd server"
2250                         required = true
2251                 }
2252                 "-u" = {
2253                         value = "$ups_name$"
2254                         description = "Name of the UPS to monitor"
2255                         required = true
2256                 }
2257                 "-p" = {
2258                         value = "$ups_port$"
2259                         description = "Port number (default: 3493)"
2260                 }
2261                 "-v" = {
2262                         value = "$ups_variable$"
2263                         description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
2264                 }
2265                 "-w" = {
2266                         value = "$ups_warning$"
2267                         description = "Warning threshold for the selected variable"
2268                 }
2269                 "-c" = {
2270                         value = "$ups_critical$"
2271                         description = "Critical threshold for the selected variable"
2272                 }
2273                 "-T" = {
2274                         set_if = "$ups_celsius$"
2275                         description = "Display temperature in degrees Celsius instead of Fahrenheit"
2276                 }
2277                 "-t" = {
2278                         value = "$ups_timeout$"
2279                         description = "Seconds before the connection times out (default: 10)"
2280                 }
2281         }
2282
2283         vars.ups_address = "$check_address$"
2284         vars.ups_name = "ups"
2285 }
2286
2287 object CheckCommand "nrpe" {
2288         import "ipv4-or-ipv6"
2289
2290         command = [ PluginDir + "/check_nrpe" ]
2291
2292         arguments = {
2293                 "-H" = {
2294                         value = "$nrpe_address$"
2295                         description = "The address of the host running the NRPE daemon"
2296                 }
2297                 "-p" = {
2298                         value = "$nrpe_port$"
2299                 }
2300                 "-c" = {
2301                         value = "$nrpe_command$"
2302                 }
2303                 "-n" = {
2304                         set_if = "$nrpe_no_ssl$"
2305                         description = "Do not use SSL"
2306                 }
2307                 "-u" = {
2308                         set_if = "$nrpe_timeout_unknown$"
2309                         description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
2310                 }
2311                 "-t" = {
2312                         value = "$nrpe_timeout$"
2313                         description = "<interval>:<state> = <Number of seconds before connection times out>:<Check state to exit with in the event of a timeout (default=CRITICAL)>"
2314                 }
2315                 "-a" = {
2316                         value = "$nrpe_arguments$"
2317                         repeat_key = false
2318                         order = 1
2319                 }
2320                 "-4" = {
2321                         set_if = "$nrpe_ipv4$"
2322                         description = "Use IPv4 connection"
2323                 }
2324                 "-6" = {
2325                         set_if = "$nrpe_ipv6$"
2326                         description = "Use IPv6 connection"
2327                 }
2328                 "-2" = {
2329                         set_if = "$nrpe_version_2$"
2330                         description = "Use this if you want to connect to NRPE v2"
2331                 }
2332         }
2333
2334         vars.nrpe_address = "$check_address$"
2335         vars.nrpe_no_ssl = false
2336         vars.nrpe_timeout_unknown = false
2337         vars.check_ipv4 = "$nrpe_ipv4$"
2338         vars.check_ipv6 = "$nrpe_ipv6$"
2339         vars.nrpe_version_2 = false
2340         timeout = 5m
2341 }
2342
2343 object CheckCommand "hpjd" {
2344         import "ipv4-or-ipv6"
2345
2346         command = [ PluginDir + "/check_hpjd" ]
2347
2348         arguments = {
2349                 "-H" = {
2350                         value = "$hpjd_address$"
2351                         description = "Host address"
2352                 }
2353                 "-C" = {
2354                         value = "$hpjd_community$"
2355                         description = "The SNMP community name (default=public)"
2356                 }
2357                 "-p" = {
2358                         value = "$hpjd_port$"
2359                         description = "Specify the port to check (default=161)"
2360                 }
2361         }
2362
2363         vars.hpjd_address = "$check_address$"
2364 }
2365
2366 object CheckCommand "icmp" {
2367         command = [ PluginDir + "/check_icmp" ]
2368
2369         arguments = {
2370                 "-H" = {
2371                         value = "$icmp_address$"
2372                         repeat_key = false
2373                         order = 1
2374                         description = "Host address"
2375                 }
2376                 "-w" = {
2377                         value = "$icmp_wrta$,$icmp_wpl$%"
2378                         description = "warning threshold (currently 200.000ms,40%)"
2379                 }
2380                 "-c" = {
2381                         value = "$icmp_crta$,$icmp_cpl$%"
2382                         description = "critical threshold (currently 500.000ms,80%)"
2383                 }
2384                 "-s" = {
2385                         value = "$icmp_source$"
2386                         description = "specify a source IP address or device name"
2387                 }
2388                 "-n" = {
2389                         value = "$icmp_packets$"
2390                         description = "number of packets to send (currently 5)"
2391                 }
2392                 "-i" = {
2393                         value = "$icmp_packet_interval$"
2394                         description = "max packet interval (currently 80.000ms)"
2395                 }
2396                 "-I" = {
2397                         value = "$icmp_target_interval$"
2398                         description = "max target interval (currently 0.000ms)"
2399                 }
2400                 "-m" = {
2401                         value = "$icmp_hosts_alive$"
2402                         description = "number of alive hosts required for success"
2403                 }
2404                 "-b" = {
2405                         value = "$icmp_data_bytes$"
2406                         description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
2407                 }
2408                 "-t" = {
2409                         value = "$icmp_timeout$"
2410                         description = "timeout value (seconds, currently  10)"
2411                 }
2412                 "-l" = {
2413                         value = "$icmp_ttl$"
2414                         description = "TTL on outgoing packets (currently 0)"
2415                 }
2416         }
2417
2418         vars.icmp_address = "$address$"
2419         vars.icmp_wrta = 100
2420         vars.icmp_wpl = 5
2421         vars.icmp_crta = 200
2422         vars.icmp_cpl = 15
2423 }
2424
2425 object CheckCommand "ldap" {
2426         import "ipv4-or-ipv6"
2427
2428         command = [ PluginDir + "/check_ldap" ]
2429
2430         arguments = {
2431                 "-H" = {
2432                         value = "$ldap_address$"
2433                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2434                 }
2435                 "-p" = {
2436                         value = "$ldap_port$"
2437                         description = "Port number (default: 389)"
2438                 }
2439                 "-a" = {
2440                         value = "$ldap_attr$"
2441                         description = "ldap attribute to search (default: \"(objectclass=*)\""
2442                 }
2443                 "-b" = {
2444                         value = "$ldap_base$"
2445                         required = true
2446                         description = "ldap base (eg. ou=my unit, o=my org, c=at"
2447                 }
2448                 "-D" = {
2449                         value = "$ldap_bind$"
2450                         description = "ldap bind DN (if required)"
2451                 }
2452                 "-P" = {
2453                         value = "$ldap_pass$"
2454                         description = "ldap password (if required)"
2455                 }
2456                 "-T" = {
2457                         set_if = "$ldap_starttls$"
2458                         description = "use starttls mechanism introduced in protocol version 3"
2459                 }
2460                 "-S" = {
2461                         set_if = "$ldap_ssl$"
2462                         description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
2463                 }
2464                 "-2" = {
2465                         set_if = "$ldap_v2$"
2466                         description = "Use LDAP protocol version 2"
2467                 }
2468                 "-3" = {
2469                         set_if = "$ldap_v3$"
2470                         description = "Use LDAP protocol version 3"
2471                 }
2472                 "-w" = {
2473                         value = "$ldap_warning$"
2474                         description = "Response time to result in warning status (seconds)"
2475                 }
2476                 "-c" = {
2477                         value = "$ldap_critical$"
2478                         description = "Response time to result in critical status (seconds)"
2479                 }
2480                 "-W" = {
2481                         value = "$ldap_warning_entries$"
2482                         description = "Number of found entries to result in warning status (optional)"
2483                 }
2484                 "-C" = {
2485                         value = "$ldap_critical_entries$"
2486                         description = "Number of found entries to result in critical status (optional)"
2487                 }
2488                 "-t" = {
2489                         value = "$ldap_timeout$"
2490                         description = "Seconds before connection times out (default: 10)"
2491                 }
2492                 "-v" = {
2493                         set_if = "$ldap_verbose$"
2494                         description = "Show details for command-line debugging"
2495                 }
2496         }
2497
2498         vars.ldap_address = "$check_address$"
2499         vars.ldap_v2 = true
2500         vars.ldap_v3 = false
2501         vars.ldap_timeout = 10s
2502         vars.ldap_verbose = false
2503 }
2504
2505 object CheckCommand "clamd" {
2506         command = [ PluginDir + "/check_clamd" ]
2507
2508         arguments = {
2509                 "-H" = {
2510                         value = "$clamd_address$"
2511                         description = "The host's address or unix socket (must be an absolute path)."
2512                         required = true
2513                 }
2514                 "-p" = {
2515                         value = "$clamd_port$"
2516                         description = "Port number (default: none)."
2517                 }
2518                 "-e" = {
2519                         value = "$clamd_expect$"
2520                         description = "String to expect in server response (may be repeated)."
2521                         repeat_key = true
2522                 }
2523                 "-A" = {
2524                         set_if = "$clamd_all$"
2525                         description = "All expect strings need to occur in server response. Default is any."
2526                 }
2527                 "-E_send" = {
2528                         key = "-E"
2529                         order = 1
2530                         set_if = "$clamd_escape_send$"
2531                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
2532                 }
2533                 "-s" = {
2534                         order = 2
2535                         value = "$clamd_send$"
2536                         description = "String to send to the server."
2537                 }
2538                 "-E_quit" = {
2539                         key = "-E"
2540                         order = 3
2541                         set_if = "$clamd_escape_quit$"
2542                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
2543                 }
2544                 "-q" = {
2545                         order = 4
2546                         value = "$clamd_quit$"
2547                         description = "String to send server to initiate a clean close of the connection."
2548                 }
2549                 "-r" = {
2550                         value = "$clamd_refuse$"
2551                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
2552                 }
2553                 "-M" = {
2554                         value = "$clamd_mismatch$"
2555                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
2556                 }
2557                 "-j" = {
2558                         set_if = "$clamd_jail$"
2559                         description = "Hide output from TCP socket."
2560                 }
2561                 "-m" = {
2562                         value = "$clamd_maxbytes$"
2563                         description = "Close connection once more than this number of bytes are received."
2564                 }
2565                 "-d" = {
2566                         value = "$clamd_delay$"
2567                         description = "Seconds to wait between sending string and polling for response."
2568                 }
2569                 "-D" = {
2570                         value = "$clamd_certificate$"
2571                         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."
2572                 }
2573                 "-S" = {
2574                         set_if = "$clamd_ssl$"
2575                         description = "Use SSL for the connection."
2576                 }
2577                 "-w" = {
2578                         value = "$clamd_wtime$"
2579                         description = "Response time to result in warning status (seconds)."
2580                 }
2581                 "-c" = {
2582                         value = "$clamd_ctime$"
2583                         description = "Response time to result in critical status (seconds)."
2584                 }
2585                 "-t" = {
2586                         value = "$clamd_timeout$"
2587                         description = "Seconds before connection times out. Defaults to 10."
2588                 }
2589                 "-4" = {
2590                         set_if = "$clamd_ipv4$"
2591                         description = "Use IPv4 only"
2592                 }
2593                 "-6" = {
2594                         set_if = "$clamd_ipv6$"
2595                         description = "Use IPv6 only"
2596                 }
2597         }
2598
2599         vars.clamd_ssl = false
2600         vars.clamd_refuse = "crit"
2601         vars.clamd_mismatch = "warn"
2602         vars.clamd_timeout = 10
2603         vars.check_ipv4 = "$clamd_ipv4$"
2604         vars.check_ipv6 = "$clamd_ipv6$"
2605 }
2606
2607 object CheckCommand "mailq" {
2608         command = [ PluginDir + "/check_mailq" ]
2609
2610         arguments = {
2611                 "-w" = {
2612                         value = "$mailq_warning$"
2613                         description = "Min. number of messages in queue to generate warning"
2614                         required = true
2615                 }
2616                 "-c" = {
2617                         value = "$mailq_critical$"
2618                         description = "Min. number of messages in queue to generate critical alert ( w < c )"
2619                         required = true
2620                 }
2621                 "-W" = {
2622                         value = "$mailq_domain_warning$"
2623                         description = "Min. number of messages for same domain in queue to generate warning"
2624                 }
2625                 "-C" = {
2626                         value = "$mailq_domain_critical$"
2627                         description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2628                 }
2629                 "-t" = {
2630                         value = "$mailq_timeout$"
2631                         description = "Plugin timeout in seconds (default = 15)"
2632                 }
2633                 "-M" = {
2634                         value = "$mailq_servertype$"
2635                         description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2636                 }
2637                 "-s" = {
2638                         set_if = "$mailq_sudo$"
2639                         description = "Use sudo for mailq command"
2640                 }
2641         }
2642 }
2643
2644 object CheckCommand "pgsql" {
2645         import "ipv4-or-ipv6"
2646
2647         command = [ PluginDir + "/check_pgsql" ]
2648
2649         arguments = {
2650                 "-H" = {
2651                         value = "$pgsql_hostname$"
2652                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2653                 }
2654                 "-P" = {
2655                         value = "$pgsql_port$"
2656                         description = "Port number (default: 5432)"
2657                 }
2658                 "-d" = {
2659                         value = "$pgsql_database$"
2660                         description = "Database to check (default: template1)"
2661                 }
2662                 "-l" = {
2663                         value = "$pgsql_username$"
2664                         description = "Login name of user"
2665                 }
2666                 "-p" = {
2667                         value = "$pgsql_password$"
2668                         description = "Password (BIG SECURITY ISSUE)"
2669                 }
2670                 "-o" = {
2671                         value = "$pgsql_options$"
2672                         description = "Connection parameters (keyword = value), see below"
2673                         }
2674                 "-w" = {
2675                         value = "$pgsql_warning$"
2676                         description = "Response time to result in warning status (seconds)"
2677                 }
2678                 "-c" = {
2679                         value = "$pgsql_critical$"
2680                         description = "Response time to result in critical status (seconds)"
2681                 }
2682                 "-t" = {
2683                         value = "$pgsql_timeout$"
2684                         description = "Seconds before connection times out (default: 10)"
2685                 }
2686                 "-q" = {
2687                         value = "$pgsql_query$"
2688                         description = "SQL query to run. Only first column in first row will be read"
2689                 }
2690                 "-W" = {
2691                         value = "$pgsql_query_warning$"
2692                         description = "SQL query value to result in warning status (double)"
2693                 }
2694                 "-C" = {
2695                         value = "$pgsql_query_critical$"
2696                         description = "SQL query value to result in critical status (double)"
2697                 }
2698         }
2699
2700         vars.pgsql_hostname = "$check_address$"
2701 }
2702
2703 object CheckCommand "mysql" {
2704         import "ipv4-or-ipv6"
2705
2706         command = [ PluginDir + "/check_mysql" ]
2707
2708         arguments = {
2709                 "-H" = {
2710                         value = "$mysql_hostname$"
2711                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2712                 }
2713                 "-P" = {
2714                         value = "$mysql_port$"
2715                         description = "Port number (default: 3306)"
2716                 }
2717                 "-n" = {
2718                         set_if = "$mysql_ignore_auth$"
2719                         description = "Ignore authentication failure and check for mysql connectivity only"
2720                 }
2721                 "-s" = {
2722                         value = "$mysql_socket$"
2723                         description = "Use the specified socket"
2724                 }
2725                 "-d" = {
2726                         value = "$mysql_database$"
2727                         description = "Check database with indicated name"
2728                 }
2729                 "-f" = {
2730                         value = "$mysql_file$"
2731                         description = "Read from the specified client options file"
2732                 }
2733                 "-g" = {
2734                         value = "$mysql_group$"
2735                         description = "Use a client options group"
2736                 }
2737                 "-u" = {
2738                         value = "$mysql_username$"
2739                         description = "Connect using the indicated username"
2740                 }
2741                 "-p" = {
2742                         value = "$mysql_password$"
2743                         description = "Use the indicated password to authenticate the connection"
2744                 }
2745                 "-S" = {
2746                         set_if = "$mysql_check_slave$"
2747                         description = "Check if the slave thread is running properly"
2748                 }
2749                 "-w" = {
2750                         value = "$mysql_warning$"
2751                         description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
2752                 }
2753                 "-c" = {
2754                         value = "$mysql_critical$"
2755                         description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
2756                 }
2757                 "-l" = {
2758                         set_if = "$mysql_ssl$"
2759                         description = "Use ssl encryptation"
2760                 }
2761                 "-C" = {
2762                         value = "$mysql_cacert$"
2763                         description = "Path to CA signing the cert"
2764                 }
2765                 "-a" = {
2766                         value = "$mysql_cert$"
2767                         description = "Path to SSL certificate"
2768                 }
2769                 "-k" = {
2770                         value = "$mysql_key$"
2771                         description = "Path to private SSL key"
2772                 }
2773                 "-D" = {
2774                         value = "$mysql_cadir$"
2775                         description = "Path to CA directory"
2776                 }
2777                 "-L" = {
2778                         value = "$mysql_ciphers$"
2779                         description = "List of valid SSL ciphers"
2780                 }
2781         }
2782
2783         vars.mysql_hostname = "$check_address$"
2784 }
2785
2786 object CheckCommand "negate" {
2787         command = [ PluginDir + "/negate" ]
2788
2789         arguments = {
2790                 "-t" = {
2791                         value = "$negate_timeout$"
2792                         description = "Seconds before plugin times out (default: 11)"
2793                 }
2794                 "-T" = {
2795                         value = "$negate_timeout_result$"
2796                         description = "Custom result on Negate timeouts"
2797                 }
2798                 "-o" = {
2799                         value = "$negate_ok$"
2800                 }
2801                 "-w" = {
2802                         value = "$negate_warning$"
2803                 }
2804                 "-c" = {
2805                         value = "$negate_critical$"
2806                 }
2807                 "-u" = {
2808                         value = "$negate_unknown$"
2809                 }
2810                 "-s" = {
2811                         set_if = "$negate_substitute$"
2812                         description = "Substitute output text as well. Will only substitute text in CAPITALS"
2813                 }
2814                 "--wrapped-plugin" = {
2815                         value = {{
2816                                 var command = macro("$negate_command$")
2817                                 var arguments = macro("$negate_arguments$")
2818
2819                                 if (typeof(command) == String && !arguments) {
2820                                         return command
2821                                 }
2822
2823                                 var escaped_args = []
2824                                 for (arg in resolve_arguments(command, arguments)) {
2825                                         escaped_args.add(arg)
2826                                 }
2827                                 return escaped_args.join(" ")
2828                         }}
2829                         skip_key = true
2830                         order = 1
2831                 }
2832         }
2833
2834         vars.negate_timeout_result = "UNKNOWN"
2835 }
2836
2837 object CheckCommand "file_age" {
2838         command = [ PluginDir + "/check_file_age" ]
2839
2840         arguments = {
2841                 "-w" = {
2842                         value = "$file_age_warning_time$"
2843                         description = "File must be no more than this many seconds old (default: 240s)"
2844                 }
2845                 "-c" = {
2846                         value = "$file_age_critical_time$"
2847                         description = "File must be no more than this many seconds old (default: 600s)"
2848                 }
2849                 "-W" = {
2850                         value = "$file_age_warning_size$"
2851                         description = "File must be at least this many bytes long"
2852                 }
2853                 "-C" = {
2854                         value = "$file_age_critical_size$"
2855                         description = "File must be at least this many bytes long (default: 0B)"
2856                 }
2857                 "-i" = {
2858                         set_if = "$file_age_ignoremissing$"
2859                         description = "return OK if the file does not exist"
2860                 }
2861                 "-f" = {
2862                         value = "$file_age_file$"
2863                         description = "File to monitor"
2864                 }
2865         }
2866
2867         vars.file_age_ignoremissing = false
2868 }
2869
2870 object CheckCommand "smart" {
2871         command = [ PluginDir + "/check_ide_smart" ]
2872
2873         arguments = {
2874                 "-d" = {
2875                         value = "$smart_device$"
2876                         description = "Name of a local hard drive to monitor"
2877                         required = true
2878                 }
2879         }
2880 }
2881
2882 object CheckCommand "breeze" {
2883         import "ipv4-or-ipv6"
2884
2885         command = [ PluginDir + "/check_breeze" ]
2886
2887         arguments = {
2888                 "-H" = {
2889                         value = "$breeze_hostname$"
2890                         description = "Name or IP address of host to check"
2891                         required = true
2892                 }
2893                 "-C" = {
2894                         value = "$breeze_community$"
2895                         description = "SNMPv1 community (default public)"
2896                 }
2897                 "-w" = {
2898                         value = "$breeze_warning$"
2899                         description = "Percentage strength below which a WARNING status will result"
2900                         required = true
2901                 }
2902                 "-c" = {
2903                         value = "$breeze_critical$"
2904                         description = "Percentage strength below which a CRITICAL status will result"
2905                         required = true
2906                 }
2907         }
2908
2909         vars.breeze_hostname = "$check_address$"
2910         vars.breeze_warning = "50"
2911         vars.breeze_critical = "20"
2912 }
2913
2914 object CheckCommand "flexlm" {
2915         command = [ PluginDir + "/check_flexlm" ]
2916
2917         arguments = {
2918                 "-F" = {
2919                         value = "$flexlm_licensefile$"
2920                         description = "Name of license file (usually license.dat)"
2921                         required = true
2922                 }
2923                 "-t" = {
2924                         value = "$flexlm_timeout$"
2925                         description = "Plugin time out in seconds (default = 15)"
2926                 }
2927         }
2928 }
2929
2930 object CheckCommand "game" {
2931         import "ipv4-or-ipv6"
2932
2933         command = [ PluginDir + "/check_game" ]
2934
2935         arguments = {
2936                 "-P" = {
2937                         value = "$game_port$"
2938                         description = "Port to connect to"
2939                 }
2940                 "-t" = {
2941                         value = "$game_timeout$"
2942                         description = "Seconds before connection times out (default: 10)"
2943                 }
2944                 "-g" = {
2945                         value = "$game_gamefield$"
2946                         description = "Field number in raw qstat output that contains game name"
2947                 }
2948                 "-m" = {
2949                         value = "$game_mapfield$"
2950                         description = "Field number in raw qstat output that contains map name"
2951                 }
2952                 "-p" = {
2953                         value = "$game_pingfield$"
2954                         description = "Field number in raw qstat output that contains ping time"
2955                 }
2956                 "-G" = {
2957                         value = "$game_gametime$"
2958                         description = "Field number in raw qstat output that contains game time"
2959                 }
2960                 "-H" = {
2961                         value = "$game_hostname$"
2962                         description = "Name of the host running the game"
2963                 }
2964                 "game" = {
2965                         value = "$game_game$"
2966                         description = "Name of the game"
2967                         order = 1
2968                         skip_key = true
2969                 }
2970                 "ipaddress" = {
2971                         value = "$game_ipaddress$"
2972                         description = "Ipaddress of the game server to query"
2973                         order = 2
2974                         skip_key = true
2975                 }
2976         }
2977 }
2978
2979 object CheckCommand "mysql_query" {
2980         import "ipv4-or-ipv6"
2981
2982         command = [ PluginDir + "/check_mysql_query" ]
2983
2984         arguments = {
2985                 "-H" = {
2986                         value = "$mysql_query_hostname$"
2987                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2988                 }
2989                 "-P" = {
2990                         value = "$mysql_query_port$"
2991                         description = "Port number (default: 3306)"
2992                 }
2993                 "-u" = {
2994                         value = "$mysql_query_username$"
2995                         description = "Username to login with"
2996                 }
2997                 "-p" = {
2998                         value = "$mysql_query_password$"
2999                         description = "Password to login with"
3000                 }
3001                 "-d" = {
3002                         value = "$mysql_query_database$"
3003                         description = "Database to check"
3004                 }
3005                 "-f" = {
3006                         value = "$mysql_query_file$"
3007                         description = "Read from the specified client options file"
3008                 }
3009                 "-g" = {
3010                         value = "$mysql_query_group$"
3011                         description = "Use a client options group"
3012                 }
3013                 "-q" = {
3014                         value = "$mysql_query_execute$"
3015                         description = "SQL query to run. Only first column in first row will be read"
3016                 }
3017                 "-w" = {
3018                         value = "$mysql_query_warning$"
3019                         description = "Warning range (format: start:end). Alert if outside this range"
3020                 }
3021                 "-c" = {
3022                         value = "$mysql_query_critical$"
3023                         description = "Critical range"
3024                 }
3025         }
3026
3027         vars.mysql_query_hostname = "$check_address$"
3028 }
3029
3030 object CheckCommand "radius" {
3031         import "ipv4-or-ipv6"
3032
3033         command = [
3034                 PluginDir + "/check_radius",
3035         ]
3036
3037         arguments = {
3038                 "-H" = {
3039                         value = "$radius_address$",
3040                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
3041                 }
3042                 "-F" = {
3043                         value = "$radius_config_file$",
3044                         description = "Configuration file"
3045                 }
3046                 "-u" = {
3047                         value = "$radius_username$",
3048                         description = "The user to authenticate"
3049                 }
3050                 "-p" = {
3051                         value = "$radius_password$",
3052                         description = "Password for authentication"
3053                 }
3054                 "-P" = {
3055                         value = "$radius_port$",
3056                         description = "Port number (default: 1645)"
3057                 },
3058                 "-n" = {
3059                         value = "$radius_nas_id$",
3060                         description = "NAS identifier"
3061                 }
3062                 "-N" = {
3063                         value = "$radius_nas_address$",
3064                         description = "NAS IP Address"
3065                 },
3066                 "-e" = {
3067                         value = "$radius_expect$",
3068                         description = "Response string to expect from the server"
3069                 },
3070                 "-r" = {
3071                         value = "$radius_retries$",
3072                         description = "Number of times to retry a failed connection"
3073                 },
3074                 "-t" = {
3075                         value = "$radius_timeout$",
3076                         description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
3077                 },
3078         }
3079
3080         vars.radius_address = "$check_address$"
3081 }
3082
3083 object CheckCommand "nscp_api" {
3084         import "ipv4-or-ipv6"
3085
3086         command = [ PluginDir + "/check_nscp_api" ]
3087
3088         arguments = {
3089                 "-H" = {
3090                         value = "$nscp_api_host$"
3091                         description = "NSCP API host address"
3092                         required = true
3093                 }
3094                 "-P" = {
3095                         value = "$nscp_api_port$"
3096                         description = "NSCP API host port. Defaults to 8443."
3097                 }
3098                 "--password" = {
3099                         value = "$nscp_api_password$"
3100                         description = "NSCP API password"
3101                 }
3102                 "-q" = {
3103                         value = "$nscp_api_query$"
3104                         description = "NSCPI API Query endpoint to use"
3105                 }
3106                 "-a" = {
3107                         value = "$nscp_api_arguments$"
3108                         description = "NSCP API Query arguments"
3109                         repeat_key = true
3110                 }
3111         }
3112
3113         vars.nscp_api_host = "$check_address$"
3114 }
3115
3116 object CheckCommand "rpc" {
3117         import "ipv4-or-ipv6"
3118
3119         command = [ PluginDir + "/check_rpc" ]
3120
3121         arguments = {
3122                 "-H" = {
3123                         value = "$rpc_address$"
3124                         description = "RPC host address"
3125                         required = true
3126                 }
3127                 "-C" = {
3128                         value = "$rpc_command$"
3129                         description = "Programm name (or number)"
3130                         required = true
3131                 }
3132                 "-p" = {
3133                         value = "$rpc_port$"
3134                         description = "RPC port"
3135                 }
3136                 "-c" = {
3137                         value = "$rpc_version$"
3138                         description = "The version to check"
3139                 }
3140                 "-u" = {
3141                         set_if = "$rpc_udp$"
3142                         description = "Test UDP"
3143                 }
3144                 "-t" = {
3145                         set_if = "$rpc_tcp$"
3146                         description     = "Test TCP"
3147                 }
3148                 "-v" = {
3149                         set_if = "$rpc_verbose$"
3150                         description = "Show verbose details"
3151                 }
3152         }
3153
3154         vars.rpc_address = "$check_address$"
3155 }