]> granicus.if.org Git - icinga2/blob - itl/command-plugins.conf
Implement URL handler for /v1
[icinga2] / itl / command-plugins.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 template CheckCommand "ipv4-or-ipv6" {
21         vars.check_address = {{
22                 var addr_v4 = macro("$address$")
23                 var addr_v6 = macro("$address6$")
24
25                 if (addr_v4) {
26                         return addr_v4
27                 } else {
28                         return addr_v6
29                 }
30         }}
31 }
32
33 template CheckCommand "ping-common" {
34         import "plugin-check-command"
35
36         command = [ PluginDir + "/check_ping" ]
37
38         arguments = {
39                 "-H" = "$ping_address$"
40                 "-w" = "$ping_wrta$,$ping_wpl$%"
41                 "-c" = "$ping_crta$,$ping_cpl$%"
42                 "-p" = "$ping_packets$"
43                 "-t" = "$ping_timeout$"
44         }
45
46         vars.ping_wrta = 100
47         vars.ping_wpl = 5
48         vars.ping_crta = 200
49         vars.ping_cpl = 15
50 }
51
52 object CheckCommand "ping" {
53         import "ping-common"
54         import "ipv4-or-ipv6"
55
56         vars.ping_address = "$check_address$"
57 }
58
59 object CheckCommand "ping4" {
60         import "ping-common"
61
62         command += [ "-4" ]
63
64         vars.ping_address = "$address$"
65 }
66
67 object CheckCommand "ping6" {
68         import "ping-common"
69
70         command += [ "-6" ]
71
72         vars.ping_address = "$address6$"
73 }
74
75 template CheckCommand "hostalive-common" {
76         vars.ping_wrta = 3000.0
77         vars.ping_wpl = 80
78
79         vars.ping_crta = 5000.0
80         vars.ping_cpl = 100
81 }
82
83 object CheckCommand "hostalive" {
84         import "ping"
85         import "hostalive-common"
86 }
87
88 object CheckCommand "hostalive4" {
89         import "ping4"
90         import "hostalive-common"
91 }
92
93 object CheckCommand "hostalive6" {
94         import "ping6"
95         import "hostalive-common"
96 }
97
98 template CheckCommand "fping-common" {
99         import "plugin-check-command"
100
101         command = [
102                 PluginDir + "/check_fping",
103                 "$fping_address$"
104         ]
105
106         arguments = {
107                 "-w" = "$fping_wrta$,$fping_wpl$%"
108                 "-c" = "$fping_crta$,$fping_cpl$%"
109                 "-n" = "$fping_number$"
110                 "-i" = "$fping_interval$"
111                 "-b" = "$fping_bytes$"
112                 "-T" = "$fping_target_timeout$"
113                 "-S" = "$fping_source_ip$"
114                 "-I" = "$fping_source_interface$"
115         }
116
117         vars.fping_wrta = 100
118         vars.fping_wpl = 5
119         vars.fping_crta = 200
120         vars.fping_cpl = 15
121         vars.fping_number = 5
122         vars.fping_interval = 500
123 }
124
125 object CheckCommand "fping4" {
126         import "fping-common"
127
128         command += [ "-4" ]
129
130         vars.fping_address = "$address$"
131 }
132
133 object CheckCommand "fping6" {
134         import "fping-common"
135
136         command += [ "-6" ]
137
138         vars.fping_address = "$address6$"
139 }
140
141 object CheckCommand "dummy" {
142         import "plugin-check-command"
143
144         command = [
145                 PluginDir + "/check_dummy",
146                 "$dummy_state$",
147                 "$dummy_text$"
148         ]
149
150         vars.dummy_state = 0
151         vars.dummy_text = "Check was successful."
152 }
153
154 object CheckCommand "passive" {
155         import "dummy"
156
157         vars.dummy_state = 3
158         vars.dummy_text = "No Passive Check Result Received."
159 }
160
161 object CheckCommand "tcp" {
162         import "plugin-check-command"
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         }
247
248         vars.tcp_address = "$check_address$"
249         vars.tcp_all = false
250         vars.tcp_refuse = "crit"
251         vars.tcp_mismatch = "warn"
252         vars.tcp_timeout = 10
253 }
254
255 object CheckCommand "ssl" {
256         import "plugin-check-command"
257         import "ipv4-or-ipv6"
258
259         command = [ PluginDir + "/check_tcp" ]
260
261         arguments = {
262                 "-H" = "$ssl_address$"
263                 "-p" = "$ssl_port$"
264                 "--ssl" = { }
265                 "--timeout" = "$ssl_timeout$"
266                 "-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$"
267         }
268
269         vars.ssl_address = "$check_address$"
270 }
271
272 object CheckCommand "udp" {
273         import "plugin-check-command"
274         import "ipv4-or-ipv6"
275
276         command = [
277                 PluginDir + "/check_udp",
278                 "-H", "$udp_address$",
279                 "-p", "$udp_port$"
280         ]
281
282         arguments = {
283                 "-s" = {
284                         value = "$udp_send$"
285                         required = true
286                 }
287                 "-e" = {
288                         value = "$udp_expect$"
289                         required = true
290                 }
291                 "-q" = "$udp_quit$"
292         }
293
294         vars.udp_address = "$check_address$"
295 }
296
297 object CheckCommand "http" {
298         import "plugin-check-command"
299         import "ipv4-or-ipv6"
300
301         command = [ PluginDir + "/check_http" ]
302
303         arguments = {
304                 "-H" = "$http_vhost$"
305                 "-I" = "$http_address$"
306                 "-u" = "$http_uri$"
307                 "-p" = "$http_port$"
308                 "-S" = {
309                         set_if = "$http_ssl$"
310                 }
311                 "--sni" = {
312                         set_if = "$http_sni$"
313                 }
314                 "-C" = {
315                         value = "$http_certificate$"
316                         description = "Minimum number of days a certificate has to be valid. Port defaults to 443."
317                 }
318                 "-J" = {
319                         value = "$http_clientcert$"
320                         description = "Name of file contains the client certificate (PEM format)"
321                 }
322                 "-K" = {
323                         value = "$http_privatekey$"
324                         description = "Name of file contains the private key (PEM format)"
325                 }
326                 "-a" = {
327                         value = "$http_auth_pair$"
328                         description = "Username:password on sites with basic authentication"
329                 }
330                 "--no-body" = {
331                         set_if = "$http_ignore_body$"
332                 }
333                 "-w" = "$http_warn_time$"
334                 "-c" = "$http_critical_time$"
335                 "-e" = "$http_expect$"
336                 "-d" = {
337                         value = "$http_headerstring$"
338                         description = "String to expect in the response headers"
339                 }
340                 "-s" = {
341                         value = "$http_string$"
342                         description = "String to expect in the content"
343                 }
344                 "-P" = {
345                         value = "$http_post$"
346                         description = "URL encoded http POST data"
347                 }
348                 "-j" = {
349                         value = "$http_method$"
350                         description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
351                 }
352                 "-M" = {
353                         value = "$http_maxage$"
354                         description = "Warn if document is more than seconds old"
355                 }
356                 "-T" = {
357                         value = "$http_contenttype$"
358                         description = "Specify Content-Type header when POSTing"
359                 }
360                 "-l" = {
361                         set_if = "$http_linespan$"
362                         description = "Allow regex to span newline"
363                         order = 1
364                 }
365                 "-r" = {
366                         value = "$http_expect_body_regex$"
367                         description = "Search page for regex"
368                         order = 2
369                 }
370                 "-R" = {
371                         value = "$http_expect_body_eregi$"
372                         description = "Search page for case-insensitive regex"
373                         order = 2
374                 }
375                 "--invert-regex" = {
376                         set_if = "$http_invertregex$"
377                         description = "Return CRITICAL if found, OK if not"
378                 }
379                 "-b" = {
380                         value = "$http_proxy_auth_pair$"
381                         description = "Username:password on proxy-servers with basic authentication"
382                 }
383                 "-A" = {
384                         value = "$http_useragent$"
385                         description = "String to be sent in http header as User Agent"
386                 }
387                 "-k" = {
388                         value = "$http_header$"
389                         description = "Any other tags to be sent in http header"
390                 }
391                 "-E" = {
392                         set_if = "$http_extendedperfdata$"
393                         description = "Print additional perfdata"
394                 }
395                 "-f" = {
396                         value = "$http_onredirect$"
397                         description = "How to handle redirect pages"
398                 }
399                 "-m" = {
400                         value = "$http_pagesize$"
401                         description = "Minim page size required:Maximum page size required"
402                 }
403                 "-t" = {
404                         value = "$http_timeout$"
405                         description = "Seconds before connection times out"
406                 }
407         }
408
409         vars.http_address = "$check_address$"
410         vars.http_ssl = false
411         vars.http_sni = false
412         vars.http_linespan = false
413         vars.http_invertregex = false
414 }
415
416 object CheckCommand "ftp" {
417         import "plugin-check-command"
418         import "ipv4-or-ipv6"
419
420         command = [ PluginDir + "/check_ftp" ]
421
422         arguments = {
423                 "-H" = {
424                         value = "$ftp_address$"
425                         description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
426                 }
427                 "-p" = {
428                         value = "$ftp_port$"
429                         description = "The FTP port number. Defaults to none"
430                 }
431                 "-e" = {
432                         value = "$ftp_expect$"
433                         description = "String to expect in server response (may be repeated)."
434                 }
435                 "-A" = {
436                         set_if = "$ftp_all$"
437                         description = "All expect strings need to occur in server response. Default is any."
438                 }
439                 "-E_send" = {
440                         key = "-E"
441                         order = 1
442                         set_if = "$ftp_escape_send$"
443                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
444                 }
445                 "-s" = {
446                         order = 2
447                         value = "$ftp_send$"
448                         description = "String to send to the server."
449                 }
450                 "-E_quit" = {
451                         key = "-E"
452                         order = 3
453                         set_if = "$ftp_escape_quit$"
454                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
455                 }
456                 "-q" = {
457                         order = 4
458                         value = "$ftp_quit$"
459                         description = "String to send server to initiate a clean close of the connection."
460                 }
461                 "-r" = {
462                         value = "$ftp_refuse$"
463                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
464                 }
465                 "-M" = {
466                         value = "$ftp_mismatch$"
467                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
468                 }
469                 "-j" = {
470                         set_if = "$ftp_jail$"
471                         description = "Hide output from TCP socket."
472                 }
473                 "-m" = {
474                         value = "$ftp_maxbytes$"
475                         description = "Close connection once more than this number of bytes are received."
476                 }
477                 "-d" = {
478                         value = "$ftp_delay$"
479                         description = "Seconds to wait between sending string and polling for response."
480                 }
481                 "-D" = {
482                         value = "$ftp_certificate$"
483                         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."
484                 }
485                 "-S" = {
486                         set_if = "$ftp_ssl$"
487                         description = "Use SSL for the connection."
488                 }
489                 "-w" = {
490                         value = "$ftp_wtime$"
491                         description = "Response time to result in warning status (seconds)."
492                 }
493                 "-c" = {
494                         value = "$ftp_ctime$"
495                         description = "Response time to result in critical status (seconds)."
496                 }
497                 "-t" = {
498                         value = "$ftp_timeout$"
499                         description = "Seconds before connection times out. Defaults to 10."
500                 }
501         }
502
503         vars.ftp_address = "$check_address$"
504         vars.ftp_ssl = false
505         vars.ftp_refuse = "crit"
506         vars.ftp_mismatch = "warn"
507         vars.ftp_timeout = 10
508 }
509
510 object CheckCommand "smtp" {
511         import "plugin-check-command"
512         import "ipv4-or-ipv6"
513
514         command = [ PluginDir + "/check_smtp" ]
515
516         arguments = {
517                 "-H" = "$smtp_address$"
518                 "-p" = "$smtp_port$"
519                 "-f" = "$smtp_mail_from$"
520                 "-e" = "$smtp_expect$"
521                 "-C" = "$smtp_command$"
522                 "-R" = "$smtp_response$"
523                 "-F" = "$smtp_helo_fqdn$"
524                 "-D" = "$smtp_certificate_age$"
525                 "-S" = "$smtp_starttls$"
526                 "-A" = "$smtp_authtype$"
527                 "-U" = "$smtp_authuser$"
528                 "-P" = "$smtp_authpass$"
529                 "-q" = "$smtp_ignore_quit$"
530                 "-w" = "$smtp_warning$"
531                 "-c" = "$smtp_critical$"
532                 "-t" = "$smtp_timeout$"
533         }
534
535         vars.smtp_address = "$check_address$"
536 }
537
538 object CheckCommand "ssmtp" {
539         import "plugin-check-command"
540         import "ipv4-or-ipv6"
541
542         command = [ PluginDir + "/check_ssmtp" ]
543         arguments = {
544                 "-H" = "$ssmtp_address$"
545                 "-p" = "$ssmtp_port$"
546         }
547
548         vars.ssmtp_address = "$check_address$"
549 }
550
551 object CheckCommand "imap" {
552         import "plugin-check-command"
553         import "ipv4-or-ipv6"
554
555         command = [ PluginDir + "/check_imap" ]
556
557         arguments = {
558                 "-H" = "$imap_address$"
559                 "-p" = "$imap_port$"
560                 "-t" = "$imap_timeout$"
561         }
562
563         vars.imap_address = "$check_address$"
564 }
565
566 object CheckCommand "simap" {
567         import "plugin-check-command"
568         import "ipv4-or-ipv6"
569
570           command = [ PluginDir + "/check_simap" ]
571
572         arguments = {
573                 "-H" = "$simap_address$"
574                 "-p" = "$simap_port$"
575                 "-t" = "$simap_timeout$"
576         }
577
578         vars.simap_address = "$check_address$"
579 }
580
581 object CheckCommand "pop" {
582         import "plugin-check-command"
583         import "ipv4-or-ipv6"
584
585         command = [ PluginDir + "/check_pop" ]
586
587         arguments = {
588                 "-H" = "$pop_address$"
589                 "-p" = "$pop_port$"
590                 "-t" = "$pop_timeout$"
591         }
592
593         vars.pop_address = "$check_address$"
594 }
595
596 object CheckCommand "spop" {
597         import "plugin-check-command"
598         import "ipv4-or-ipv6"
599
600         command = [ PluginDir + "/check_spop" ]
601
602         arguments = {
603                 "-H" = "$spop_address$"
604                 "-p" = "$spop_port$"
605                 "-t" = "$spop_timeout$"
606         }
607
608         vars.spop_address = "$check_address$"
609 }
610
611 object CheckCommand "ntp_time" {
612         import "plugin-check-command"
613         import "ipv4-or-ipv6"
614
615         command = [ PluginDir + "/check_ntp_time" ]
616
617         arguments = {
618                 "-H" = "$ntp_address$"
619                 "-p" = "$ntp_port$"
620                 "-q" = "$ntp_quit$"
621                 "-w" = "$ntp_warning$"
622                 "-c" = "$ntp_critical$"
623                 "-o" = "$ntp_timeoffset$"
624                 "-t" = "$ntp_timeout$"
625         }
626
627         vars.ntp_address = "$check_address$"
628 }
629
630 object CheckCommand "ntp_peer" {
631         import "plugin-check-command"
632         import "ipv4-or-ipv6"
633
634         command = [ PluginDir + "/check_ntp_peer" ]
635
636         arguments = {
637                 "-H" = "$ntp_address$"
638                 "-p" = "$ntp_port$"
639                 "-w" = "$ntp_warning$"
640                 "-c" = "$ntp_critical$"
641                 "-W" = "$ntp_wstratum$"
642                 "-C" = "$ntp_cstratum$"
643                 "-j" = "$ntp_wjitter$"
644                 "-k" = "$ntp_cjitter$"
645                 "-m" = "$ntp_wsource$"
646                 "-n" = "$ntp_csource$"
647                 "-t" = "$ntp_timeout$"
648         }
649
650         vars.ntp_address = "$check_address$"
651 }
652
653 object CheckCommand "ssh" {
654         import "plugin-check-command"
655         import "ipv4-or-ipv6"
656
657         command = [ PluginDir + "/check_ssh" ]
658
659         arguments = {
660                 "-p" = "$ssh_port$"
661                 "-t" = "$ssh_timeout$"
662                 "host" = {
663                         value = "$ssh_address$"
664                         skip_key = true
665                         order = 1
666                 }
667         }
668
669         vars.ssh_address = "$check_address$"
670 }
671
672 object CheckCommand "disk" {
673         import "plugin-check-command"
674
675         command = [ PluginDir + "/check_disk" ]
676
677         arguments = {
678                 "-w" = {
679                         value = "$disk_wfree$"
680                         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"
681                         required = true
682                         order = -3
683                 }
684
685                 "-c" = {
686                         value = "$disk_cfree$"
687                         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"
688                         required = true
689                         order = -3
690                 }
691
692                 "-W" = {
693                         value = "$disk_inode_wfree$"
694                         description = "Exit with WARNING status if less than PERCENT of inode space is free"
695                 }
696
697                 "-K" = {
698                         value = "$disk_inode_cfree$"
699                         description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
700                 }
701
702                 "-p" = {
703                         value = "$disk_partitions$"
704                         description = "Path or partition (may be repeated)"
705                         repeat_key = true
706                         order = 1
707                 }
708
709                 "-p_old" = {
710                         key = "-p"
711                         value = "$disk_partition$"
712                         order = 1
713                 }
714
715                 "-x" = {
716                         value = "$disk_partitions_excluded$"
717                         description = "Ignore device (only works if -p unspecified)"
718                 }
719
720                 "-x_old" = {
721                         key = "-x"
722                         value = "$disk_partition_excluded$"
723                 }
724
725                 "-C" = {
726                         set_if = "$disk_clear$"
727                         description = "Clear thresholds"
728                 }
729
730                 "-E" = {
731                         set_if = "$disk_exact_match$"
732                         description = "For paths or partitions specified with -p, only check for exact paths"
733                 }
734
735                 "-e" = {
736                         set_if = "$disk_errors_only$"
737                         description = "Display only devices/mountpoints with errors"
738                 }
739
740                 "-g" = {
741                         value = "$disk_group$"
742                         description = "Group paths. Thresholds apply to (free-)space of all partitions together"
743                 }
744
745                 "-k" = {
746                         set_if = "$disk_kilobytes$"
747                         description = "Same as --units kB"
748                 }
749
750                 "-l" = {
751                         set_if = "$disk_local$"
752                         description = " Only check local filesystems"
753                 }
754
755                 "-L" = {
756                         set_if = "$disk_stat_remote_fs$"
757                         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)"
758                 }
759
760                 "-M" = {
761                         set_if = "$disk_mountpoint$"
762                         description = "Display the mountpoint instead of the partition"
763                 }
764
765                 "-m" = {
766                         set_if = "$disk_megabytes$"
767                         description = "Same as --units MB"
768                 }
769
770                 "-A" = {
771                         set_if = "$disk_all$"
772                         description = "Explicitly select all paths. This is equivalent to -R .*"
773                 }
774
775                 "-R" = {
776                         value = "$disk_eregi_path$"
777                         description = "Case insensitive regular expression for path/partition (may be repeated)"
778                         repeat_key = true
779                 }
780
781                 "-r" = {
782                         value = "$disk_ereg_path$"
783                         description = "Regular expression for path or partition (may be repeated)"
784                         repeat_key = true
785                 }
786
787                 "-I" = {
788                         value = "$disk_ignore_eregi_path$"
789                         description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
790                         repeat_key = true
791                         order = 2
792                 }
793
794                 "-i" = {
795                         value = "$disk_ignore_ereg_path$"
796                         description = "Regular expression to ignore selected path or partition (may be repeated)"
797                         repeat_key = true
798                         order = 2
799                 }
800
801                 "-t" = {
802                         value = "$disk_timeout$"
803                         description = "Seconds before connection times out (default: 10)"
804                 }
805
806                 "-u" = {
807                         value = "$disk_units$"
808                         description = "Choose bytes, kB, MB, GB, TB (default: MB)"
809                 }
810
811                 "-X" = {
812                         value = "$disk_exclude_type$"
813                         description = "Ignore all filesystems of indicated type (may be repeated)"
814                         repeat_key = true
815                 }
816         }
817
818         vars.disk_wfree = "20%"
819         vars.disk_cfree = "10%"
820         vars.disk_inode_wfree = "20%"
821         vars.disk_inode_cfree = "10%"
822         vars.disk_megabytes = true
823         vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"]
824 }
825
826 object CheckCommand "disk_smb" {
827         import "plugin-check-command"
828
829         command = [ PluginDir + "/check_disk_smb" ]
830
831         arguments = {
832                 "-H" = {
833                         value = "$disk_smb_hostname$"
834                         description = "NetBIOS name of the server."
835                 }
836                 "-s" = {
837                         value = "$disk_smb_share$"
838                         description = "Share name to be tested."
839                 }
840                 "-W" = {
841                         value = "$disk_smb_workgroup$"
842                         description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
843                 }
844                 "-a" = {
845                         value = "$disk_smb_address$"
846                         description = "IP-address of HOST (only necessary if HOST is in another network)."
847                 }
848                 "-u" = {
849                         value = "$disk_smb_username$"
850                         description = "Username to log in to server. (Defaults to 'guest' if omitted)."
851                 }
852                 "-p" = {
853                         value = "$disk_smb_password$"
854                         description = "Password to log in to server. (Defaults to an empty password if omitted)."
855                 }
856                 "-w" = {
857                         value = "$disk_smb_wused$"
858                         description = "Percent of used space at which a warning will be generated (Default: 85%)."
859                 }
860                 "-c" = {
861                         value = "$disk_smb_cused$"
862                         description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
863                 }
864                 "-P" = {
865                         value = "$disk_smb_port$"
866                         description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
867                 }
868         }
869
870         vars.disk_smb_wused = "85%"
871         vars.disk_smb_cused = "95%"
872 }
873
874 object CheckCommand "users" {
875         import "plugin-check-command"
876
877         command = [ PluginDir + "/check_users" ]
878
879         arguments = {
880                 "-w" = "$users_wgreater$"
881                 "-c" = "$users_cgreater$"
882         }
883
884         vars.users_wgreater = 20
885         vars.users_cgreater = 50
886 }
887
888 object CheckCommand "procs" {
889         import "plugin-check-command"
890
891         command = [ PluginDir + "/check_procs" ]
892
893         arguments = {
894                 "-w" = {
895                         value = "$procs_warning$"
896                         description = "Generate warning state if metric is outside this range" 
897                 }
898                 "-c" = {
899                         value = "$procs_critical$"
900                         description = "Generate critical state if metric is outside this range" 
901                 }
902                 "-m" = {
903                         value = "$procs_metric$"
904                         description = "Check thresholds against metric" 
905                 }
906                 "-t" = {
907                         value = "$procs_timeout$"
908                         description = "Seconds before plugin times out"
909                 }
910                 "-T" = {
911                         set_if = "$procs_traditional$"
912                         description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
913                 }
914                 "-s" = {
915                         value = "$procs_state$"
916                         description = "Only scan for processes that have one or more of the status flags you specify"
917                 }
918                 "-p" = {
919                         value = "$procs_ppid$"
920                         description = "Only scan for children of the parent process ID indicated"
921                 }
922                 "-z" = {
923                         value = "$procs_vsz$"
924                         description = "Only scan for processes with VSZ higher than indicated"
925                 }
926                 "-r" = {
927                         value = "$procs_rss$"
928                         description = "Only scan for processes with RSS higher than indicated"
929                 }
930                 "-P" = {
931                         value = "$procs_pcpu$"
932                         description = "Only scan for processes with PCPU higher than indicated"
933                 }
934                 "-u" = {
935                         value = "$procs_user$"
936                         description = "Only scan for processes with user name or ID indicated"
937                 }
938                 "-a" = {
939                         value = "$procs_argument$"
940                         description = "Only scan for processes with args that contain STRING"
941                 }
942                 "--ereg-argument-array" = {
943                         value = "$procs_argument_regex$"
944                         description = "Only scan for processes with args that contain the regex STRING"
945                 }
946                 "-C" = {
947                         value = "$procs_command$"
948                         description = "Only scan for exact matches of COMMAND (without path)"
949                 }
950                 "-k" = {
951                         set_if = "$procs_nokthreads$"
952                         description = "Only scan for non kernel threads"
953                 }
954         }
955
956         vars.procs_traditional = false
957         vars.procs_nokthreads = false
958         vars.procs_warning = 250
959         vars.procs_critical = 400
960 }
961
962 object CheckCommand "swap" {
963         import "plugin-check-command"
964
965         command = [ PluginDir + "/check_swap" ]
966
967         arguments = {
968                 "-w" = "$swap_wfree$%"
969                 "-c" = "$swap_cfree$%"
970         }
971
972         vars.swap_wfree = 50
973         vars.swap_cfree = 25
974 }
975
976 object CheckCommand "load" {
977         import "plugin-check-command"
978
979         command = [ PluginDir + "/check_load" ]
980
981         arguments = {
982                 "-w" = {
983                         value = "$load_wload1$,$load_wload5$,$load_wload15$"
984                         description = "Exit with WARNING status if load average exceeds WLOADn"
985                 }
986                 "-c" = {
987                         value = "$load_cload1$,$load_cload5$,$load_cload15$"
988                         description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
989                 }
990                 "-r" = {
991                         set_if = "$load_percpu$"
992                         description = "Divide the load averages by the number of CPUs (when possible)"
993                 }
994         }
995
996         vars.load_wload1 = 5.0
997         vars.load_wload5 = 4.0
998         vars.load_wload15 = 3.0
999
1000         vars.load_cload1 = 10.0
1001         vars.load_cload5 = 6.0
1002         vars.load_cload15 = 4.0
1003
1004         vars.load_percpu = false
1005 }
1006
1007 object CheckCommand "snmp" {
1008         import "plugin-check-command"
1009
1010         command = [ PluginDir + "/check_snmp" ]
1011
1012         arguments = {
1013                 "-H" = "$snmp_address$"
1014                 "-o" = "$snmp_oid$"
1015                 "-C" = "$snmp_community$"
1016                 "-c" = "$snmp_crit$"
1017                 "-w" = "$snmp_warn$"
1018                 "-s" = "$snmp_string$"
1019                 "-r" = "$snmp_ereg$"
1020                 "-R" = "$snmp_eregi$"
1021                 "-l" = "$snmp_label$"
1022                 "-u" = "$snmp_units$"
1023                 "-t" = "$snmp_timeout$"
1024                 "-p" = "$snmp_port$"
1025                 "--invert-search" = {
1026                         set_if = "$snmp_invert_search$"
1027                         description = "Invert search result and return CRITICAL if found"
1028                 }
1029                 "-P" = "$snmp_version$"
1030                 "-m" = "$snmp_miblist$"
1031                 "--rate-multiplier" = "$snmp_rate_multiplier$"
1032                 "--rate" = {
1033                         set_if = "$snmp_rate$"
1034                         description = "Enable rate calculation"
1035                 }
1036                 "-n" = {
1037                         set_if = "$snmp_getnext$"
1038                         description = "Use SNMP GETNEXT instead of SNMP GET"
1039                 }
1040         }
1041
1042         vars.snmp_address = {{
1043                 var addr_v4 = macro("$address$")
1044                 var addr_v6 = macro("$address6$")
1045
1046                 if (addr_v4) {
1047                         return addr_v4
1048                 } else {
1049                         return "udp6:[" + addr_v6 + "]"
1050                 }
1051         }}
1052
1053         vars.snmp_community = "public"
1054         vars.snmp_invert_search = false
1055         vars.snmp_timeout = "10"
1056 }
1057
1058 object CheckCommand "snmpv3" {
1059         import "plugin-check-command"
1060         import "ipv4-or-ipv6"
1061
1062         command = [ PluginDir + "/check_snmp" ]
1063
1064         arguments = {
1065                 "-H" = {
1066                                 value = "$snmpv3_address$"
1067                                 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1068                 }
1069                 "-n" = {
1070                                 set_if = "$snmpv3_getnext$"
1071                                 description = "Use SNMP GETNEXT instead of SNMP GET"
1072                 }
1073                 "-P" = {
1074                                 value = 3
1075                                 description = "SNMP protocol version"
1076                 }
1077                 "-L" = {
1078                                 value = "$snmpv3_seclevel$"
1079                                 description = "SNMPv3 securityLevel"
1080                 }
1081                 "-a" = {
1082                                 value = "$snmpv3_auth_alg$"
1083                                 description = "SNMPv3 auth proto"
1084                 }
1085                 "-U" = {
1086                                 value = "$snmpv3_user$"
1087                                 description = "SNMPv3 username"
1088                 }
1089                 "-A" = {
1090                                 value = "$snmpv3_auth_key$"
1091                                 description = "SNMPv3 authentication password"
1092                 }
1093                 "-X" = {
1094                                 value = "$snmpv3_priv_key$"
1095                                 description = "SNMPv3 privacy password"
1096                 }
1097                 "-o" = {
1098                                 value = "$snmpv3_oid$"
1099                                 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1100                 }
1101                 "-x" = {
1102                                 value = "$snmpv3_priv_alg$"
1103                                 description = "SNMPv3 priv proto (default DES)"
1104                 }
1105                 "-w" = {
1106                                 value = "$snmpv3_warn$"
1107                                 description = "Warning threshold range(s)"
1108                 }
1109                 "-c" = {
1110                                 value = "$snmpv3_crit$"
1111                                 description = "Critical threshold range(s)"
1112                 }
1113                 "-s" = {
1114                                 value = "$snmpv3_string$"
1115                                 description = "Return OK state (for that OID) if STRING is an exact match"
1116                 }
1117                 "-r" = {
1118                                 value = "$snmpv3_ereg$"
1119                                 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1120                 }
1121                 "-R" = {
1122                                 value = "$snmpv3_eregi$"
1123                                 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1124                 }
1125                 "--invert-search" = {
1126                                 set_if = "$snmpv3_invert_search$"
1127                                 description = "Invert search result and return CRITICAL if found"
1128                 }
1129                 "-l" = {
1130                                 value = "$snmpv3_label$"
1131                                 description = "Prefix label for output from plugin"
1132                 }
1133         }
1134
1135         vars.snmpv3_address = "$check_address$"
1136         vars.snmpv3_auth_alg = "SHA"
1137         vars.snmpv3_priv_alg = "AES"
1138         vars.snmpv3_seclevel = "authPriv"
1139 }
1140
1141 object CheckCommand "snmp-uptime" {
1142         import "snmp"
1143
1144         vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1145 }
1146
1147 object CheckCommand "apt" {
1148         import "plugin-check-command"
1149
1150         command = [ PluginDir + "/check_apt" ]
1151 }
1152
1153 object CheckCommand "dhcp" {
1154         import "plugin-check-command"
1155
1156         command = [ PluginDir + "/check_dhcp" ]
1157
1158         arguments = {
1159                 "-s" = "$dhcp_serverip$"
1160                 "-r" = "$dhcp_requestedip$"
1161                 "-t" = "$dhcp_timeout$"
1162                 "-i" = "$dhcp_interface$"
1163                 "-m" = "$dhcp_mac$"
1164                 "-u" = {
1165                         set_if = "$dhcp_unicast$"
1166                 }
1167         }
1168
1169         vars.dhcp_unicast = false
1170 }
1171
1172 object CheckCommand "dns" {
1173         import "plugin-check-command"
1174         import "ipv4-or-ipv6"
1175
1176         command = [ PluginDir + "/check_dns" ]
1177
1178         arguments = {
1179                 "-H" = {
1180                         value = "$dns_lookup$"
1181                         description = "The name or address you want to query."
1182                 }
1183                 "-s" = {
1184                         value = "$dns_server$"
1185                         description = "Optional DNS server you want to use for the lookup."
1186                 }
1187                 "-a" = {
1188                         value = "$dns_expected_answers$"
1189                         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)."
1190                 }
1191                 "-a_old" = {
1192                         key = "-a"
1193                         value ="$dns_expected_answer$"
1194                 }
1195                 "-A" = {
1196                         set_if = "$dns_authoritative$"
1197                 }
1198                 "-w" = {
1199                         value = "$dns_wtime$"
1200                         description = "Return warning if elapsed time exceeds value."
1201                 }
1202                 "-c" = {
1203                         value = "$dns_ctime$"
1204                         description = "Return critical if elapsed time exceeds value."
1205                 }
1206                 "-t" = {
1207                         value = "$dns_timeout$"
1208                         description = "Seconds before connection times out. Defaults to 10."
1209                 }
1210         }
1211
1212         vars.dns_lookup = "$host.name$"
1213         vars.dns_expected_answer = "$check_address$"
1214         vars.dns_timeout = 10
1215 }
1216
1217 object CheckCommand "dig" {
1218         import "plugin-check-command"
1219         import "ipv4-or-ipv6"
1220
1221         command = [ PluginDir + "/check_dig" ]
1222
1223         arguments = {
1224                 "-H" = "$dig_server$"
1225                 "-p" = "$dig_port$"
1226                 "-l" = "$dig_lookup$"
1227                 "-T" = "$dig_record_type$"
1228                 "-a" = "$dig_expected_address$"
1229                 "-A" = "$dig_arguments$"
1230                 "-r" = "$dig_retries$"
1231                 "-w" = "$dig_warning$"
1232                 "-c" = "$dig_critical$"
1233                 "-t" = "$dig_timeout$"
1234         }
1235
1236         vars.dig_server = "$check_address$"
1237 }
1238
1239 object CheckCommand "nscp" {
1240         import "plugin-check-command"
1241         import "ipv4-or-ipv6"
1242
1243         command = [ PluginDir + "/check_nt" ]
1244
1245         arguments = {
1246                 "-H" = "$nscp_address$"
1247                 "-p" = "$nscp_port$"
1248                 "-s" = "$nscp_password$"
1249                 "-v" = {
1250                         value = "$nscp_variable$"
1251                         required = true
1252                 }
1253                 "-l" = {
1254                         value = "$nscp_params$"
1255                         repeat_key = false
1256                 }
1257                 "-w" = "$nscp_warn$"
1258                 "-c" = "$nscp_crit$"
1259                 "-t" = "$nscp_timeout$"
1260                 "-d" = {
1261                         value = "SHOWALL"
1262                         description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
1263                         set_if = "$nscp_showall$"
1264                 }
1265         }
1266
1267         vars.nscp_address = "$check_address$"
1268         vars.nscp_port = 12489
1269         vars.nscp_showall = false
1270 }
1271
1272 object CheckCommand "by_ssh" {
1273         import "plugin-check-command"
1274         import "ipv4-or-ipv6"
1275
1276         command = [ PluginDir + "/check_by_ssh" ]
1277
1278         arguments = {
1279                 "-H" = "$by_ssh_address$"
1280                 "-p" = "$by_ssh_port$"
1281                 "-C" = {{
1282                         var command = macro("$by_ssh_command$")
1283                         var arguments = macro("$by_ssh_arguments$")
1284
1285                         if (typeof(command) == String && !arguments) {
1286                                 return command
1287                         }
1288
1289                         var escaped_args = []
1290                         for (arg in resolve_arguments(command, arguments)) {
1291                                 escaped_args.add(escape_shell_arg(arg))
1292                         }
1293                         return escaped_args.join(" ")
1294                 }}
1295                 "-l" = "$by_ssh_logname$"
1296                 "-i" = "$by_ssh_identity$"
1297                 "-q" = {
1298                         set_if = "$by_ssh_quiet$"
1299                 }
1300                 "-w" = "$by_ssh_warn$"
1301                 "-c" = "$by_ssh_crit$"
1302                 "-t" = "$by_ssh_timeout$"
1303         }
1304
1305         vars.by_ssh_address = "$check_address$"
1306         vars.by_ssh_quiet = false
1307 }
1308
1309 object CheckCommand "ups" {
1310         import "plugin-check-command"
1311         import "ipv4-or-ipv6"
1312
1313         command = [ PluginDir + "/check_ups" ]
1314
1315         arguments = {
1316                 "-H" = {
1317                         value = "$ups_address$"
1318                         description = "Address of the upsd server"
1319                         required = true
1320                 }
1321                 "-u" = {
1322                         value = "$ups_name$"
1323                         description = "Name of the UPS to monitor"
1324                         required = true
1325                 }
1326                 "-p" = {
1327                         value = "$ups_port$"
1328                         description = "Port number (default: 3493)"
1329                 }
1330                 "-v" = {
1331                         value = "$ups_variable$"
1332                         description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
1333                 }
1334                 "-w" = {
1335                         value = "$ups_warning$"
1336                         description = "Warning threshold for the selected variable"
1337                 }
1338                 "-c" = {
1339                         value = "$ups_critical$"
1340                         description = "Critical threshold for the selected variable"
1341                 }
1342                 "-T" = {
1343                         set_if = "$ups_celsius$"
1344                         description = "Display temperature in degrees Celsius instead of Fahrenheit"
1345                 }
1346                 "-t" = {
1347                         value = "$ups_timeout$"
1348                         description = "Seconds before the connection times out (default: 10)"
1349                 }
1350         }
1351
1352         vars.ups_address = "$check_address$"
1353         vars.ups_name = "ups"
1354 }
1355
1356 object CheckCommand "nrpe" {
1357         import "plugin-check-command"
1358         import "ipv4-or-ipv6"
1359
1360         command = [ PluginDir + "/check_nrpe" ]
1361
1362         arguments = {
1363                 "-H" = "$nrpe_address$"
1364                 "-p" = "$nrpe_port$"
1365                 "-c" = "$nrpe_command$"
1366                 "-n" = {
1367                         set_if = "$nrpe_no_ssl$"
1368                         description = "Do not use SSL."
1369                 }
1370                 "-u" = {
1371                         set_if = "$nrpe_timeout_unknown$"
1372                         description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
1373                 }
1374                 "-t" = "$nrpe_timeout$"
1375                 "-a" = {
1376                         value = "$nrpe_arguments$"
1377                         repeat_key = false
1378                         order = 1
1379                 }
1380                 "-4" = {
1381                         set_if = "$nrpe_ipv4$"
1382                         description = "Use ipv4 only"
1383                 }
1384                 "-6" = {
1385                         set_if = "$nrpe_ipv6$"
1386                         description = "Use ipv6 only"
1387                 }
1388         }
1389
1390         vars.nrpe_address = "$check_address$"
1391         vars.nrpe_no_ssl = false
1392         vars.nrpe_timeout_unknown = false
1393
1394         timeout = 5m
1395 }
1396
1397 object CheckCommand "hpjd" {
1398         import "plugin-check-command"
1399         import "ipv4-or-ipv6"
1400
1401         command = [ PluginDir + "/check_hpjd" ]
1402
1403         arguments = {
1404                 "-H" = "$hpjd_address$"
1405                 "-C" = "$hpjd_community$"
1406                 "-p" = "$hpjd_port$"
1407         }
1408
1409         vars.hpjd_address = "$check_address$"
1410 }
1411
1412 object CheckCommand "icmp" {
1413         import "plugin-check-command"
1414
1415         command = [ PluginDir + "/check_icmp" ]
1416
1417         arguments = {
1418                 "-H" = {
1419                         value = "$icmp_address$"
1420                         repeat_key = false
1421                         order = 1
1422                 }
1423                 "-w" = "$icmp_wrta$,$icmp_wpl$%"
1424                 "-c" = "$icmp_crta$,$icmp_cpl$%"
1425                 "-s" = "$icmp_source$"
1426                 "-n" = "$icmp_packets$"
1427                 "-i" = "$icmp_packet_interval$"
1428                 "-I" = "$icmp_target_interval$"
1429                 "-m" = "$icmp_hosts_alive$"
1430                 "-b" = "$icmp_data_bytes$"
1431                 "-t" = "$icmp_timeout$"
1432         }
1433
1434         vars.icmp_address = "$address$"
1435         vars.icmp_wrta = 100
1436         vars.icmp_wpl = 5
1437         vars.icmp_crta = 200
1438         vars.icmp_cpl = 15
1439 }
1440
1441 object CheckCommand "ldap" {
1442     import "plugin-check-command"
1443     import "ipv4-or-ipv6"
1444
1445         command = [ PluginDir + "/check_ldap" ]
1446
1447         arguments = {
1448                 "-H" = {
1449                         value = "$ldap_address$"
1450                         description = "Host name, IP Address, or unix socket (must be an absolute path)"
1451                 }
1452                 "-p" = {
1453                         value = "$ldap_port$"
1454                         description = "Port number (default: 389)"
1455                 }
1456                 "-a" = {
1457                         value = "$ldap_attr$"
1458                         description = "ldap attribute to search (default: \"(objectclass=*)\""
1459                 }
1460                 "-b" = {
1461                         value = "$ldap_base$"
1462                         required = true
1463                         description = "ldap base (eg. ou=my unit, o=my org, c=at"
1464                 }
1465                 "-D" = {
1466                         value = "$ldap_bind$"
1467                         description = "ldap bind DN (if required)"
1468                 }
1469                 "-P" = {
1470                         value = "$ldap_pass$"
1471                         description = "ldap password (if required)"
1472                 }
1473                 "-T" = {
1474                         set_if = "$ldap_starttls$"
1475                         description = "use starttls mechanism introduced in protocol version 3"
1476                 }
1477                 "-S" = {
1478                         set_if = "$ldap_ssl$"
1479                         description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
1480                 }
1481                 "-2" = {
1482                         set_if = "$ldap_v2$"
1483                         description = "Use LDAP protocol version 2"
1484                 }
1485                 "-3" = {
1486                         set_if = "$ldap_v3$"
1487                         description = "Use LDAP protocol version 3"
1488                 }
1489                 "-w" = {
1490                         value = "$ldap_warning$"
1491                         description = "Response time to result in warning status (seconds)"
1492                 }
1493                 "-c" = {
1494                         value = "$ldap_critical$"
1495                         description = "Response time to result in critical status (seconds)"
1496                 }
1497                 "-t" = {
1498                         value = "$ldap_timeout$"
1499                         description = "Seconds before connection times out (default: 10)"
1500                 }
1501                 "-v" = {
1502                         set_if = "$ldap_verbose$"
1503                         description = "Show details for command-line debugging"
1504                 }
1505         }
1506
1507         vars.ldap_address = "$check_address$"
1508         vars.ldap_v2 = true
1509         vars.ldap_v3 = false
1510         vars.ldap_timeout = 10s
1511         vars.ldap_verbose = false
1512 }
1513
1514 object CheckCommand "clamd" {
1515         import "plugin-check-command"
1516
1517         command = [ PluginDir + "/check_clamd" ]
1518
1519         arguments = {
1520                 "-H" = {
1521                         value = "$clamd_address$"
1522                         description = "The host's address or unix socket (must be an absolute path)."
1523                         required = true
1524                 }
1525                 "-p" = {
1526                         value = "$clamd_port$"
1527                         description = "Port number (default: none)."
1528                 }
1529                 "-e" = {
1530                         value = "$clamd_expect$"
1531                         description = "String to expect in server response (may be repeated)."
1532                         repeat_key = true
1533                 }
1534                 "-A" = {
1535                         set_if = "$clamd_all$"
1536                         description = "All expect strings need to occur in server response. Default is any."
1537                 }
1538                 "-E_send" = {
1539                         key = "-E"
1540                         order = 1
1541                         set_if = "$clamd_escape_send$"
1542                         description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
1543                 }
1544                 "-s" = {
1545                         order = 2
1546                         value = "$clamd_send$"
1547                         description = "String to send to the server."
1548                 }
1549                 "-E_quit" = {
1550                         key = "-E"
1551                         order = 3
1552                         set_if = "$clamd_escape_quit$"
1553                         description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
1554                 }
1555                 "-q" = {
1556                         order = 4
1557                         value = "$clamd_quit$"
1558                         description = "String to send server to initiate a clean close of the connection."
1559                 }
1560                 "-r" = {
1561                         value = "$clamd_refuse$"
1562                         description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
1563                 }
1564                 "-M" = {
1565                         value = "$clamd_mismatch$"
1566                         description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
1567                 }
1568                 "-j" = {
1569                         set_if = "$clamd_jail$"
1570                         description = "Hide output from TCP socket."
1571                 }
1572                 "-m" = {
1573                         value = "$clamd_maxbytes$"
1574                         description = "Close connection once more than this number of bytes are received."
1575                 }
1576                 "-d" = {
1577                         value = "$clamd_delay$"
1578                         description = "Seconds to wait between sending string and polling for response."
1579                 }
1580                 "-D" = {
1581                         value = "$clamd_certificate$"
1582                         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."
1583                 }
1584                 "-S" = {
1585                         set_if = "$clamd_ssl$"
1586                         description = "Use SSL for the connection."
1587                 }
1588                 "-w" = {
1589                         value = "$clamd_wtime$"
1590                         description = "Response time to result in warning status (seconds)."
1591                 }
1592                 "-c" = {
1593                         value = "$clamd_ctime$"
1594                         description = "Response time to result in critical status (seconds)."
1595                 }
1596                 "-t" = {
1597                         value = "$clamd_timeout$"
1598                         description = "Seconds before connection times out. Defaults to 10."
1599                 }
1600         }
1601
1602         vars.clamd_ssl = false
1603         vars.clamd_refuse = "crit"
1604         vars.clamd_mismatch = "warn"
1605         vars.clamd_timeout = 10
1606 }
1607
1608 object CheckCommand "mailq" {
1609         import "plugin-check-command"
1610
1611         command = [ PluginDir + "/check_mailq" ]
1612
1613         arguments = {
1614                 "-w" = {
1615                         value = "$mailq_warning$"
1616                         description = "Min. number of messages in queue to generate warning"
1617                         required = true
1618                 }
1619                 "-c" = {
1620                         value = "$mailq_critical$"
1621                         description = "Min. number of messages in queue to generate critical alert ( w < c )"
1622                         required = true
1623                 }
1624                 "-W" = {
1625                         value = "$mailq_domain_warning$"
1626                         description = "Min. number of messages for same domain in queue to generate warning"
1627                 }
1628                 "-C" = {
1629                         value = "$mailq_domain_critical$"
1630                         description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
1631                 }
1632                 "-t" = {
1633                         value = "$mailq_timeout$"
1634                         description = "Plugin timeout in seconds (default = 15)"
1635                 }
1636                 "-M" = {
1637                         value = "$mailq_servertype$"
1638                         description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
1639                 }
1640         }
1641 }
1642
1643 object CheckCommand "pgsql" {
1644         import "plugin-check-command"
1645         import "ipv4-or-ipv6"
1646
1647         command = [ PluginDir + "/check_pgsql" ]
1648
1649         arguments = {
1650                 "-H" = "$pgsql_hostname$"
1651                 "-P" = "$pgsql_port$"
1652                 "-d" = "$pgsql_database$"
1653                 "-l" = "$pgsql_username$"
1654                 "-p" = "$pgsql_password$"
1655                 "-o" = "$pgsql_options$"
1656                 "-w" = "$pgsql_warning$"
1657                 "-c" = "$pgsql_critical$"
1658                 "-t" = "$pgsql_timeout$"
1659                 "-q" = "$pgsql_query$"
1660                 "-W" = "$pgsql_query_warning$"
1661                 "-C" = "$pgsql_query_critical$"
1662         }
1663
1664         vars.pgsql_hostname = "$check_address$"
1665 }
1666