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