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