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