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