]> granicus.if.org Git - icinga2/blob - itl/command-plugins.conf
Merge pull request #7435 from Icinga/bugfix/cmake-lto
[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                 "-N" = {
1835                         value = "$snmpv3_context$"
1836                         description = "SNMPv3 context"
1837                 }
1838                 "-A" = {
1839                         value = "$snmpv3_auth_key$"
1840                         description = "SNMPv3 authentication password"
1841                 }
1842                 "-X" = {
1843                         value = "$snmpv3_priv_key$"
1844                         description = "SNMPv3 privacy password"
1845                 }
1846                 "-o" = {
1847                         value = "$snmpv3_oid$"
1848                         description = "Object identifier(s) or SNMP variables whose value you wish to query"
1849                 }
1850                 "-x" = {
1851                         value = "$snmpv3_priv_alg$"
1852                         description = "SNMPv3 priv proto (default DES)"
1853                 }
1854                 "-w" = {
1855                         value = "$snmpv3_warn$"
1856                         description = "Warning threshold range(s)"
1857                 }
1858                 "-c" = {
1859                         value = "$snmpv3_crit$"
1860                         description = "Critical threshold range(s)"
1861                 }
1862                 "-s" = {
1863                         value = "$snmpv3_string$"
1864                         description = "Return OK state (for that OID) if STRING is an exact match"
1865                 }
1866                 "-r" = {
1867                         value = "$snmpv3_ereg$"
1868                         description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1869                 }
1870                 "-R" = {
1871                         value = "$snmpv3_eregi$"
1872                         description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1873                 }
1874                 "--invert-search" = {
1875                         set_if = "$snmpv3_invert_search$"
1876                         description = "Invert search result and return CRITICAL if found"
1877                 }
1878                 "-l" = {
1879                         value = "$snmpv3_label$"
1880                         description = "Prefix label for output from plugin"
1881                 }
1882                 "-m" = {
1883                         value = "$snmpv3_miblist$"
1884                         description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1885                 }
1886                 "-u" = {
1887                         value = "$snmpv3_units$"
1888                         description = "Units label(s) for output data (e.g., 'sec.')"
1889                 }
1890                 "--rate-multiplier" = {
1891                         value = "$snmpv3_rate_multiplier$"
1892                         description = "Converts rate per second. For example, set to 60 to convert to per minute"
1893                 }
1894                 "--rate" = {
1895                         set_if = "$snmpv3_rate$"
1896                         description = "Enable rate calculation"
1897                 }
1898                 "-t" = {
1899                         value = "$snmpv3_timeout$"
1900                         description = "Seconds before connection times out (default: 10)"
1901                 }
1902         }
1903
1904         vars.snmpv3_address = "$check_address$"
1905         vars.snmpv3_auth_alg = "SHA"
1906         vars.snmpv3_priv_alg = "AES"
1907         vars.snmpv3_seclevel = "authPriv"
1908         vars.snmpv3_timeout = "10"
1909 }
1910
1911 object CheckCommand "snmp-uptime" {
1912         import "snmp"
1913
1914         vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1915 }
1916
1917 object CheckCommand "apt" {
1918         command = [ PluginDir + "/check_apt" ]
1919
1920         arguments = {
1921                 "--extra-opts" = {
1922                         value = "$apt_extra_opts$"
1923                         description = "Read options from an ini file."
1924                 }
1925                 "--upgrade" = {
1926                         value = "$apt_upgrade$"
1927                         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."
1928                 }
1929                 "--dist-upgrade" = {
1930                         value = "$apt_dist_upgrade$"
1931                         description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1932                 }
1933                 "--include" = {
1934                         value = "$apt_include$"
1935                         description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1936                 }
1937                 "--exclude" = {
1938                         value = "$apt_exclude$"
1939                         description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1940                 }
1941                 "--critical" = {
1942                         value = "$apt_critical$"
1943                         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."
1944                 }
1945                 "--timeout" = {
1946                         value = "$apt_timeout$"
1947                         description = "Seconds before plugin times out (default: 10)."
1948                 }
1949                 "--only-critical" = {
1950                         set_if = "$apt_only_critical$"
1951                         description = "Only warn about critical upgrades."
1952                 }
1953                 "--list" = {
1954                         set_if = "$apt_list$"
1955                         description = "List packages available for upgrade."
1956                 }
1957         }
1958
1959         timeout = 5m
1960 }
1961
1962 object CheckCommand "dhcp" {
1963         command = [ PluginDir + "/check_dhcp" ]
1964
1965         arguments = {
1966                 "-s" = {
1967                         value = "$dhcp_serverip$"
1968                         description = "IP address of DHCP server that we must hear from"
1969                 }
1970                 "-r" = {
1971                         value = "$dhcp_requestedip$"
1972                         description = "IP address that should be offered by at least one DHCP server"
1973                 }
1974                 "-t" = {
1975                         value = "$dhcp_timeout$"
1976                         description = "Seconds to wait for DHCPOFFER before timeout occurs"
1977                 }
1978                 "-i" = {
1979                         value = "$dhcp_interface$"
1980                         description = "Interface to to use for listening (i.e. eth0)"
1981                 }
1982                 "-m" = {
1983                         value = "$dhcp_mac$"
1984                         description = "MAC address to use in the DHCP request"
1985                 }
1986                 "-u" = {
1987                         set_if = "$dhcp_unicast$"
1988                         description = "Unicast testing: mimic a DHCP relay"
1989                 }
1990         }
1991
1992         vars.dhcp_unicast = false
1993 }
1994
1995 object CheckCommand "dns" {
1996         import "ipv4-or-ipv6"
1997
1998         command = [ PluginDir + "/check_dns" ]
1999
2000         arguments = {
2001                 "-H" = {
2002                         value = "$dns_lookup$"
2003                         description = "The name or address you want to query."
2004                 }
2005                 "-s" = {
2006                         value = "$dns_server$"
2007                         description = "Optional DNS server you want to use for the lookup."
2008                 }
2009                 "-q" = {
2010                         value = "$dns_query_type$"
2011                         description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
2012                 }
2013                 "-a" = {
2014                         value = "$dns_expected_answers$"
2015                         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)."
2016                 }
2017                 "-A" = {
2018                         set_if = "$dns_authoritative$"
2019                         description = "Optionally expect the DNS server to be authoritative for the lookup"
2020                 }
2021                 "-n" = {
2022                         set_if = "$dns_accept_cname$"
2023                         description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result"
2024                 }
2025                 "-w" = {
2026                         value = "$dns_wtime$"
2027                         description = "Return warning if elapsed time exceeds value."
2028                 }
2029                 "-c" = {
2030                         value = "$dns_ctime$"
2031                         description = "Return critical if elapsed time exceeds value."
2032                 }
2033                 "-t" = {
2034                         value = "$dns_timeout$"
2035                         description = "Seconds before connection times out. Defaults to 10."
2036                 }
2037         }
2038
2039         vars.dns_lookup = "$host.name$"
2040         vars.dns_timeout = 10
2041 }
2042
2043 object CheckCommand "dig" {
2044         import "ipv4-or-ipv6"
2045
2046         command = [ PluginDir + "/check_dig" ]
2047
2048         arguments = {
2049                 "-H" = {
2050                         value = "$dig_server$"
2051                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2052                 }
2053                 "-p" = {
2054                         value = "$dig_port$"
2055                         description = "Port number (default: 53)"
2056                 }
2057                 "-l" = {
2058                         value = "$dig_lookup$"
2059                         required = true
2060                         description = "Machine name to lookup"
2061                 }
2062                 "-T" = {
2063                         value = "$dig_record_type$"
2064                         description = "Record type to lookup (default: A)"
2065                 }
2066                 "-a" = {
2067                         value = "$dig_expected_address$"
2068                         description = "An address expected to be in the answer section"
2069                 }
2070                 "-A" = {
2071                         value = "$dig_arguments$"
2072                         description = "Pass STRING as argument(s) to dig"
2073                 }
2074                 "-w" = {
2075                         value = "$dig_warning$"
2076                         description = "Response time to result in warning status (seconds)"
2077                 }
2078                 "-c" = {
2079                         value = "$dig_critical$"
2080                         description = "Response time to result in critical status (seconds)"
2081                 }
2082                 "-t" = {
2083                         value = "$dig_timeout$"
2084                         description = "Seconds before connection times out (default: 10)"
2085                 }
2086                 "-4" = {
2087                         set_if = "$dig_ipv4$"
2088                         description = "Force dig to only use IPv4 query transport"
2089                 }
2090                 "-6" = {
2091                         set_if = "$dig_ipv6$"
2092                         description = "Force dig to only use IPv6 query transport"
2093                 }
2094         }
2095
2096         vars.dig_server = "$check_address$"
2097         vars.check_ipv4 = "$dig_ipv4$"
2098         vars.check_ipv6 = "$dig_ipv6$"
2099 }
2100
2101 object CheckCommand "nscp" {
2102         import "ipv4-or-ipv6"
2103
2104         command = [ PluginDir + "/check_nt" ]
2105
2106         arguments = {
2107                 "-H" = {
2108                         value = "$nscp_address$"
2109                         description = "Name of the host to check"
2110                 }
2111                 "-p" = {
2112                         value = "$nscp_port$"
2113                         description = "Optional port number (default: 1248)"
2114                 }
2115                 "-s" = {
2116                         value = "$nscp_password$"
2117                         description = "Password needed for the request"
2118                 }
2119                 "-v" = {
2120                         value = "$nscp_variable$"
2121                         required = true
2122                         description = "Variable to check"
2123                 }
2124                 "-l" = {
2125                         value = "$nscp_params$"
2126                         repeat_key = false
2127                 }
2128                 "-w" = {
2129                         value = "$nscp_warn$"
2130                         description = "Threshold which will result in a warning status"
2131                 }
2132                 "-c" = {
2133                         value = "$nscp_crit$"
2134                         description = "Threshold which will result in a critical status"
2135                 }
2136                 "-t" = {
2137                         value = "$nscp_timeout$"
2138                         description = "Seconds before connection attempt times out"
2139                 }
2140                 "-d" = {
2141                         value = "SHOWALL"
2142                         set_if = "$nscp_showall$"
2143                         description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
2144                 }
2145         }
2146
2147         vars.nscp_address = "$check_address$"
2148         vars.nscp_port = 12489
2149         vars.nscp_showall = false
2150 }
2151
2152 object CheckCommand "by_ssh" {
2153         import "ipv4-or-ipv6"
2154
2155         command = [ PluginDir + "/check_by_ssh" ]
2156
2157         arguments = {
2158                 "-H" = {
2159                         value = "$by_ssh_address$"
2160                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2161                 }
2162                 "-p" = {
2163                         value = "$by_ssh_port$"
2164                         description = "Port number (default: none)"
2165                 }
2166                 "-C" = {{
2167                         var command = macro("$by_ssh_command$")
2168                         var arguments = macro("$by_ssh_arguments$")
2169
2170                         if (typeof(command) == String && !arguments) {
2171                                 return command
2172                         }
2173
2174                         var escaped_args = []
2175                         for (arg in resolve_arguments(command, arguments)) {
2176                                 escaped_args.add(escape_shell_arg(arg))
2177                         }
2178                         return escaped_args.join(" ")
2179                 }}
2180                 "-l" = {
2181                         value = "$by_ssh_logname$"
2182                         description = "SSH user name on remote host [optional]"
2183                 }
2184                 "-i" = {
2185                         value = "$by_ssh_identity$"
2186                         description = "identity of an authorized key [optional]"
2187                 }
2188                 "-q" = {
2189                         set_if = "$by_ssh_quiet$"
2190                         description = "Tell ssh to suppress warning and diagnostic messages [optional]"
2191                 }
2192                 "-w" = {
2193                         value = "$by_ssh_warn$"
2194                         description = "Response time to result in warning status (seconds)"
2195                 }
2196                 "-c" = {
2197                         value = "$by_ssh_crit$"
2198                         description = "Response time to result in critical status (seconds)"
2199                 }
2200                 "-t" = {
2201                         value = "$by_ssh_timeout$"
2202                         description = "Seconds before connection times out (default: 10)"
2203                 }
2204                 "-o" = {
2205                         value = "$by_ssh_options$"
2206                         description = "Provide ssh options (may be repeated)"
2207                 }
2208                 "-4" = {
2209                         set_if = "$by_ssh_ipv4$"
2210                         description = "Use IPv4 only"
2211                 }
2212                 "-6" = {
2213                         set_if = "$by_ssh_ipv6$"
2214                         description = "Use IPv6 only"
2215                 }
2216                 "-E" = {
2217                         value = "$by_ssh_skip_stderr$"
2218                         description = "Ignore all or (if specified) first n lines on STDERR [optional]"
2219                 }
2220         }
2221
2222         vars.by_ssh_address = "$check_address$"
2223         vars.by_ssh_quiet = false
2224         vars.check_ipv4 = "$by_ssh_ipv4$"
2225         vars.check_ipv6 = "$by_ssh_ipv6$"
2226 }
2227
2228 object CheckCommand "ups" {
2229         import "ipv4-or-ipv6"
2230
2231         command = [ PluginDir + "/check_ups" ]
2232
2233         arguments = {
2234                 "-H" = {
2235                         value = "$ups_address$"
2236                         description = "Address of the upsd server"
2237                         required = true
2238                 }
2239                 "-u" = {
2240                         value = "$ups_name$"
2241                         description = "Name of the UPS to monitor"
2242                         required = true
2243                 }
2244                 "-p" = {
2245                         value = "$ups_port$"
2246                         description = "Port number (default: 3493)"
2247                 }
2248                 "-v" = {
2249                         value = "$ups_variable$"
2250                         description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
2251                 }
2252                 "-w" = {
2253                         value = "$ups_warning$"
2254                         description = "Warning threshold for the selected variable"
2255                 }
2256                 "-c" = {
2257                         value = "$ups_critical$"
2258                         description = "Critical threshold for the selected variable"
2259                 }
2260                 "-T" = {
2261                         set_if = "$ups_celsius$"
2262                         description = "Display temperature in degrees Celsius instead of Fahrenheit"
2263                 }
2264                 "-t" = {
2265                         value = "$ups_timeout$"
2266                         description = "Seconds before the connection times out (default: 10)"
2267                 }
2268         }
2269
2270         vars.ups_address = "$check_address$"
2271         vars.ups_name = "ups"
2272 }
2273
2274 object CheckCommand "nrpe" {
2275         import "ipv4-or-ipv6"
2276
2277         command = [ PluginDir + "/check_nrpe" ]
2278
2279         arguments = {
2280                 "-H" = {
2281                         value = "$nrpe_address$"
2282                         description = "The address of the host running the NRPE daemon"
2283                 }
2284                 "-p" = {
2285                         value = "$nrpe_port$"
2286                 }
2287                 "-c" = {
2288                         value = "$nrpe_command$"
2289                 }
2290                 "-n" = {
2291                         set_if = "$nrpe_no_ssl$"
2292                         description = "Do not use SSL"
2293                 }
2294                 "-u" = {
2295                         set_if = "$nrpe_timeout_unknown$"
2296                         description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
2297                 }
2298                 "-t" = {
2299                         value = "$nrpe_timeout$"
2300                         description = "<interval>:<state> = <Number of seconds before connection times out>:<Check state to exit with in the event of a timeout (default=CRITICAL)>"
2301                 }
2302                 "-a" = {
2303                         value = "$nrpe_arguments$"
2304                         repeat_key = false
2305                         order = 1
2306                 }
2307                 "-4" = {
2308                         set_if = "$nrpe_ipv4$"
2309                         description = "Use IPv4 connection"
2310                 }
2311                 "-6" = {
2312                         set_if = "$nrpe_ipv6$"
2313                         description = "Use IPv6 connection"
2314                 }
2315                 "-2" = {
2316                         set_if = "$nrpe_version_2$"
2317                         description = "Use this if you want to connect to NRPE v2"
2318                 }
2319         }
2320
2321         vars.nrpe_address = "$check_address$"
2322         vars.nrpe_no_ssl = false
2323         vars.nrpe_timeout_unknown = false
2324         vars.check_ipv4 = "$nrpe_ipv4$"
2325         vars.check_ipv6 = "$nrpe_ipv6$"
2326         vars.nrpe_version_2 = false
2327         timeout = 5m
2328 }
2329
2330 object CheckCommand "hpjd" {
2331         import "ipv4-or-ipv6"
2332
2333         command = [ PluginDir + "/check_hpjd" ]
2334
2335         arguments = {
2336                 "-H" = {
2337                         value = "$hpjd_address$"
2338                         description = "Host address"
2339                 }
2340                 "-C" = {
2341                         value = "$hpjd_community$"
2342                         description = "The SNMP community name (default=public)"
2343                 }
2344                 "-p" = {
2345                         value = "$hpjd_port$"
2346                         description = "Specify the port to check (default=161)"
2347                 }
2348         }
2349
2350         vars.hpjd_address = "$check_address$"
2351 }
2352
2353 object CheckCommand "icmp" {
2354         command = [ PluginDir + "/check_icmp" ]
2355
2356         arguments = {
2357                 "-H" = {
2358                         value = "$icmp_address$"
2359                         repeat_key = false
2360                         order = 1
2361                         description = "Host address"
2362                 }
2363                 "-w" = {
2364                         value = "$icmp_wrta$,$icmp_wpl$%"
2365                         description = "warning threshold (currently 200.000ms,40%)"
2366                 }
2367                 "-c" = {
2368                         value = "$icmp_crta$,$icmp_cpl$%"
2369                         description = "critical threshold (currently 500.000ms,80%)"
2370                 }
2371                 "-s" = {
2372                         value = "$icmp_source$"
2373                         description = "specify a source IP address or device name"
2374                 }
2375                 "-n" = {
2376                         value = "$icmp_packets$"
2377                         description = "number of packets to send (currently 5)"
2378                 }
2379                 "-i" = {
2380                         value = "$icmp_packet_interval$"
2381                         description = "max packet interval (currently 80.000ms)"
2382                 }
2383                 "-I" = {
2384                         value = "$icmp_target_interval$"
2385                         description = "max target interval (currently 0.000ms)"
2386                 }
2387                 "-m" = {
2388                         value = "$icmp_hosts_alive$"
2389                         description = "number of alive hosts required for success"
2390                 }
2391                 "-b" = {
2392                         value = "$icmp_data_bytes$"
2393                         description = "Number of icmp data bytes to send. Packet size will be data bytes + icmp header (currently 68 + 8)"
2394                 }
2395                 "-t" = {
2396                         value = "$icmp_timeout$"
2397                         description = "timeout value (seconds, currently  10)"
2398                 }
2399                 "-l" = {
2400                         value = "$icmp_ttl$"
2401                         description = "TTL on outgoing packets (currently 0)"
2402                 }
2403         }
2404
2405         vars.icmp_address = "$address$"
2406         vars.icmp_wrta = 100
2407         vars.icmp_wpl = 5
2408         vars.icmp_crta = 200
2409         vars.icmp_cpl = 15
2410 }
2411
2412 object CheckCommand "ldap" {
2413         import "ipv4-or-ipv6"
2414
2415         command = [ PluginDir + "/check_ldap" ]
2416
2417         arguments = {
2418                 "-H" = {
2419                         value = "$ldap_address$"
2420                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2421                 }
2422                 "-p" = {
2423                         value = "$ldap_port$"
2424                         description = "Port number (default: 389)"
2425                 }
2426                 "-a" = {
2427                         value = "$ldap_attr$"
2428                         description = "ldap attribute to search (default: \"(objectclass=*)\""
2429                 }
2430                 "-b" = {
2431                         value = "$ldap_base$"
2432                         required = true
2433                         description = "ldap base (eg. ou=my unit, o=my org, c=at"
2434                 }
2435                 "-D" = {
2436                         value = "$ldap_bind$"
2437                         description = "ldap bind DN (if required)"
2438                 }
2439                 "-P" = {
2440                         value = "$ldap_pass$"
2441                         description = "ldap password (if required)"
2442                 }
2443                 "-T" = {
2444                         set_if = "$ldap_starttls$"
2445                         description = "use starttls mechanism introduced in protocol version 3"
2446                 }
2447                 "-S" = {
2448                         set_if = "$ldap_ssl$"
2449                         description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
2450                 }
2451                 "-2" = {
2452                         set_if = "$ldap_v2$"
2453                         description = "Use LDAP protocol version 2"
2454                 }
2455                 "-3" = {
2456                         set_if = "$ldap_v3$"
2457                         description = "Use LDAP protocol version 3"
2458                 }
2459                 "-w" = {
2460                         value = "$ldap_warning$"
2461                         description = "Response time to result in warning status (seconds)"
2462                 }
2463                 "-c" = {
2464                         value = "$ldap_critical$"
2465                         description = "Response time to result in critical status (seconds)"
2466                 }
2467                 "-W" = {
2468                         value = "$ldap_warning_entries$"
2469                         description = "Number of found entries to result in warning status (optional)"
2470                 }
2471                 "-C" = {
2472                         value = "$ldap_critical_entries$"
2473                         description = "Number of found entries to result in critical status (optional)"
2474                 }
2475                 "-t" = {
2476                         value = "$ldap_timeout$"
2477                         description = "Seconds before connection times out (default: 10)"
2478                 }
2479                 "-v" = {
2480                         set_if = "$ldap_verbose$"
2481                         description = "Show details for command-line debugging"
2482                 }
2483         }
2484
2485         vars.ldap_address = "$check_address$"
2486         vars.ldap_v2 = true
2487         vars.ldap_v3 = false
2488         vars.ldap_timeout = 10s
2489         vars.ldap_verbose = false
2490 }
2491
2492 object CheckCommand "clamd" {
2493         command = [ PluginDir + "/check_clamd" ]
2494
2495         arguments = {
2496                 "-H" = {
2497                         value = "$clamd_address$"
2498                         description = "The host's address or unix socket (must be an absolute path)."
2499                         required = true
2500                 }
2501                 "-p" = {
2502                         value = "$clamd_port$"
2503                         description = "Port number (default: none)."
2504                 }
2505                 "-e" = {
2506                         value = "$clamd_expect$"
2507                         description = "String to expect in server response (may be repeated)."
2508                         repeat_key = true
2509                 }
2510                 "-A" = {
2511                         set_if = "$clamd_all$"
2512                         description = "All expect strings need to occur in server response. Default is any."
2513                 }
2514                 "-E_send" = {
2515                         key = "-E"
2516                         order = 1
2517                         set_if = "$clamd_escape_send$"
2518                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
2519                 }
2520                 "-s" = {
2521                         order = 2
2522                         value = "$clamd_send$"
2523                         description = "String to send to the server."
2524                 }
2525                 "-E_quit" = {
2526                         key = "-E"
2527                         order = 3
2528                         set_if = "$clamd_escape_quit$"
2529                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
2530                 }
2531                 "-q" = {
2532                         order = 4
2533                         value = "$clamd_quit$"
2534                         description = "String to send server to initiate a clean close of the connection."
2535                 }
2536                 "-r" = {
2537                         value = "$clamd_refuse$"
2538                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
2539                 }
2540                 "-M" = {
2541                         value = "$clamd_mismatch$"
2542                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
2543                 }
2544                 "-j" = {
2545                         set_if = "$clamd_jail$"
2546                         description = "Hide output from TCP socket."
2547                 }
2548                 "-m" = {
2549                         value = "$clamd_maxbytes$"
2550                         description = "Close connection once more than this number of bytes are received."
2551                 }
2552                 "-d" = {
2553                         value = "$clamd_delay$"
2554                         description = "Seconds to wait between sending string and polling for response."
2555                 }
2556                 "-D" = {
2557                         value = "$clamd_certificate$"
2558                         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."
2559                 }
2560                 "-S" = {
2561                         set_if = "$clamd_ssl$"
2562                         description = "Use SSL for the connection."
2563                 }
2564                 "-w" = {
2565                         value = "$clamd_wtime$"
2566                         description = "Response time to result in warning status (seconds)."
2567                 }
2568                 "-c" = {
2569                         value = "$clamd_ctime$"
2570                         description = "Response time to result in critical status (seconds)."
2571                 }
2572                 "-t" = {
2573                         value = "$clamd_timeout$"
2574                         description = "Seconds before connection times out. Defaults to 10."
2575                 }
2576                 "-4" = {
2577                         set_if = "$clamd_ipv4$"
2578                         description = "Use IPv4 only"
2579                 }
2580                 "-6" = {
2581                         set_if = "$clamd_ipv6$"
2582                         description = "Use IPv6 only"
2583                 }
2584         }
2585
2586         vars.clamd_ssl = false
2587         vars.clamd_refuse = "crit"
2588         vars.clamd_mismatch = "warn"
2589         vars.clamd_timeout = 10
2590         vars.check_ipv4 = "$clamd_ipv4$"
2591         vars.check_ipv6 = "$clamd_ipv6$"
2592 }
2593
2594 object CheckCommand "mailq" {
2595         command = [ PluginDir + "/check_mailq" ]
2596
2597         arguments = {
2598                 "-w" = {
2599                         value = "$mailq_warning$"
2600                         description = "Min. number of messages in queue to generate warning"
2601                         required = true
2602                 }
2603                 "-c" = {
2604                         value = "$mailq_critical$"
2605                         description = "Min. number of messages in queue to generate critical alert ( w < c )"
2606                         required = true
2607                 }
2608                 "-W" = {
2609                         value = "$mailq_domain_warning$"
2610                         description = "Min. number of messages for same domain in queue to generate warning"
2611                 }
2612                 "-C" = {
2613                         value = "$mailq_domain_critical$"
2614                         description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2615                 }
2616                 "-t" = {
2617                         value = "$mailq_timeout$"
2618                         description = "Plugin timeout in seconds (default = 15)"
2619                 }
2620                 "-M" = {
2621                         value = "$mailq_servertype$"
2622                         description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2623                 }
2624                 "-s" = {
2625                         set_if = "$mailq_sudo$"
2626                         description = "Use sudo for mailq command"
2627                 }
2628         }
2629 }
2630
2631 object CheckCommand "pgsql" {
2632         import "ipv4-or-ipv6"
2633
2634         command = [ PluginDir + "/check_pgsql" ]
2635
2636         arguments = {
2637                 "-H" = {
2638                         value = "$pgsql_hostname$"
2639                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2640                 }
2641                 "-P" = {
2642                         value = "$pgsql_port$"
2643                         description = "Port number (default: 5432)"
2644                 }
2645                 "-d" = {
2646                         value = "$pgsql_database$"
2647                         description = "Database to check (default: template1)"
2648                 }
2649                 "-l" = {
2650                         value = "$pgsql_username$"
2651                         description = "Login name of user"
2652                 }
2653                 "-p" = {
2654                         value = "$pgsql_password$"
2655                         description = "Password (BIG SECURITY ISSUE)"
2656                 }
2657                 "-o" = {
2658                         value = "$pgsql_options$"
2659                         description = "Connection parameters (keyword = value), see below"
2660                         }
2661                 "-w" = {
2662                         value = "$pgsql_warning$"
2663                         description = "Response time to result in warning status (seconds)"
2664                 }
2665                 "-c" = {
2666                         value = "$pgsql_critical$"
2667                         description = "Response time to result in critical status (seconds)"
2668                 }
2669                 "-t" = {
2670                         value = "$pgsql_timeout$"
2671                         description = "Seconds before connection times out (default: 10)"
2672                 }
2673                 "-q" = {
2674                         value = "$pgsql_query$"
2675                         description = "SQL query to run. Only first column in first row will be read"
2676                 }
2677                 "-W" = {
2678                         value = "$pgsql_query_warning$"
2679                         description = "SQL query value to result in warning status (double)"
2680                 }
2681                 "-C" = {
2682                         value = "$pgsql_query_critical$"
2683                         description = "SQL query value to result in critical status (double)"
2684                 }
2685         }
2686
2687         vars.pgsql_hostname = "$check_address$"
2688 }
2689
2690 object CheckCommand "mysql" {
2691         import "ipv4-or-ipv6"
2692
2693         command = [ PluginDir + "/check_mysql" ]
2694
2695         arguments = {
2696                 "-H" = {
2697                         value = "$mysql_hostname$"
2698                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2699                 }
2700                 "-P" = {
2701                         value = "$mysql_port$"
2702                         description = "Port number (default: 3306)"
2703                 }
2704                 "-n" = {
2705                         set_if = "$mysql_ignore_auth$"
2706                         description = "Ignore authentication failure and check for mysql connectivity only"
2707                 }
2708                 "-s" = {
2709                         value = "$mysql_socket$"
2710                         description = "Use the specified socket"
2711                 }
2712                 "-d" = {
2713                         value = "$mysql_database$"
2714                         description = "Check database with indicated name"
2715                 }
2716                 "-f" = {
2717                         value = "$mysql_file$"
2718                         description = "Read from the specified client options file"
2719                 }
2720                 "-g" = {
2721                         value = "$mysql_group$"
2722                         description = "Use a client options group"
2723                 }
2724                 "-u" = {
2725                         value = "$mysql_username$"
2726                         description = "Connect using the indicated username"
2727                 }
2728                 "-p" = {
2729                         value = "$mysql_password$"
2730                         description = "Use the indicated password to authenticate the connection"
2731                 }
2732                 "-S" = {
2733                         set_if = "$mysql_check_slave$"
2734                         description = "Check if the slave thread is running properly"
2735                 }
2736                 "-w" = {
2737                         value = "$mysql_warning$"
2738                         description = "Exit with WARNING status if slave server is more than INTEGER seconds behind master"
2739                 }
2740                 "-c" = {
2741                         value = "$mysql_critical$"
2742                         description = "Exit with CRITICAL status if slave server is more then INTEGER seconds behind master"
2743                 }
2744                 "-l" = {
2745                         set_if = "$mysql_ssl$"
2746                         description = "Use ssl encryptation"
2747                 }
2748                 "-C" = {
2749                         value = "$mysql_cacert$"
2750                         description = "Path to CA signing the cert"
2751                 }
2752                 "-a" = {
2753                         value = "$mysql_cert$"
2754                         description = "Path to SSL certificate"
2755                 }
2756                 "-k" = {
2757                         value = "$mysql_key$"
2758                         description = "Path to private SSL key"
2759                 }
2760                 "-D" = {
2761                         value = "$mysql_cadir$"
2762                         description = "Path to CA directory"
2763                 }
2764                 "-L" = {
2765                         value = "$mysql_ciphers$"
2766                         description = "List of valid SSL ciphers"
2767                 }
2768         }
2769
2770         vars.mysql_hostname = "$check_address$"
2771 }
2772
2773 object CheckCommand "negate" {
2774         command = [ PluginDir + "/negate" ]
2775
2776         arguments = {
2777                 "-t" = {
2778                         value = "$negate_timeout$"
2779                         description = "Seconds before plugin times out (default: 11)"
2780                 }
2781                 "-T" = {
2782                         value = "$negate_timeout_result$"
2783                         description = "Custom result on Negate timeouts"
2784                 }
2785                 "-o" = {
2786                         value = "$negate_ok$"
2787                 }
2788                 "-w" = {
2789                         value = "$negate_warning$"
2790                 }
2791                 "-c" = {
2792                         value = "$negate_critical$"
2793                 }
2794                 "-u" = {
2795                         value = "$negate_unknown$"
2796                 }
2797                 "-s" = {
2798                         set_if = "$negate_substitute$"
2799                         description = "Substitute output text as well. Will only substitute text in CAPITALS"
2800                 }
2801                 "--wrapped-plugin" = {
2802                         value = {{
2803                                 var command = macro("$negate_command$")
2804                                 var arguments = macro("$negate_arguments$")
2805
2806                                 if (typeof(command) == String && !arguments) {
2807                                         return command
2808                                 }
2809
2810                                 var escaped_args = []
2811                                 for (arg in resolve_arguments(command, arguments)) {
2812                                         escaped_args.add(arg)
2813                                 }
2814                                 return escaped_args.join(" ")
2815                         }}
2816                         skip_key = true
2817                         order = 1
2818                 }
2819         }
2820
2821         vars.negate_timeout_result = "UNKNOWN"
2822 }
2823
2824 object CheckCommand "file_age" {
2825         command = [ PluginDir + "/check_file_age" ]
2826
2827         arguments = {
2828                 "-w" = {
2829                         value = "$file_age_warning_time$"
2830                         description = "File must be no more than this many seconds old (default: 240s)"
2831                 }
2832                 "-c" = {
2833                         value = "$file_age_critical_time$"
2834                         description = "File must be no more than this many seconds old (default: 600s)"
2835                 }
2836                 "-W" = {
2837                         value = "$file_age_warning_size$"
2838                         description = "File must be at least this many bytes long"
2839                 }
2840                 "-C" = {
2841                         value = "$file_age_critical_size$"
2842                         description = "File must be at least this many bytes long (default: 0B)"
2843                 }
2844                 "-i" = {
2845                         set_if = "$file_age_ignoremissing$"
2846                         description = "return OK if the file does not exist"
2847                 }
2848                 "-f" = {
2849                         value = "$file_age_file$"
2850                         description = "File to monitor"
2851                 }
2852         }
2853
2854         vars.file_age_ignoremissing = false
2855 }
2856
2857 object CheckCommand "smart" {
2858         command = [ PluginDir + "/check_ide_smart" ]
2859
2860         arguments = {
2861                 "-d" = {
2862                         value = "$smart_device$"
2863                         description = "Name of a local hard drive to monitor"
2864                         required = true
2865                 }
2866         }
2867 }
2868
2869 object CheckCommand "breeze" {
2870         import "ipv4-or-ipv6"
2871
2872         command = [ PluginDir + "/check_breeze" ]
2873
2874         arguments = {
2875                 "-H" = {
2876                         value = "$breeze_hostname$"
2877                         description = "Name or IP address of host to check"
2878                         required = true
2879                 }
2880                 "-C" = {
2881                         value = "$breeze_community$"
2882                         description = "SNMPv1 community (default public)"
2883                 }
2884                 "-w" = {
2885                         value = "$breeze_warning$"
2886                         description = "Percentage strength below which a WARNING status will result"
2887                         required = true
2888                 }
2889                 "-c" = {
2890                         value = "$breeze_critical$"
2891                         description = "Percentage strength below which a CRITICAL status will result"
2892                         required = true
2893                 }
2894         }
2895
2896         vars.breeze_hostname = "$check_address$"
2897         vars.breeze_warning = "50"
2898         vars.breeze_critical = "20"
2899 }
2900
2901 object CheckCommand "flexlm" {
2902         command = [ PluginDir + "/check_flexlm" ]
2903
2904         arguments = {
2905                 "-F" = {
2906                         value = "$flexlm_licensefile$"
2907                         description = "Name of license file (usually license.dat)"
2908                         required = true
2909                 }
2910                 "-t" = {
2911                         value = "$flexlm_timeout$"
2912                         description = "Plugin time out in seconds (default = 15)"
2913                 }
2914         }
2915 }
2916
2917 object CheckCommand "game" {
2918         import "ipv4-or-ipv6"
2919
2920         command = [ PluginDir + "/check_game" ]
2921
2922         arguments = {
2923                 "-P" = {
2924                         value = "$game_port$"
2925                         description = "Port to connect to"
2926                 }
2927                 "-t" = {
2928                         value = "$game_timeout$"
2929                         description = "Seconds before connection times out (default: 10)"
2930                 }
2931                 "-g" = {
2932                         value = "$game_gamefield$"
2933                         description = "Field number in raw qstat output that contains game name"
2934                 }
2935                 "-m" = {
2936                         value = "$game_mapfield$"
2937                         description = "Field number in raw qstat output that contains map name"
2938                 }
2939                 "-p" = {
2940                         value = "$game_pingfield$"
2941                         description = "Field number in raw qstat output that contains ping time"
2942                 }
2943                 "-G" = {
2944                         value = "$game_gametime$"
2945                         description = "Field number in raw qstat output that contains game time"
2946                 }
2947                 "-H" = {
2948                         value = "$game_hostname$"
2949                         description = "Name of the host running the game"
2950                 }
2951                 "game" = {
2952                         value = "$game_game$"
2953                         description = "Name of the game"
2954                         order = 1
2955                         skip_key = true
2956                 }
2957                 "ipaddress" = {
2958                         value = "$game_ipaddress$"
2959                         description = "Ipaddress of the game server to query"
2960                         order = 2
2961                         skip_key = true
2962                 }
2963         }
2964 }
2965
2966 object CheckCommand "mysql_query" {
2967         import "ipv4-or-ipv6"
2968
2969         command = [ PluginDir + "/check_mysql_query" ]
2970
2971         arguments = {
2972                 "-H" = {
2973                         value = "$mysql_query_hostname$"
2974                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
2975                 }
2976                 "-P" = {
2977                         value = "$mysql_query_port$"
2978                         description = "Port number (default: 3306)"
2979                 }
2980                 "-u" = {
2981                         value = "$mysql_query_username$"
2982                         description = "Username to login with"
2983                 }
2984                 "-p" = {
2985                         value = "$mysql_query_password$"
2986                         description = "Password to login with"
2987                 }
2988                 "-d" = {
2989                         value = "$mysql_query_database$"
2990                         description = "Database to check"
2991                 }
2992                 "-f" = {
2993                         value = "$mysql_query_file$"
2994                         description = "Read from the specified client options file"
2995                 }
2996                 "-g" = {
2997                         value = "$mysql_query_group$"
2998                         description = "Use a client options group"
2999                 }
3000                 "-q" = {
3001                         value = "$mysql_query_execute$"
3002                         description = "SQL query to run. Only first column in first row will be read"
3003                 }
3004                 "-w" = {
3005                         value = "$mysql_query_warning$"
3006                         description = "Warning range (format: start:end). Alert if outside this range"
3007                 }
3008                 "-c" = {
3009                         value = "$mysql_query_critical$"
3010                         description = "Critical range"
3011                 }
3012         }
3013
3014         vars.mysql_query_hostname = "$check_address$"
3015 }
3016
3017 object CheckCommand "radius" {
3018         import "ipv4-or-ipv6"
3019
3020         command = [
3021                 PluginDir + "/check_radius",
3022         ]
3023
3024         arguments = {
3025                 "-H" = {
3026                         value = "$radius_address$",
3027                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
3028                 }
3029                 "-F" = {
3030                         value = "$radius_config_file$",
3031                         description = "Configuration file"
3032                 }
3033                 "-u" = {
3034                         value = "$radius_username$",
3035                         description = "The user to authenticate"
3036                 }
3037                 "-p" = {
3038                         value = "$radius_password$",
3039                         description = "Password for authentication"
3040                 }
3041                 "-P" = {
3042                         value = "$radius_port$",
3043                         description = "Port number (default: 1645)"
3044                 },
3045                 "-n" = {
3046                         value = "$radius_nas_id$",
3047                         description = "NAS identifier"
3048                 }
3049                 "-N" = {
3050                         value = "$radius_nas_address$",
3051                         description = "NAS IP Address"
3052                 },
3053                 "-e" = {
3054                         value = "$radius_expect$",
3055                         description = "Response string to expect from the server"
3056                 },
3057                 "-r" = {
3058                         value = "$radius_retries$",
3059                         description = "Number of times to retry a failed connection"
3060                 },
3061                 "-t" = {
3062                         value = "$radius_timeout$",
3063                         description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
3064                 },
3065         }
3066
3067         vars.radius_address = "$check_address$"
3068 }
3069
3070 object CheckCommand "nscp_api" {
3071         import "ipv4-or-ipv6"
3072
3073         command = [ PluginDir + "/check_nscp_api" ]
3074
3075         arguments = {
3076                 "-H" = {
3077                         value = "$nscp_api_host$"
3078                         description = "NSCP API host address"
3079                         required = true
3080                 }
3081                 "-P" = {
3082                         value = "$nscp_api_port$"
3083                         description = "NSCP API host port. Defaults to 8443."
3084                 }
3085                 "--password" = {
3086                         value = "$nscp_api_password$"
3087                         description = "NSCP API password"
3088                 }
3089                 "-q" = {
3090                         value = "$nscp_api_query$"
3091                         description = "NSCPI API Query endpoint to use"
3092                 }
3093                 "-a" = {
3094                         value = "$nscp_api_arguments$"
3095                         description = "NSCP API Query arguments"
3096                         repeat_key = true
3097                 }
3098         }
3099
3100         vars.nscp_api_host = "$check_address$"
3101 }
3102
3103 object CheckCommand "rpc" {
3104         import "ipv4-or-ipv6"
3105
3106         command = [ PluginDir + "/check_rpc" ]
3107
3108         arguments = {
3109                 "-H" = {
3110                         value = "$rpc_address$"
3111                         description = "RPC host address"
3112                         required = true
3113                 }
3114                 "-C" = {
3115                         value = "$rpc_command$"
3116                         description = "Programm name (or number)"
3117                         required = true
3118                 }
3119                 "-p" = {
3120                         value = "$rpc_port$"
3121                         description = "RPC port"
3122                 }
3123                 "-c" = {
3124                         value = "$rpc_version$"
3125                         description = "The version to check"
3126                 }
3127                 "-u" = {
3128                         set_if = "$rpc_udp$"
3129                         description = "Test UDP"
3130                 }
3131                 "-t" = {
3132                         set_if = "$rpc_tcp$"
3133                         description     = "Test TCP"
3134                 }
3135                 "-v" = {
3136                         set_if = "$rpc_verbose$"
3137                         description = "Show verbose details"
3138                 }
3139         }
3140
3141         vars.rpc_address = "$check_address$"
3142 }
3143
3144 object CheckCommand "uptime" {
3145         command = [ PluginDir + "/check_uptime" ]
3146
3147         arguments = {
3148                 "--warning" = {
3149                         value = "$uptime_warning$"
3150                         description = "Min. number of uptime to generate warning"
3151                         required = true
3152                 }
3153                 "--critical" = {
3154                         value = "$uptime_critical$"
3155                         description = "Min. number of uptime to generate critical alert ( w < c )"
3156                         required = true
3157                 }
3158                 "--for" = {
3159                         set_if = "$uptime_for$"
3160                         description = "Show uptime in a pretty format (Running for x weeks, x days, ...)"
3161                 }
3162                 "--since" = {
3163                         set_if = "$uptime_since$"
3164                         description = "Show last boot in yyyy-mm-dd HH:MM:SS format (output from 'uptime -s')"
3165                 }
3166         }
3167
3168         vars.uptime_warning = "30m"
3169         vars.uptime_critical = "15m"
3170 }
3171