]> granicus.if.org Git - icinga2/blob - itl/command-plugins.conf
Merge pull request #5783 from Icinga/fix/docs-formatting
[icinga2] / itl / command-plugins.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)  *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 template CheckCommand "ipv4-or-ipv6" {
21         vars.check_address = {{
22                 var addr_v4 = macro("$address$")
23                 var addr_v6 = macro("$address6$")
24
25                 if (addr_v4 && !macro("$check_ipv6$") || macro("$check_ipv4$")) {
26                         return addr_v4
27                 } else {
28                         return addr_v6
29                 }
30         }}
31
32         vars.check_ipv4 = false
33         vars.check_ipv6 = false
34 }
35
36 template CheckCommand "ping-common" {
37         command = [ PluginDir + "/check_ping" ]
38
39         arguments = {
40                 "-H" = {
41                         value = "$ping_address$"
42                         description = "host to ping"
43                 }
44                 "-w" = {
45                         value = "$ping_wrta$,$ping_wpl$%"
46                         description = "warning threshold pair"
47                 }
48                 "-c" = {
49                         value = "$ping_crta$,$ping_cpl$%"
50                         description = "critical threshold pair"
51                 }
52                 "-p" = {
53                         value = "$ping_packets$"
54                         description = "number of ICMP ECHO packets to send (Default: 5)"
55                 }
56                 "-t" = {
57                         value = "$ping_timeout$"
58                         description = "Seconds before connection times out (default: 10)"
59                 }
60         }
61
62         vars.ping_wrta = 100
63         vars.ping_wpl = 5
64         vars.ping_crta = 200
65         vars.ping_cpl = 15
66 }
67
68 object CheckCommand "ping" {
69         import "ping-common"
70         import "ipv4-or-ipv6"
71
72         vars.ping_address = "$check_address$"
73 }
74
75 object CheckCommand "ping4" {
76         import "ping-common"
77
78         command += [ "-4" ]
79
80         vars.ping_address = "$address$"
81 }
82
83 object CheckCommand "ping6" {
84         import "ping-common"
85
86         command += [ "-6" ]
87
88         vars.ping_address = "$address6$"
89 }
90
91 template CheckCommand "hostalive-common" {
92         vars.ping_wrta = 3000.0
93         vars.ping_wpl = 80
94
95         vars.ping_crta = 5000.0
96         vars.ping_cpl = 100
97 }
98
99 object CheckCommand "hostalive" {
100         import "ping"
101         import "hostalive-common"
102 }
103
104 object CheckCommand "hostalive4" {
105         import "ping4"
106         import "hostalive-common"
107 }
108
109 object CheckCommand "hostalive6" {
110         import "ping6"
111         import "hostalive-common"
112 }
113
114 template CheckCommand "fping-common" {
115         command = [
116                 PluginDir + "/check_fping",
117                 "$fping_address$"
118         ]
119
120         arguments = {
121                 "-w" = {
122                         value = "$fping_wrta$,$fping_wpl$%"
123                         description = "warning threshold pair"
124                 }
125                 "-c" = {
126                         value = "$fping_crta$,$fping_cpl$%"
127                         description = "critical threshold pair"
128                 }
129                 "-n" = {
130                         value = "$fping_number$"
131                         description = "number of ICMP packets to send (default: 1)"
132                 }
133                 "-i" = {
134                         value = "$fping_interval$"
135                         description = "Interval (ms) between sending packets (default: fping's default for -p)"
136                 }
137                 "-b" = {
138                         value = "$fping_bytes$"
139                         description = "size of ICMP packet (default: 56)"
140                 }
141                 "-T" = {
142                         value = "$fping_target_timeout$"
143                         description = "Target timeout (ms) (default: fping's default for -t)"
144                 }
145                 "-S" = {
146                         value = "$fping_source_ip$"
147                         description = "name or IP Address of sourceip"
148                 }
149                 "-I" = {
150                         value = "$fping_source_interface$"
151                         description = "source interface name"
152                 }
153         }
154
155         vars.fping_wrta = 100
156         vars.fping_wpl = 5
157         vars.fping_crta = 200
158         vars.fping_cpl = 15
159         vars.fping_number = 5
160         vars.fping_interval = 500
161 }
162
163 object CheckCommand "fping4" {
164         import "fping-common"
165
166         command += [ "-4" ]
167
168         vars.fping_address = "$address$"
169 }
170
171 object CheckCommand "fping6" {
172         import "fping-common"
173
174         command += [ "-6" ]
175
176         vars.fping_address = "$address6$"
177 }
178
179 object CheckCommand "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                 }
1380                 "-K" = {
1381                         value = "$disk_inode_cfree$"
1382                         description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1383                 }
1384                 "-p" = {
1385                         value = "$disk_partitions$"
1386                         description = "Path or partition (may be repeated)"
1387                         repeat_key = true
1388                         order = 1
1389                 }
1390                 "-p_old" = {
1391                         key = "-p"
1392                         value = "$disk_partition$"
1393                         order = 1
1394                 }
1395                 "-x" = {
1396                         value = "$disk_partitions_excluded$"
1397                         description = "Ignore device (only works if -p unspecified)"
1398                 }
1399                 "-x_old" = {
1400                         key = "-x"
1401                         value = "$disk_partition_excluded$"
1402                 }
1403                 "-C" = {
1404                         set_if = "$disk_clear$"
1405                         description = "Clear thresholds"
1406                 }
1407                 "-E" = {
1408                         set_if = "$disk_exact_match$"
1409                         description = "For paths or partitions specified with -p, only check for exact paths"
1410                 }
1411                 "-e" = {
1412                         set_if = "$disk_errors_only$"
1413                         description = "Display only devices/mountpoints with errors"
1414                 }
1415                 "-f" = {
1416                         set_if = "$disk_ignore_reserved$"
1417                         description = "Don't account root-reserved blocks into freespace in perfdata"
1418                 }
1419                 "-g" = {
1420                         value = "$disk_group$"
1421                         description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1422                 }
1423                 "-k" = {
1424                         set_if = "$disk_kilobytes$"
1425                         description = "Same as --units kB"
1426                 }
1427                 "-l" = {
1428                         set_if = "$disk_local$"
1429                         description = " Only check local filesystems"
1430                 }
1431                 "-L" = {
1432                         set_if = "$disk_stat_remote_fs$"
1433                         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)"
1434                 }
1435                 "-M" = {
1436                         set_if = "$disk_mountpoint$"
1437                         description = "Display the mountpoint instead of the partition"
1438                 }
1439                 "-m" = {
1440                         set_if = "$disk_megabytes$"
1441                         description = "Same as --units MB"
1442                 }
1443                 "-A" = {
1444                         set_if = "$disk_all$"
1445                         description = "Explicitly select all paths. This is equivalent to -R .*"
1446                 }
1447                 "-R" = {
1448                         value = "$disk_eregi_path$"
1449                         description = "Case insensitive regular expression for path/partition (may be repeated)"
1450                         repeat_key = true
1451                 }
1452                 "-r" = {
1453                         value = "$disk_ereg_path$"
1454                         description = "Regular expression for path or partition (may be repeated)"
1455                         repeat_key = true
1456                 }
1457                 "-I" = {
1458                         value = "$disk_ignore_eregi_path$"
1459                         description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1460                         repeat_key = true
1461                         order = 2
1462                 }
1463                 "-i" = {
1464                         value = "$disk_ignore_ereg_path$"
1465                         description = "Regular expression to ignore selected path or partition (may be repeated)"
1466                         repeat_key = true
1467                         order = 2
1468                 }
1469                 "-t" = {
1470                         value = "$disk_timeout$"
1471                         description = "Seconds before connection times out (default: 10)"
1472                 }
1473                 "-u" = {
1474                         value = "$disk_units$"
1475                         description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1476                 }
1477                 "-X" = {
1478                         value = "$disk_exclude_type$"
1479                         description = "Ignore all filesystems of indicated type (may be repeated)"
1480                         repeat_key = true
1481                 }
1482         }
1483
1484         vars.disk_wfree = "20%"
1485         vars.disk_cfree = "10%"
1486         vars.disk_megabytes = true
1487         vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "configfs", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ]
1488 }
1489
1490 object CheckCommand "disk_smb" {
1491         command = [ PluginDir + "/check_disk_smb" ]
1492
1493         arguments = {
1494                 "-H" = {
1495                         value = "$disk_smb_hostname$"
1496                         description = "NetBIOS name of the server."
1497                 }
1498                 "-s" = {
1499                         value = "$disk_smb_share$"
1500                         description = "Share name to be tested."
1501                 }
1502                 "-W" = {
1503                         value = "$disk_smb_workgroup$"
1504                         description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1505                 }
1506                 "-a" = {
1507                         value = "$disk_smb_address$"
1508                         description = "IP-address of HOST (only necessary if HOST is in another network)."
1509                 }
1510                 "-u" = {
1511                         value = "$disk_smb_username$"
1512                         description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1513                 }
1514                 "-p" = {
1515                         value = "$disk_smb_password$"
1516                         description = "Password to log in to server. (Defaults to an empty password if omitted)."
1517                 }
1518                 "-w" = {
1519                         value = "$disk_smb_wused$"
1520                         description = "Percent of used space at which a warning will be generated (Default: 85%)."
1521                 }
1522                 "-c" = {
1523                         value = "$disk_smb_cused$"
1524                         description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1525                 }
1526                 "-P" = {
1527                         value = "$disk_smb_port$"
1528                         description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1529                 }
1530         }
1531
1532         vars.disk_smb_wused = "85%"
1533         vars.disk_smb_cused = "95%"
1534 }
1535
1536 object CheckCommand "users" {
1537         command = [ PluginDir + "/check_users" ]
1538
1539         arguments = {
1540                 "-w" = {
1541                         value = "$users_wgreater$"
1542                         description = "Set WARNING status if more than INTEGER users are logged in"
1543                 }
1544                 "-c" = {
1545                         value = "$users_cgreater$"
1546                         description = "Set CRITICAL status if more than INTEGER users are logged in"
1547                 }
1548         }
1549
1550         vars.users_wgreater = 20
1551         vars.users_cgreater = 50
1552 }
1553
1554 object CheckCommand "procs" {
1555         command = [ PluginDir + "/check_procs" ]
1556
1557         arguments = {
1558                 "-w" = {
1559                         value = "$procs_warning$"
1560                         description = "Generate warning state if metric is outside this range"
1561                 }
1562                 "-c" = {
1563                         value = "$procs_critical$"
1564                         description = "Generate critical state if metric is outside this range"
1565                 }
1566                 "-m" = {
1567                         value = "$procs_metric$"
1568                         description = "Check thresholds against metric"
1569                 }
1570                 "-t" = {
1571                         value = "$procs_timeout$"
1572                         description = "Seconds before plugin times out"
1573                 }
1574                 "-T" = {
1575                         set_if = "$procs_traditional$"
1576                         description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1577                 }
1578                 "-s" = {
1579                         value = "$procs_state$"
1580                         description = "Only scan for processes that have one or more of the status flags you specify"
1581                 }
1582                 "-p" = {
1583                         value = "$procs_ppid$"
1584                         description = "Only scan for children of the parent process ID indicated"
1585                 }
1586                 "-z" = {
1587                         value = "$procs_vsz$"
1588                         description = "Only scan for processes with VSZ higher than indicated"
1589                 }
1590                 "-r" = {
1591                         value = "$procs_rss$"
1592                         description = "Only scan for processes with RSS higher than indicated"
1593                 }
1594                 "-P" = {
1595                         value = "$procs_pcpu$"
1596                         description = "Only scan for processes with PCPU higher than indicated"
1597                 }
1598                 "-u" = {
1599                         value = "$procs_user$"
1600                         description = "Only scan for processes with user name or ID indicated"
1601                 }
1602                 "-a" = {
1603                         value = "$procs_argument$"
1604                         description = "Only scan for processes with args that contain STRING"
1605                 }
1606                 "--ereg-argument-array" = {
1607                         value = "$procs_argument_regex$"
1608                         description = "Only scan for processes with args that contain the regex STRING"
1609                 }
1610                 "-C" = {
1611                         value = "$procs_command$"
1612                         description = "Only scan for exact matches of COMMAND (without path)"
1613                 }
1614                 "-k" = {
1615                         set_if = "$procs_nokthreads$"
1616                         description = "Only scan for non kernel threads"
1617                 }
1618         }
1619
1620         vars.procs_traditional = false
1621         vars.procs_nokthreads = false
1622         vars.procs_warning = 250
1623         vars.procs_critical = 400
1624 }
1625
1626 object CheckCommand "swap" {
1627         command = [ PluginDir + "/check_swap" ]
1628
1629         arguments = {
1630                 "-w" = {{
1631                         if (macro("$swap_integer$")) {
1632                                 return macro("$swap_wfree$")
1633                         } else {
1634                                 return macro("$swap_wfree$%")
1635                         }
1636                 }}
1637                 "-c" = {{
1638                         if (macro("$swap_integer$")) {
1639                                 return macro("$swap_cfree$")
1640                         } else {
1641                                 return macro("$swap_cfree$%")
1642                         }
1643                 }}
1644                 "-a" = {
1645                         set_if = "$swap_allswaps$"
1646                         description = "Conduct comparisons for all swap partitions, one by one"
1647                 }
1648                 "-n" = {
1649                         value = "$swap_noswap$"
1650                         description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1651                 }
1652         }
1653
1654         vars.swap_wfree = 50
1655         vars.swap_cfree = 25
1656         vars.swap_integer = false
1657         vars.swap_allswaps = false
1658 }
1659
1660 object CheckCommand "load" {
1661         command = [ PluginDir + "/check_load" ]
1662
1663         arguments = {
1664                 "-w" = {
1665                         value = "$load_wload1$,$load_wload5$,$load_wload15$"
1666                         description = "Exit with WARNING status if load average exceeds WLOADn"
1667                 }
1668                 "-c" = {
1669                         value = "$load_cload1$,$load_cload5$,$load_cload15$"
1670                         description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1671                 }
1672                 "-r" = {
1673                         set_if = "$load_percpu$"
1674                         description = "Divide the load averages by the number of CPUs (when possible)"
1675                 }
1676         }
1677
1678         vars.load_wload1 = 5.0
1679         vars.load_wload5 = 4.0
1680         vars.load_wload15 = 3.0
1681
1682         vars.load_cload1 = 10.0
1683         vars.load_cload5 = 6.0
1684         vars.load_cload15 = 4.0
1685
1686         vars.load_percpu = false
1687 }
1688
1689 object CheckCommand "snmp" {
1690         command = [ PluginDir + "/check_snmp" ]
1691
1692         arguments = {
1693                 "-H" = {
1694                         value = "$snmp_address$"
1695                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1696                 }
1697                 "-o" = {
1698                         value = "$snmp_oid$"
1699                         description = "Object identifier(s) or SNMP variables whose value you wish to query"
1700                 }
1701                 "-C" = {
1702                         value = "$snmp_community$"
1703                         description = "Optional community string for SNMP communication (default is 'public')"
1704                 }
1705                 "-c" = {
1706                         value = "$snmp_crit$"
1707                         description = "Critical threshold range(s)"
1708                 }
1709                 "-w" = {
1710                         value = "$snmp_warn$"
1711                         description = "Warning threshold range(s)"
1712                 }
1713                 "-s" = {
1714                         value = "$snmp_string$"
1715                         description = "Return OK state (for that OID) if STRING is an exact match"
1716                 }
1717                 "-r" = {
1718                         value = "$snmp_ereg$"
1719                         description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1720                 }
1721                 "-R" = {
1722                         value = "$snmp_eregi$"
1723                         description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1724                 }
1725                 "-l" = {
1726                         value = "$snmp_label$"
1727                         description = "Prefix label for output from plugin"
1728                 }
1729                 "-u" = {
1730                         value = "$snmp_units$"
1731                         description = "Units label(s) for output data (e.g., 'sec.')"
1732                 }
1733                 "-t" = {
1734                         value = "$snmp_timeout$"
1735                         description = "Seconds before connection times out (default: 10)"
1736                 }
1737                 "-p" = {
1738                         value = "$snmp_port$"
1739                         description = "Port number (default: 161)"
1740                 }
1741                 "-e" = {
1742                         value = "$snmp_retries$"
1743                         description = "Number of retries to be used in the requests"
1744                 }
1745                 "--invert-search" = {
1746                         set_if = "$snmp_invert_search$"
1747                         description = "Invert search result and return CRITICAL if found"
1748                 }
1749                 "-P" = {
1750                         value = "$snmp_version$"
1751                         description = "SNMP protocol version"
1752                 }
1753                 "-m" = {
1754                         value = "$snmp_miblist$"
1755                         description = "List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL' for symbolic OIDs.)"
1756                 }
1757                 "--rate-multiplier" = {
1758                         value = "$snmp_rate_multiplier$"
1759                         description = "Converts rate per second. For example, set to 60 to convert to per minute"
1760                 }
1761                 "--rate" = {
1762                         set_if = "$snmp_rate$"
1763                         description = "Enable rate calculation"
1764                 }
1765                 "-n" = {
1766                         set_if = "$snmp_getnext$"
1767                         description = "Use SNMP GETNEXT instead of SNMP GET"
1768                 }
1769                 "--offset" = {
1770                         value = "$snmp_offset$"
1771                         description = "Add/substract the specified OFFSET to numeric sensor data"
1772                 }
1773                 "-D" = {
1774                         value = "$snmp_output_delimiter$"
1775                         description = "Separates output on multiple OID requests"
1776                 }
1777                 "-O" = {
1778                         set_if = "$snmp_perf_oids$"
1779                         description = "Label performance data with OIDs instead of --label's"
1780                 }
1781         }
1782
1783         vars.snmp_address = {{
1784                 var addr_v4 = macro("$address$")
1785                 var addr_v6 = macro("$address6$")
1786
1787                 if (addr_v4) {
1788                         return addr_v4
1789                 } else {
1790                         return "udp6:[" + addr_v6 + "]"
1791                 }
1792         }}
1793
1794         vars.snmp_community = "public"
1795         vars.snmp_invert_search = false
1796         vars.snmp_timeout = "10"
1797 }
1798
1799 object CheckCommand "snmpv3" {
1800         import "ipv4-or-ipv6"
1801
1802         command = [ PluginDir + "/check_snmp" ]
1803
1804         arguments = {
1805                 "-H" = {
1806                         value = "$snmpv3_address$"
1807                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1808                 }
1809                 "-p" = {
1810                         value = "$snmpv3_port$"
1811                         description = "Port number"
1812                 }
1813                 "-n" = {
1814                         set_if = "$snmpv3_getnext$"
1815                         description = "Use SNMP GETNEXT instead of SNMP GET"
1816                 }
1817                 "-P" = {
1818                         value = 3
1819                         description = "SNMP protocol version"
1820                 }
1821                 "-L" = {
1822                         value = "$snmpv3_seclevel$"
1823                         description = "SNMPv3 securityLevel"
1824                 }
1825                 "-a" = {
1826                         value = "$snmpv3_auth_alg$"
1827                         description = "SNMPv3 auth proto"
1828                 }
1829                 "-U" = {
1830                         value = "$snmpv3_user$"
1831                         description = "SNMPv3 username"
1832                 }
1833                 "-A" = {
1834                         value = "$snmpv3_auth_key$"
1835                         description = "SNMPv3 authentication password"
1836                 }
1837                 "-X" = {
1838                         value = "$snmpv3_priv_key$"
1839                         description = "SNMPv3 privacy password"
1840                 }
1841                 "-o" = {
1842                         value = "$snmpv3_oid$"
1843                         description = "Object identifier(s) or SNMP variables whose value you wish to query"
1844                 }
1845                 "-x" = {
1846                         value = "$snmpv3_priv_alg$"
1847                         description = "SNMPv3 priv proto (default DES)"
1848                 }
1849                 "-w" = {
1850                         value = "$snmpv3_warn$"
1851                         description = "Warning threshold range(s)"
1852                 }
1853                 "-c" = {
1854                         value = "$snmpv3_crit$"
1855                         description = "Critical threshold range(s)"
1856                 }
1857                 "-s" = {
1858                         value = "$snmpv3_string$"
1859                         description = "Return OK state (for that OID) if STRING is an exact match"
1860                 }
1861                 "-r" = {
1862                         value = "$snmpv3_ereg$"
1863                         description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1864                 }
1865                 "-R" = {
1866                         value = "$snmpv3_eregi$"
1867                         description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1868                 }
1869                 "--invert-search" = {
1870                         set_if = "$snmpv3_invert_search$"
1871                         description = "Invert search result and return CRITICAL if found"
1872                 }
1873                 "-l" = {
1874                         value = "$snmpv3_label$"
1875                         description = "Prefix label for output from plugin"
1876                 }
1877                 "-m" = {
1878                         value = "$snmpv3_miblist$"
1879                         description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1880                 }
1881                 "-u" = {
1882                         value = "$snmpv3_units$"
1883                         description = "Units label(s) for output data (e.g., 'sec.')"
1884                 }
1885                 "--rate-multiplier" = {
1886                         value = "$snmpv3_rate_multiplier$"
1887                         description = "Converts rate per second. For example, set to 60 to convert to per minute"
1888                 }
1889                 "--rate" = {
1890                         set_if = "$snmpv3_rate$"
1891                         description = "Enable rate calculation"
1892                 }
1893                 "-t" = {
1894                         value = "$snmpv3_timeout$"
1895                         description = "Seconds before connection times out (default: 10)"
1896                 }
1897         }
1898
1899         vars.snmpv3_address = "$check_address$"
1900         vars.snmpv3_auth_alg = "SHA"
1901         vars.snmpv3_priv_alg = "AES"
1902         vars.snmpv3_seclevel = "authPriv"
1903         vars.snmpv3_timeout = "10"
1904 }
1905
1906 object CheckCommand "snmp-uptime" {
1907         import "snmp"
1908
1909         vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1910 }
1911
1912 object CheckCommand "apt" {
1913         command = [ PluginDir + "/check_apt" ]
1914
1915         arguments = {
1916                 "--extra-opts" = {
1917                         value = "$apt_extra_opts$"
1918                         description = "Read options from an ini file."
1919                 }
1920                 "--upgrade" = {
1921                         value = "$apt_upgrade$"
1922                         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."
1923                 }
1924                 "--dist-upgrade" = {
1925                         value = "$apt_dist_upgrade$"
1926                         description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1927                 }
1928                 "--include" = {
1929                         value = "$apt_include$"
1930                         description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1931                 }
1932                 "--exclude" = {
1933                         value = "$apt_exclude$"
1934                         description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1935                 }
1936                 "--critical" = {
1937                         value = "$apt_critical$"
1938                         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."
1939                 }
1940                 "--timeout" = {
1941                         value = "$apt_timeout$"
1942                         description = "Seconds before plugin times out (default: 10)."
1943                 }
1944                 "--only-critical" = {
1945                         set_if = "$apt_only_critical$"
1946                         description = "Only warn about critical upgrades."
1947                 }
1948         }
1949
1950         timeout = 5m
1951 }
1952
1953 object CheckCommand "dhcp" {
1954         command = [ PluginDir + "/check_dhcp" ]
1955
1956         arguments = {
1957                 "-s" = {
1958                         value = "$dhcp_serverip$"
1959                         description = "IP address of DHCP server that we must hear from"
1960                 }
1961                 "-r" = {
1962                         value = "$dhcp_requestedip$"
1963                         description = "IP address that should be offered by at least one DHCP server"
1964                 }
1965                 "-t" = {
1966                         value = "$dhcp_timeout$"
1967                         description = "Seconds to wait for DHCPOFFER before timeout occurs"
1968                 }
1969                 "-i" = {
1970                         value = "$dhcp_interface$"
1971                         description = "Interface to to use for listening (i.e. eth0)"
1972                 }
1973                 "-m" = {
1974                         value = "$dhcp_mac$"
1975                         description = "MAC address to use in the DHCP request"
1976                 }
1977                 "-u" = {
1978                         set_if = "$dhcp_unicast$"
1979                         description = "Unicast testing: mimic a DHCP relay"
1980                 }
1981         }
1982
1983         vars.dhcp_unicast = false
1984 }
1985
1986 object CheckCommand "dns" {
1987         import "ipv4-or-ipv6"
1988
1989         command = [ PluginDir + "/check_dns" ]
1990
1991         arguments = {
1992                 "-H" = {
1993                         value = "$dns_lookup$"
1994                         description = "The name or address you want to query."
1995                 }
1996                 "-s" = {
1997                         value = "$dns_server$"
1998                         description = "Optional DNS server you want to use for the lookup."
1999                 }
2000                 "-q" = {
2001                         value = "$dns_query_type$"
2002                         description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
2003                 }
2004                 "-a" = {
2005                         value = "$dns_expected_answers$"
2006                         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)."
2007                 }
2008                 "-A" = {
2009                         set_if = "$dns_authoritative$"
2010                         description = "Optionally expect the DNS server to be authoritative for the lookup"
2011                 }
2012                 "-n" = {
2013                         set_if = "$dns_accept_cname$"
2014                         description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
2015                 }
2016                 "-w" = {
2017                         value = "$dns_wtime$"
2018                         description = "Return warning if elapsed time exceeds value."
2019                 }
2020                 "-c" = {
2021                         value = "$dns_ctime$"
2022                         description = "Return critical if elapsed time exceeds value."
2023                 }
2024                 "-t" = {
2025                         value = "$dns_timeout$"
2026                         description = "Seconds before connection times out. Defaults to 10."
2027                 }
2028         }
2029
2030         vars.dns_lookup = "$host.name$"
2031         vars.dns_timeout = 10
2032 }
2033
2034 object CheckCommand "dig" {
2035         import "ipv4-or-ipv6"
2036
2037         command = [ PluginDir + "/check_dig" ]
2038
2039         arguments = {
2040                 "-H" = {
2041                         value = "$dig_server$"
2042                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2043                 }
2044                 "-p" = {
2045                         value = "$dig_port$"
2046                         description = "Port number (default: 53)"
2047                 }
2048                 "-l" = {
2049                         value = "$dig_lookup$"
2050                         required = true
2051                         description = "Machine name to lookup"
2052                 }
2053                 "-T" = {
2054                         value = "$dig_record_type$"
2055                         description = "Record type to lookup (default: A)"
2056                 }
2057                 "-a" = {
2058                         value = "$dig_expected_address$"
2059                         description = "An address expected to be in the answer section"
2060                 }
2061                 "-A" = {
2062                         value = "$dig_arguments$"
2063                         description = "Pass STRING as argument(s) to dig"
2064                 }
2065                 "-w" = {
2066                         value = "$dig_warning$"
2067                         description = "Response time to result in warning status (seconds)"
2068                 }
2069                 "-c" = {
2070                         value = "$dig_critical$"
2071                         description = "Response time to result in critical status (seconds)"
2072                 }
2073                 "-t" = {
2074                         value = "$dig_timeout$"
2075                         description = "Seconds before connection times out (default: 10)"
2076                 }
2077                 "-4" = {
2078                         set_if = "$dig_ipv4$"
2079                         description = "Force dig to only use IPv4 query transport"
2080                 }
2081                 "-6" = {
2082                         set_if = "$dig_ipv6$"
2083                         description = "Force dig to only use IPv6 query transport"
2084                 }
2085         }
2086
2087         vars.dig_server = "$check_address$"
2088         vars.check_ipv4 = "$dig_ipv4$"
2089         vars.check_ipv6 = "$dig_ipv6$"
2090 }
2091
2092 object CheckCommand "nscp" {
2093         import "ipv4-or-ipv6"
2094
2095         command = [ PluginDir + "/check_nt" ]
2096
2097         arguments = {
2098                 "-H" = {
2099                         value = "$nscp_address$"
2100                         description = "Name of the host to check"
2101                 }
2102                 "-p" = {
2103                         value = "$nscp_port$"
2104                         description = "Optional port number (default: 1248)"
2105                 }
2106                 "-s" = {
2107                         value = "$nscp_password$"
2108                         description = "Password needed for the request"
2109                 }
2110                 "-v" = {
2111                         value = "$nscp_variable$"
2112                         required = true
2113                         description = "Variable to check"
2114                 }
2115                 "-l" = {
2116                         value = "$nscp_params$"
2117                         repeat_key = false
2118                 }
2119                 "-w" = {
2120                         value = "$nscp_warn$"
2121                         description = "Threshold which will result in a warning status"
2122                 }
2123                 "-c" = {
2124                         value = "$nscp_crit$"
2125                         description = "Threshold which will result in a critical status"
2126                 }
2127                 "-t" = {
2128                         value = "$nscp_timeout$"
2129                         description = "Seconds before connection attempt times out"
2130                 }
2131                 "-d" = {
2132                         value = "SHOWALL"
2133                         set_if = "$nscp_showall$"
2134                         description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
2135                 }
2136         }
2137
2138         vars.nscp_address = "$check_address$"
2139         vars.nscp_port = 12489
2140         vars.nscp_showall = false
2141 }
2142
2143 object CheckCommand "by_ssh" {
2144         import "ipv4-or-ipv6"
2145
2146         command = [ PluginDir + "/check_by_ssh" ]
2147
2148         arguments = {
2149                 "-H" = {
2150                         value = "$by_ssh_address$"
2151                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2152                 }
2153                 "-p" = {
2154                         value = "$by_ssh_port$"
2155                         description = "Port number (default: none)"
2156                 }
2157                 "-C" = {{
2158                         var command = macro("$by_ssh_command$")
2159                         var arguments = macro("$by_ssh_arguments$")
2160
2161                         if (typeof(command) == String && !arguments) {
2162                                 return command
2163                         }
2164
2165                         var escaped_args = []
2166                         for (arg in resolve_arguments(command, arguments)) {
2167                                 escaped_args.add(escape_shell_arg(arg))
2168                         }
2169                         return escaped_args.join(" ")
2170                 }}
2171                 "-l" = {
2172                         value = "$by_ssh_logname$"
2173                         description = "SSH user name on remote host [optional]"
2174                 }
2175                 "-i" = {
2176                         value = "$by_ssh_identity$"
2177                         description = "identity of an authorized key [optional]"
2178                 }
2179                 "-q" = {
2180                         set_if = "$by_ssh_quiet$"
2181                         description = "Tell ssh to suppress warning and diagnostic messages [optional]"
2182                 }
2183                 "-w" = {
2184                         value = "$by_ssh_warn$"
2185                         description = "Response time to result in warning status (seconds)"
2186                 }
2187                 "-c" = {
2188                         value = "$by_ssh_crit$"
2189                         description = "Response time to result in critical status (seconds)"
2190                 }
2191                 "-t" = {
2192                         value = "$by_ssh_timeout$"
2193                         description = "Seconds before connection times out (default: 10)"
2194                 }
2195                 "-o" = {
2196                         value = "$by_ssh_options$"
2197                         description = "Provide ssh options (may be repeated)"
2198                 }
2199                 "-4" = {
2200                         set_if = "$by_ssh_ipv4$"
2201                         description = "Use IPv4 only"
2202                 }
2203                 "-6" = {
2204                         set_if = "$by_ssh_ipv6$"
2205                         description = "Use IPv6 only"
2206                 }
2207         }
2208
2209         vars.by_ssh_address = "$check_address$"
2210         vars.by_ssh_quiet = false
2211         vars.check_ipv4 = "$by_ssh_ipv4$"
2212         vars.check_ipv6 = "$by_ssh_ipv6$"
2213 }
2214
2215 object CheckCommand "ups" {
2216         import "ipv4-or-ipv6"
2217
2218         command = [ PluginDir + "/check_ups" ]
2219
2220         arguments = {
2221                 "-H" = {
2222                         value = "$ups_address$"
2223                         description = "Address of the upsd server"
2224                         required = true
2225                 }
2226                 "-u" = {
2227                         value = "$ups_name$"
2228                         description = "Name of the UPS to monitor"
2229                         required = true
2230                 }
2231                 "-p" = {
2232                         value = "$ups_port$"
2233                         description = "Port number (default: 3493)"
2234                 }
2235                 "-v" = {
2236                         value = "$ups_variable$"
2237                         description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
2238                 }
2239                 "-w" = {
2240                         value = "$ups_warning$"
2241                         description = "Warning threshold for the selected variable"
2242                 }
2243                 "-c" = {
2244                         value = "$ups_critical$"
2245                         description = "Critical threshold for the selected variable"
2246                 }
2247                 "-T" = {
2248                         set_if = "$ups_celsius$"
2249                         description = "Display temperature in degrees Celsius instead of Fahrenheit"
2250                 }
2251                 "-t" = {
2252                         value = "$ups_timeout$"
2253                         description = "Seconds before the connection times out (default: 10)"
2254                 }
2255         }
2256
2257         vars.ups_address = "$check_address$"
2258         vars.ups_name = "ups"
2259 }
2260
2261 object CheckCommand "nrpe" {
2262         import "ipv4-or-ipv6"
2263
2264         command = [ PluginDir + "/check_nrpe" ]
2265
2266         arguments = {
2267                 "-H" = {
2268                         value = "$nrpe_address$"
2269                         description = "The address of the host running the NRPE daemon"
2270                 }
2271                 "-p" = {
2272                         value = "$nrpe_port$"
2273                 }
2274                 "-c" = {
2275                         value = "$nrpe_command$"
2276                 }
2277                 "-n" = {
2278                         set_if = "$nrpe_no_ssl$"
2279                         description = "Do not use SSL"
2280                 }
2281                 "-u" = {
2282                         set_if = "$nrpe_timeout_unknown$"
2283                         description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
2284                 }
2285                 "-t" = {
2286                         value = "$nrpe_timeout$"
2287                         description = "<interval>:<state> = <Number of seconds before connection times out>:<Check state to exit with in the event of a timeout (default=CRITICAL)>"
2288                 }
2289                 "-a" = {
2290                         value = "$nrpe_arguments$"
2291                         repeat_key = false
2292                         order = 1
2293                 }
2294                 "-4" = {
2295                         set_if = "$nrpe_ipv4$"
2296                         description = "Use IPv4 connection"
2297                 }
2298                 "-6" = {
2299                         set_if = "$nrpe_ipv6$"
2300                         description = "Use IPv6 connection"
2301                 }
2302                 "-2" = {
2303                         set_if = "$nrpe_version_2$"
2304                         description = "Use this if you want to connect to NRPE v2"
2305                 }
2306         }
2307
2308         vars.nrpe_address = "$check_address$"
2309         vars.nrpe_no_ssl = false
2310         vars.nrpe_timeout_unknown = false
2311         vars.check_ipv4 = "$nrpe_ipv4$"
2312         vars.check_ipv6 = "$nrpe_ipv6$"
2313         vars.nrpe_version_2 = false
2314         timeout = 5m
2315 }
2316
2317 object CheckCommand "hpjd" {
2318         import "ipv4-or-ipv6"
2319
2320         command = [ PluginDir + "/check_hpjd" ]
2321
2322         arguments = {
2323                 "-H" = {
2324                         value = "$hpjd_address$"
2325                         description = "Host address"
2326                 }
2327                 "-C" = {
2328                         value = "$hpjd_community$"
2329                         description = "The SNMP community name (default=public)"
2330                 }
2331                 "-p" = {
2332                         value = "$hpjd_port$"
2333                         description = "Specify the port to check (default=161)"
2334                 }
2335         }
2336
2337         vars.hpjd_address = "$check_address$"
2338 }
2339
2340 object CheckCommand "icmp" {
2341         command = [ PluginDir + "/check_icmp" ]
2342
2343         arguments = {
2344                 "-H" = {
2345                         value = "$icmp_address$"
2346                         repeat_key = false
2347                         order = 1
2348                         description = "Host address"
2349                 }
2350                 "-w" = {
2351                         value = "$icmp_wrta$,$icmp_wpl$%"
2352                         description = "warning threshold (currently 200.000ms,40%)"
2353                 }
2354                 "-c" = {
2355                         value = "$icmp_crta$,$icmp_cpl$%"
2356                         description = "critical threshold (currently 500.000ms,80%)"
2357                 }
2358                 "-s" = {
2359                         value = "$icmp_source$"
2360                         description = "specify a source IP address or device name"
2361                 }
2362                 "-n" = {
2363                         value = "$icmp_packets$"
2364                         description = "number of packets to send (currently 5)"
2365                 }
2366                 "-i" = {
2367                         value = "$icmp_packet_interval$"
2368                         description = "max packet interval (currently 80.000ms)"
2369                 }
2370                 "-I" = {
2371                         value = "$icmp_target_interval$"
2372                         description = "max target interval (currently 0.000ms)"
2373                 }
2374                 "-m" = {
2375                         value = "$icmp_hosts_alive$"
2376                         description = "number of alive hosts required for success"
2377                 }
2378                 "-b" = {
2379                         value = "$icmp_data_bytes$"
2380                         description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
2381                 }
2382                 "-t" = {
2383                         value = "$icmp_timeout$"
2384                         description = "timeout value (seconds, currently  10)"
2385                 }
2386                 "-l" = {
2387                         value = "$icmp_ttl$"
2388                         description = "TTL on outgoing packets (currently 0)"
2389                 }
2390         }
2391
2392         vars.icmp_address = "$address$"
2393         vars.icmp_wrta = 100
2394         vars.icmp_wpl = 5
2395         vars.icmp_crta = 200
2396         vars.icmp_cpl = 15
2397 }
2398
2399 object CheckCommand "ldap" {
2400         import "ipv4-or-ipv6"
2401
2402         command = [ PluginDir + "/check_ldap" ]
2403
2404         arguments = {
2405                 "-H" = {
2406                         value = "$ldap_address$"
2407                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2408                 }
2409                 "-p" = {
2410                         value = "$ldap_port$"
2411                         description = "Port number (default: 389)"
2412                 }
2413                 "-a" = {
2414                         value = "$ldap_attr$"
2415                         description = "ldap attribute to search (default: \"(objectclass=*)\""
2416                 }
2417                 "-b" = {
2418                         value = "$ldap_base$"
2419                         required = true
2420                         description = "ldap base (eg. ou=my unit, o=my org, c=at"
2421                 }
2422                 "-D" = {
2423                         value = "$ldap_bind$"
2424                         description = "ldap bind DN (if required)"
2425                 }
2426                 "-P" = {
2427                         value = "$ldap_pass$"
2428                         description = "ldap password (if required)"
2429                 }
2430                 "-T" = {
2431                         set_if = "$ldap_starttls$"
2432                         description = "use starttls mechanism introduced in protocol version 3"
2433                 }
2434                 "-S" = {
2435                         set_if = "$ldap_ssl$"
2436                         description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
2437                 }
2438                 "-2" = {
2439                         set_if = "$ldap_v2$"
2440                         description = "Use LDAP protocol version 2"
2441                 }
2442                 "-3" = {
2443                         set_if = "$ldap_v3$"
2444                         description = "Use LDAP protocol version 3"
2445                 }
2446                 "-w" = {
2447                         value = "$ldap_warning$"
2448                         description = "Response time to result in warning status (seconds)"
2449                 }
2450                 "-c" = {
2451                         value = "$ldap_critical$"
2452                         description = "Response time to result in critical status (seconds)"
2453                 }
2454                 "-W" = {
2455                         value = "$ldap_warning_entries$"
2456                         description = "Number of found entries to result in warning status (optional)"
2457                 }
2458                 "-C" = {
2459                         value = "$ldap_critical_entries$"
2460                         description = "Number of found entries to result in critical status (optional)"
2461                 }
2462                 "-t" = {
2463                         value = "$ldap_timeout$"
2464                         description = "Seconds before connection times out (default: 10)"
2465                 }
2466                 "-v" = {
2467                         set_if = "$ldap_verbose$"
2468                         description = "Show details for command-line debugging"
2469                 }
2470         }
2471
2472         vars.ldap_address = "$check_address$"
2473         vars.ldap_v2 = true
2474         vars.ldap_v3 = false
2475         vars.ldap_timeout = 10s
2476         vars.ldap_verbose = false
2477 }
2478
2479 object CheckCommand "clamd" {
2480         command = [ PluginDir + "/check_clamd" ]
2481
2482         arguments = {
2483                 "-H" = {
2484                         value = "$clamd_address$"
2485                         description = "The host's address or unix socket (must be an absolute path)."
2486                         required = true
2487                 }
2488                 "-p" = {
2489                         value = "$clamd_port$"
2490                         description = "Port number (default: none)."
2491                 }
2492                 "-e" = {
2493                         value = "$clamd_expect$"
2494                         description = "String to expect in server response (may be repeated)."
2495                         repeat_key = true
2496                 }
2497                 "-A" = {
2498                         set_if = "$clamd_all$"
2499                         description = "All expect strings need to occur in server response. Default is any."
2500                 }
2501                 "-E_send" = {
2502                         key = "-E"
2503                         order = 1
2504                         set_if = "$clamd_escape_send$"
2505                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
2506                 }
2507                 "-s" = {
2508                         order = 2
2509                         value = "$clamd_send$"
2510                         description = "String to send to the server."
2511                 }
2512                 "-E_quit" = {
2513                         key = "-E"
2514                         order = 3
2515                         set_if = "$clamd_escape_quit$"
2516                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
2517                 }
2518                 "-q" = {
2519                         order = 4
2520                         value = "$clamd_quit$"
2521                         description = "String to send server to initiate a clean close of the connection."
2522                 }
2523                 "-r" = {
2524                         value = "$clamd_refuse$"
2525                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
2526                 }
2527                 "-M" = {
2528                         value = "$clamd_mismatch$"
2529                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
2530                 }
2531                 "-j" = {
2532                         set_if = "$clamd_jail$"
2533                         description = "Hide output from TCP socket."
2534                 }
2535                 "-m" = {
2536                         value = "$clamd_maxbytes$"
2537                         description = "Close connection once more than this number of bytes are received."
2538                 }
2539                 "-d" = {
2540                         value = "$clamd_delay$"
2541                         description = "Seconds to wait between sending string and polling for response."
2542                 }
2543                 "-D" = {
2544                         value = "$clamd_certificate$"
2545                         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."
2546                 }
2547                 "-S" = {
2548                         set_if = "$clamd_ssl$"
2549                         description = "Use SSL for the connection."
2550                 }
2551                 "-w" = {
2552                         value = "$clamd_wtime$"
2553                         description = "Response time to result in warning status (seconds)."
2554                 }
2555                 "-c" = {
2556                         value = "$clamd_ctime$"
2557                         description = "Response time to result in critical status (seconds)."
2558                 }
2559                 "-t" = {
2560                         value = "$clamd_timeout$"
2561                         description = "Seconds before connection times out. Defaults to 10."
2562                 }
2563                 "-4" = {
2564                         set_if = "$clamd_ipv4$"
2565                         description = "Use IPv4 only"
2566                 }
2567                 "-6" = {
2568                         set_if = "$clamd_ipv6$"
2569                         description = "Use IPv6 only"
2570                 }
2571         }
2572
2573         vars.clamd_ssl = false
2574         vars.clamd_refuse = "crit"
2575         vars.clamd_mismatch = "warn"
2576         vars.clamd_timeout = 10
2577         vars.check_ipv4 = "$clamd_ipv4$"
2578         vars.check_ipv6 = "$clamd_ipv6$"
2579 }
2580
2581 object CheckCommand "mailq" {
2582         command = [ PluginDir + "/check_mailq" ]
2583
2584         arguments = {
2585                 "-w" = {
2586                         value = "$mailq_warning$"
2587                         description = "Min. number of messages in queue to generate warning"
2588                         required = true
2589                 }
2590                 "-c" = {
2591                         value = "$mailq_critical$"
2592                         description = "Min. number of messages in queue to generate critical alert ( w < c )"
2593                         required = true
2594                 }
2595                 "-W" = {
2596                         value = "$mailq_domain_warning$"
2597                         description = "Min. number of messages for same domain in queue to generate warning"
2598                 }
2599                 "-C" = {
2600                         value = "$mailq_domain_critical$"
2601                         description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2602                 }
2603                 "-t" = {
2604                         value = "$mailq_timeout$"
2605                         description = "Plugin timeout in seconds (default = 15)"
2606                 }
2607                 "-M" = {
2608                         value = "$mailq_servertype$"
2609                         description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2610                 }
2611                 "-s" = {
2612                         set_if = "$mailq_sudo$"
2613                         description = "Use sudo for mailq command"
2614                 }
2615         }
2616 }
2617
2618 object CheckCommand "pgsql" {
2619         import "ipv4-or-ipv6"
2620
2621         command = [ PluginDir + "/check_pgsql" ]
2622
2623         arguments = {
2624                 "-H" = {
2625                         value = "$pgsql_hostname$"
2626                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2627                 }
2628                 "-P" = {
2629                         value = "$pgsql_port$"
2630                         description = "Port number (default: 5432)"
2631                 }
2632                 "-d" = {
2633                         value = "$pgsql_database$"
2634                         description = "Database to check (default: template1)"
2635                 }
2636                 "-l" = {
2637                         value = "$pgsql_username$"
2638                         description = "Login name of user"
2639                 }
2640                 "-p" = {
2641                         value = "$pgsql_password$"
2642                         description = "Password (BIG SECURITY ISSUE)"
2643                 }
2644                 "-o" = {
2645                         value = "$pgsql_options$"
2646                         description = "Connection parameters (keyword = value), see below"
2647                         }
2648                 "-w" = {
2649                         value = "$pgsql_warning$"
2650                         description = "Response time to result in warning status (seconds)"
2651                 }
2652                 "-c" = {
2653                         value = "$pgsql_critical$"
2654                         description = "Response time to result in critical status (seconds)"
2655                 }
2656                 "-t" = {
2657                         value = "$pgsql_timeout$"
2658                         description = "Seconds before connection times out (default: 10)"
2659                 }
2660                 "-q" = {
2661                         value = "$pgsql_query$"
2662                         description = "SQL query to run. Only first column in first row will be read"
2663                 }
2664                 "-W" = {
2665                         value = "$pgsql_query_warning$"
2666                         description = "SQL query value to result in warning status (double)"
2667                 }
2668                 "-C" = {
2669                         value = "$pgsql_query_critical$"
2670                         description = "SQL query value to result in critical status (double)"
2671                 }
2672         }
2673
2674         vars.pgsql_hostname = "$check_address$"
2675 }
2676
2677 object CheckCommand "mysql" {
2678         import "ipv4-or-ipv6"
2679
2680         command = [ PluginDir + "/check_mysql" ]
2681
2682         arguments = {
2683                 "-H" = {
2684                         value = "$mysql_hostname$"
2685                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2686                 }
2687                 "-P" = {
2688                         value = "$mysql_port$"
2689                         description = "Port number (default: 3306)"
2690                 }
2691                 "-n" = {
2692                         set_if = "$mysql_ignore_auth$"
2693                         description = "Ignore authentication failure and check for mysql connectivity only"
2694                 }
2695                 "-s" = {
2696                         value = "$mysql_socket$"
2697                         description = "Use the specified socket"
2698                 }
2699                 "-d" = {
2700                         value = "$mysql_database$"
2701                         description = "Check database with indicated name"
2702                 }
2703                 "-f" = {
2704                         value = "$mysql_file$"
2705                         description = "Read from the specified client options file"
2706                 }
2707                 "-g" = {
2708                         value = "$mysql_group$"
2709                         description = "Use a client options group"
2710                 }
2711                 "-u" = {
2712                         value = "$mysql_username$"
2713                         description = "Connect using the indicated username"
2714                 }
2715                 "-p" = {
2716                         value = "$mysql_password$"
2717                         description = "Use the indicated password to authenticate the connection"
2718                 }
2719                 "-S" = {
2720                         set_if = "$mysql_check_slave$"
2721                         description = "Check if the slave thread is running properly"
2722                 }
2723                 "-w" = {
2724                         value = "$mysql_warning$"
2725                         description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
2726                 }
2727                 "-c" = {
2728                         value = "$mysql_critical$"
2729                         description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
2730                 }
2731                 "-l" = {
2732                         set_if = "$mysql_ssl$"
2733                         description = "Use ssl encryptation"
2734                 }
2735                 "-C" = {
2736                         value = "$mysql_cacert$"
2737                         description = "Path to CA signing the cert"
2738                 }
2739                 "-a" = {
2740                         value = "$mysql_cert$"
2741                         description = "Path to SSL certificate"
2742                 }
2743                 "-k" = {
2744                         value = "$mysql_key$"
2745                         description = "Path to private SSL key"
2746                 }
2747                 "-D" = {
2748                         value = "$mysql_cadir$"
2749                         description = "Path to CA directory"
2750                 }
2751                 "-L" = {
2752                         value = "$mysql_ciphers$"
2753                         description = "List of valid SSL ciphers"
2754                 }
2755         }
2756
2757         vars.mysql_hostname = "$check_address$"
2758 }
2759
2760 object CheckCommand "negate" {
2761         command = [ PluginDir + "/negate" ]
2762
2763         arguments = {
2764                 "-t" = {
2765                         value = "$negate_timeout$"
2766                         description = "Seconds before plugin times out (default: 11)"
2767                 }
2768                 "-T" = {
2769                         value = "$negate_timeout_result$"
2770                         description = "Custom result on Negate timeouts"
2771                 }
2772                 "-o" = {
2773                         value = "$negate_ok$"
2774                 }
2775                 "-w" = {
2776                         value = "$negate_warning$"
2777                 }
2778                 "-c" = {
2779                         value = "$negate_critical$"
2780                 }
2781                 "-u" = {
2782                         value = "$negate_unknown$"
2783                 }
2784                 "-s" = {
2785                         set_if = "$negate_substitute$"
2786                         description = "Substitute output text as well. Will only substitute text in CAPITALS"
2787                 }
2788                 "--wrapped-plugin" = {
2789                         value = {{
2790                                 var command = macro("$negate_command$")
2791                                 var arguments = macro("$negate_arguments$")
2792
2793                                 if (typeof(command) == String && !arguments) {
2794                                         return command
2795                                 }
2796
2797                                 var escaped_args = []
2798                                 for (arg in resolve_arguments(command, arguments)) {
2799                                         escaped_args.add(arg)
2800                                 }
2801                                 return escaped_args.join(" ")
2802                         }}
2803                         skip_key = true
2804                         order = 1
2805                 }
2806         }
2807
2808         vars.negate_timeout_result = "UNKNOWN"
2809 }
2810
2811 object CheckCommand "file_age" {
2812         command = [ PluginDir + "/check_file_age" ]
2813
2814         arguments = {
2815                 "-w" = {
2816                         value = "$file_age_warning_time$"
2817                         description = "File must be no more than this many seconds old (default: 240s)"
2818                 }
2819                 "-c" = {
2820                         value = "$file_age_critical_time$"
2821                         description = "File must be no more than this many seconds old (default: 600s)"
2822                 }
2823                 "-W" = {
2824                         value = "$file_age_warning_size$"
2825                         description = "File must be at least this many bytes long"
2826                 }
2827                 "-C" = {
2828                         value = "$file_age_critical_size$"
2829                         description = "File must be at least this many bytes long (default: 0B)"
2830                 }
2831                 "-i" = {
2832                         set_if = "$file_age_ignoremissing$"
2833                         description = "return OK if the file does not exist"
2834                 }
2835                 "-f" = {
2836                         value = "$file_age_file$"
2837                         description = "File to monitor"
2838                 }
2839         }
2840
2841         vars.file_age_ignoremissing = false
2842 }
2843
2844 object CheckCommand "smart" {
2845         command = [ PluginDir + "/check_ide_smart" ]
2846
2847         arguments = {
2848                 "-d" = {
2849                         value = "$smart_device$"
2850                         description = "Name of a local hard drive to monitor"
2851                         required = true
2852                 }
2853         }
2854 }
2855
2856 object CheckCommand "breeze" {
2857         import "ipv4-or-ipv6"
2858
2859         command = [ PluginDir + "/check_breeze" ]
2860
2861         arguments = {
2862                 "-H" = {
2863                         value = "$breeze_hostname$"
2864                         description = "Name or IP address of host to check"
2865                         required = true
2866                 }
2867                 "-C" = {
2868                         value = "$breeze_community$"
2869                         description = "SNMPv1 community (default public)"
2870                 }
2871                 "-w" = {
2872                         value = "$breeze_warning$"
2873                         description = "Percentage strength below which a WARNING status will result"
2874                         required = true
2875                 }
2876                 "-c" = {
2877                         value = "$breeze_critical$"
2878                         description = "Percentage strength below which a CRITICAL status will result"
2879                         required = true
2880                 }
2881         }
2882
2883         vars.breeze_hostname = "$check_address$"
2884         vars.breeze_warning = "50"
2885         vars.breeze_critical = "20"
2886 }
2887
2888 object CheckCommand "flexlm" {
2889         command = [ PluginDir + "/check_flexlm" ]
2890
2891         arguments = {
2892                 "-F" = {
2893                         value = "$flexlm_licensefile$"
2894                         description = "Name of license file (usually license.dat)"
2895                         required = true
2896                 }
2897                 "-t" = {
2898                         value = "$flexlm_timeout$"
2899                         description = "Plugin time out in seconds (default = 15)"
2900                 }
2901         }
2902 }
2903
2904 object CheckCommand "game" {
2905         import "ipv4-or-ipv6"
2906
2907         command = [ PluginDir + "/check_game" ]
2908
2909         arguments = {
2910                 "-P" = {
2911                         value = "$game_port$"
2912                         description = "Port to connect to"
2913                 }
2914                 "-t" = {
2915                         value = "$game_timeout$"
2916                         description = "Seconds before connection times out (default: 10)"
2917                 }
2918                 "-g" = {
2919                         value = "$game_gamefield$"
2920                         description = "Field number in raw qstat output that contains game name"
2921                 }
2922                 "-m" = {
2923                         value = "$game_mapfield$"
2924                         description = "Field number in raw qstat output that contains map name"
2925                 }
2926                 "-p" = {
2927                         value = "$game_pingfield$"
2928                         description = "Field number in raw qstat output that contains ping time"
2929                 }
2930                 "-G" = {
2931                         value = "$game_gametime$"
2932                         description = "Field number in raw qstat output that contains game time"
2933                 }
2934                 "-H" = {
2935                         value = "$game_hostname$"
2936                         description = "Name of the host running the game"
2937                 }
2938                 "game" = {
2939                         value = "$game_game$"
2940                         description = "Name of the game"
2941                         order = 1
2942                         skip_key = true
2943                 }
2944                 "ipaddress" = {
2945                         value = "$game_ipaddress$"
2946                         description = "Ipaddress of the game server to query"
2947                         order = 2
2948                         skip_key = true
2949                 }
2950         }
2951 }
2952
2953 object CheckCommand "mysql_query" {
2954         import "ipv4-or-ipv6"
2955
2956         command = [ PluginDir + "/check_mysql_query" ]
2957
2958         arguments = {
2959                 "-H" = {
2960                         value = "$mysql_query_hostname$"
2961                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2962                 }
2963                 "-P" = {
2964                         value = "$mysql_query_port$"
2965                         description = "Port number (default: 3306)"
2966                 }
2967                 "-u" = {
2968                         value = "$mysql_query_username$"
2969                         description = "Username to login with"
2970                 }
2971                 "-p" = {
2972                         value = "$mysql_query_password$"
2973                         description = "Password to login with"
2974                 }
2975                 "-d" = {
2976                         value = "$mysql_query_database$"
2977                         description = "Database to check"
2978                 }
2979                 "-f" = {
2980                         value = "$mysql_query_file$"
2981                         description = "Read from the specified client options file"
2982                 }
2983                 "-g" = {
2984                         value = "$mysql_query_group$"
2985                         description = "Use a client options group"
2986                 }
2987                 "-q" = {
2988                         value = "$mysql_query_execute$"
2989                         description = "SQL query to run. Only first column in first row will be read"
2990                 }
2991                 "-w" = {
2992                         value = "$mysql_query_warning$"
2993                         description = "Warning range (format: start:end). Alert if outside this range"
2994                 }
2995                 "-c" = {
2996                         value = "$mysql_query_critical$"
2997                         description = "Critical range"
2998                 }
2999         }
3000
3001         vars.mysql_query_hostname = "$check_address$"
3002 }
3003
3004 object CheckCommand "radius" {
3005         import "ipv4-or-ipv6"
3006
3007         command = [
3008                 PluginDir + "/check_radius",
3009         ]
3010
3011         arguments = {
3012                 "-H" = {
3013                         value = "$radius_address$",
3014                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
3015                 }
3016                 "-F" = {
3017                         value = "$radius_config_file$",
3018                         description = "Configuration file"
3019                 }
3020                 "-u" = {
3021                         value = "$radius_username$",
3022                         description = "The user to authenticate"
3023                 }
3024                 "-p" = {
3025                         value = "$radius_password$",
3026                         description = "Password for authentication"
3027                 }
3028                 "-P" = {
3029                         value = "$radius_port$",
3030                         description = "Port number (default: 1645)"
3031                 },
3032                 "-n" = {
3033                         value = "$radius_nas_id$",
3034                         description = "NAS identifier"
3035                 }
3036                 "-N" = {
3037                         value = "$radius_nas_address$",
3038                         description = "NAS IP Address"
3039                 },
3040                 "-e" = {
3041                         value = "$radius_expect$",
3042                         description = "Response string to expect from the server"
3043                 },
3044                 "-r" = {
3045                         value = "$radius_retries$",
3046                         description = "Number of times to retry a failed connection"
3047                 },
3048                 "-t" = {
3049                         value = "$radius_timeout$",
3050                         description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
3051                 },
3052         }
3053
3054         vars.radius_address = "$check_address$"
3055 }
3056
3057 object CheckCommand "nscp_api" {
3058         import "ipv4-or-ipv6"
3059
3060         command = [ PluginDir + "/check_nscp_api" ]
3061
3062         arguments = {
3063                 "-H" = {
3064                         value = "$nscp_api_host$"
3065                         description = "NSCP API host address"
3066                         required = true
3067                 }
3068                 "-P" = {
3069                         value = "$nscp_api_port$"
3070                         description = "NSCP API host port. Defaults to 8443."
3071                 }
3072                 "--password" = {
3073                         value = "$nscp_api_password$"
3074                         description = "NSCP API password"
3075                 }
3076                 "-q" = {
3077                         value = "$nscp_api_query$"
3078                         description = "NSCPI API Query endpoint to use"
3079                 }
3080                 "-a" = {
3081                         value = "$nscp_api_arguments$"
3082                         description = "NSCP API Query arguments"
3083                         repeat_key = true
3084                 }
3085         }
3086
3087         vars.nscp_api_host = "$check_address$"
3088 }
3089
3090 object CheckCommand "rpc" {
3091         import "ipv4-or-ipv6"
3092
3093         command = [ PluginDir + "/check_rpc" ]
3094
3095         arguments = {
3096                 "-H" = {
3097                         value = "$rpc_address$"
3098                         description = "RPC host address"
3099                         required = true
3100                 }
3101                 "-C" = {
3102                         value = "$rpc_command$"
3103                         description = "Programm name (or number)"
3104                         required = true
3105                 }
3106                 "-p" = {
3107                         value = "$rpc_port$"
3108                         description = "RPC port"
3109                 }
3110                 "-c" = {
3111                         value = "$rpc_version$"
3112                         description = "The version to check"
3113                 }
3114                 "-u" = {
3115                         set_if = "$rpc_udp$"
3116                         description = "Test UDP"
3117                 }
3118                 "-t" = {
3119                         set_if = "$rpc_tcp$"
3120                         description     = "Test TCP"
3121                 }
3122                 "-v" = {
3123                         set_if = "$rpc_verbose$"
3124                         description = "Show verbose details"
3125                 }
3126         }
3127
3128         vars.rpc_address = "$check_address$"
3129 }