1 /******************************************************************************
3 * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
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. *
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. *
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 ******************************************************************************/
20 template CheckCommand "ipv4-or-ipv6" {
21 vars.check_address = {{
22 var addr_v4 = macro("$address$")
23 var addr_v6 = macro("$address6$")
25 if (addr_v4 && !macro("$check_ipv6$") || macro("$check_ipv4$")) {
32 vars.check_ipv4 = false
33 vars.check_ipv6 = false
36 template CheckCommand "ping-common" {
37 command = [ PluginDir + "/check_ping" ]
40 "-H" = "$ping_address$"
41 "-w" = "$ping_wrta$,$ping_wpl$%"
42 "-c" = "$ping_crta$,$ping_cpl$%"
43 "-p" = "$ping_packets$"
44 "-t" = "$ping_timeout$"
53 object CheckCommand "ping" {
57 vars.ping_address = "$check_address$"
60 object CheckCommand "ping4" {
65 vars.ping_address = "$address$"
68 object CheckCommand "ping6" {
73 vars.ping_address = "$address6$"
76 template CheckCommand "hostalive-common" {
77 vars.ping_wrta = 3000.0
80 vars.ping_crta = 5000.0
84 object CheckCommand "hostalive" {
86 import "hostalive-common"
89 object CheckCommand "hostalive4" {
91 import "hostalive-common"
94 object CheckCommand "hostalive6" {
96 import "hostalive-common"
99 template CheckCommand "fping-common" {
101 PluginDir + "/check_fping",
106 "-w" = "$fping_wrta$,$fping_wpl$%"
107 "-c" = "$fping_crta$,$fping_cpl$%"
108 "-n" = "$fping_number$"
109 "-i" = "$fping_interval$"
110 "-b" = "$fping_bytes$"
111 "-T" = "$fping_target_timeout$"
112 "-S" = "$fping_source_ip$"
113 "-I" = "$fping_source_interface$"
116 vars.fping_wrta = 100
118 vars.fping_crta = 200
120 vars.fping_number = 5
121 vars.fping_interval = 500
124 object CheckCommand "fping4" {
125 import "fping-common"
129 vars.fping_address = "$address$"
132 object CheckCommand "fping6" {
133 import "fping-common"
137 vars.fping_address = "$address6$"
140 object CheckCommand "dummy" {
141 command = [ PluginDir + "/check_dummy" ]
145 value = "$dummy_state$"
148 description = "The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0."
151 value = "$dummy_text$"
154 description = "Plugin output. Defaults to Check was successful."
159 vars.dummy_text = "Check was successful."
162 object CheckCommand "passive" {
166 vars.dummy_text = "No Passive Check Result Received."
169 object CheckCommand "tcp" {
170 import "ipv4-or-ipv6"
172 command = [ PluginDir + "/check_tcp" ]
176 value = "$tcp_address$"
177 description = "Host name, IP Address, or unix socket (must be an absolute path)."
181 description = "The TCP port number."
184 value = "$tcp_expect$"
185 description = "String to expect in server response (may be repeated)."
189 description = "All expect strings need to occur in server response. Defaults to false."
194 set_if = "$tcp_escape_send$"
195 description = "Enable usage of \n, \r, \t or \\ in send string."
200 description = "String to send to the server."
205 set_if = "$tcp_escape_quit$"
206 description = "Enable usage of \n, \r, \t or \\ in quit string."
211 description = "String to send server to initiate a clean close of the connection."
214 value = "$tcp_refuse$"
215 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
218 value = "$tcp_mismatch$"
219 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
222 set_if = "$tcp_jail$"
223 description = "Hide output from TCP socket."
226 value = "$tcp_maxbytes$"
227 description = "Close connection once more than this number of bytes are received."
230 value = "$tcp_delay$"
231 description = "Seconds to wait between sending string and polling for response."
234 value = "$tcp_certificate$"
235 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."
239 description = "Use SSL for the connection."
242 value = "$tcp_wtime$"
243 description = "Response time to result in warning status (seconds)."
246 value = "$tcp_ctime$"
247 description = "Response time to result in critical status (seconds)."
250 value = "$tcp_timeout$"
251 description = "Seconds before connection times out. Defaults to 10."
254 set_if = "$tcp_ipv4$"
255 description = "Use IPv4 connection"
258 set_if = "$tcp_ipv6$"
259 description = "Use IPv6 connection"
263 vars.tcp_address = "$check_address$"
265 vars.tcp_refuse = "crit"
266 vars.tcp_mismatch = "warn"
267 vars.tcp_timeout = 10
268 vars.check_ipv4 = "$tcp_ipv4$"
269 vars.check_ipv6 = "$tcp_ipv6$"
272 object CheckCommand "ssl" {
273 import "ipv4-or-ipv6"
275 command = [ PluginDir + "/check_tcp" ]
279 value = "$ssl_address$"
280 description = "Host address"
284 description ="TCP port (default: 443)"
288 value = "$ssl_timeout$"
289 description = "Seconds before connection times out (default: 10)"
292 var days_warn = macro("$ssl_cert_valid_days_warn$")
293 var days_critical = macro("$ssl_cert_valid_days_critical$")
296 return days_warn + "," + days_critical
305 vars.ssl_address = "$check_address$"
307 vars.ssl_cert_valid_days_warn = false
308 vars.ssl_cert_valid_days_critical = false
309 vars.ssl_sni = "$ssl_address$"
313 object CheckCommand "udp" {
314 import "ipv4-or-ipv6"
317 PluginDir + "/check_udp",
318 "-H", "$udp_address$",
328 value = "$udp_expect$"
333 set_if = "$udp_ipv4$"
334 description = "Use IPv4 connection"
337 set_if = "$udp_ipv6$"
338 description = "Use IPv6 connection"
342 vars.udp_address = "$check_address$"
343 vars.check_ipv4 = "$udp_ipv4$"
344 vars.check_ipv6 = "$udp_ipv6$"
347 object CheckCommand "http" {
348 import "ipv4-or-ipv6"
350 command = [ PluginDir + "/check_http" ]
353 "-H" = "$http_vhost$"
354 "-I" = "$http_address$"
358 set_if = "$http_ssl$"
361 set_if = "$http_ssl_force_tlsv1$"
364 set_if = "$http_ssl_force_tlsv1_1$"
367 set_if = "$http_ssl_force_tlsv1_2$"
370 set_if = "$http_ssl_force_sslv2$"
373 set_if = "$http_ssl_force_sslv3$"
376 set_if = "$http_ssl_force_tlsv1_or_higher$"
379 set_if = "$http_ssl_force_tlsv1_1_or_higher$"
382 set_if = "$http_ssl_force_tlsv1_2_or_higher$"
385 set_if = "$http_ssl_force_sslv2_or_higher$"
388 set_if = "$http_ssl_force_sslv3_or_higher$"
391 set_if = "$http_sni$"
394 value = "$http_certificate$"
395 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."
398 value = "$http_clientcert$"
399 description = "Name of file contains the client certificate (PEM format)"
402 value = "$http_privatekey$"
403 description = "Name of file contains the private key (PEM format)"
406 value = "$http_auth_pair$"
407 description = "Username:password on sites with basic authentication"
410 set_if = "$http_ignore_body$"
412 "-w" = "$http_warn_time$"
413 "-c" = "$http_critical_time$"
414 "-e" = "$http_expect$"
416 value = "$http_headerstring$"
417 description = "String to expect in the response headers"
420 value = "$http_string$"
421 description = "String to expect in the content"
424 value = "$http_post$"
425 description = "URL encoded http POST data"
428 value = "$http_method$"
429 description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)"
432 value = "$http_maxage$"
433 description = "Warn if document is more than seconds old"
436 value = "$http_contenttype$"
437 description = "Specify Content-Type header when POSTing"
440 set_if = "$http_linespan$"
441 description = "Allow regex to span newline"
445 value = "$http_expect_body_regex$"
446 description = "Search page for regex"
450 value = "$http_expect_body_eregi$"
451 description = "Search page for case-insensitive regex"
455 set_if = "$http_invertregex$"
456 description = "Return CRITICAL if found, OK if not"
459 value = "$http_proxy_auth_pair$"
460 description = "Username:password on proxy-servers with basic authentication"
463 value = "$http_useragent$"
464 description = "String to be sent in http header as User Agent"
467 value = "$http_header$"
468 description = "Any other tags to be sent in http header"
471 set_if = "$http_extendedperfdata$"
472 description = "Print additional perfdata"
475 value = "$http_onredirect$"
476 description = "How to handle redirect pages"
479 value = "$http_pagesize$"
480 description = "Minim page size required:Maximum page size required"
483 value = "$http_timeout$"
484 description = "Seconds before connection times out"
487 set_if = "$http_ipv4$"
488 description = "Use IPv4 connection"
491 set_if = "$http_ipv6$"
492 description = "Use IPv6 connection"
495 set_if = "$http_link$"
496 description = "Wrap output in HTML link"
499 set_if = "$http_verbose$"
500 description = "Show details for command-line debugging"
504 vars.http_address = "$check_address$"
505 vars.http_ssl = false
506 vars.http_sni = false
507 vars.http_linespan = false
508 vars.http_invertregex = false
509 vars.check_ipv4 = "$http_ipv4$"
510 vars.check_ipv6 = "$http_ipv6$"
511 vars.http_link = false
512 vars.http_verbose = false
515 object CheckCommand "ftp" {
516 import "ipv4-or-ipv6"
518 command = [ PluginDir + "/check_ftp" ]
522 value = "$ftp_address$"
523 description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
527 description = "The FTP port number. Defaults to none"
530 value = "$ftp_expect$"
531 description = "String to expect in server response (may be repeated)."
535 description = "All expect strings need to occur in server response. Default is any."
540 set_if = "$ftp_escape_send$"
541 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
546 description = "String to send to the server."
551 set_if = "$ftp_escape_quit$"
552 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
557 description = "String to send server to initiate a clean close of the connection."
560 value = "$ftp_refuse$"
561 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
564 value = "$ftp_mismatch$"
565 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
568 set_if = "$ftp_jail$"
569 description = "Hide output from TCP socket."
572 value = "$ftp_maxbytes$"
573 description = "Close connection once more than this number of bytes are received."
576 value = "$ftp_delay$"
577 description = "Seconds to wait between sending string and polling for response."
580 value = "$ftp_certificate$"
581 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."
585 description = "Use SSL for the connection."
588 value = "$ftp_wtime$"
589 description = "Response time to result in warning status (seconds)."
592 value = "$ftp_ctime$"
593 description = "Response time to result in critical status (seconds)."
596 value = "$ftp_timeout$"
597 description = "Seconds before connection times out. Defaults to 10."
600 set_if = "$ftp_ipv4$"
601 description = "Use IPv4 connection"
604 set_if = "$ftp_ipv6$"
605 description = "Use IPv6 connection"
609 vars.ftp_address = "$check_address$"
611 vars.ftp_refuse = "crit"
612 vars.ftp_mismatch = "warn"
613 vars.ftp_timeout = 10
614 vars.check_ipv4 = "$ftp_ipv4$"
615 vars.check_ipv6 = "$ftp_ipv6$"
618 object CheckCommand "smtp" {
619 import "ipv4-or-ipv6"
621 command = [ PluginDir + "/check_smtp" ]
624 "-H" = "$smtp_address$"
626 "-f" = "$smtp_mail_from$"
627 "-e" = "$smtp_expect$"
628 "-C" = "$smtp_command$"
629 "-R" = "$smtp_response$"
630 "-F" = "$smtp_helo_fqdn$"
631 "-D" = "$smtp_certificate_age$"
633 set_if = "$smtp_starttls$"
634 description = "Use STARTTLS for the connection."
636 "-A" = "$smtp_authtype$"
637 "-U" = "$smtp_authuser$"
638 "-P" = "$smtp_authpass$"
639 "-q" = "$smtp_ignore_quit$"
640 "-w" = "$smtp_warning$"
641 "-c" = "$smtp_critical$"
642 "-t" = "$smtp_timeout$"
644 set_if = "$smtp_ipv4$"
645 description = "Use IPv4 connection"
648 set_if = "$smtp_ipv6$"
649 description = "Use IPv6 connection"
653 vars.smtp_address = "$check_address$"
654 vars.check_ipv4 = "$smtp_ipv4$"
655 vars.check_ipv6 = "$smtp_ipv6$"
658 object CheckCommand "ssmtp" {
659 import "ipv4-or-ipv6"
661 command = [ PluginDir + "/check_ssmtp" ]
664 "-H" = "$ssmtp_address$"
665 "-p" = "$ssmtp_port$"
666 "-E" = "$ssmtp_escape$"
667 "-s" = "$ssmtp_send$"
668 "-e" = "$ssmtp_expect$"
670 set_if = "$ssmtp_all$"
671 description = "All expect strings need to occur in server response. Default is any."
673 "-q" = "$ssmtp_quit$"
674 "-r" = "$ssmtp_refuse$"
675 "-M" = "$ssmtp_mismatch$"
677 set_if = "$ssmtp_jail$"
678 description = "Hide output from TCP socket."
680 "-m" = "$ssmtp_maxbytes$"
681 "-d" = "$ssmtp_delay$"
682 "-D" = "$ssmtp_certificate_age$"
684 set_if = "$ssmtp_ssl$"
685 description = "Use SSL for the connection."
687 "-w" = "$ssmtp_warning$"
688 "-c" = "$ssmtp_critical$"
689 "-t" = "$ssmtp_timeout$"
691 set_if = "$ssmtp_ipv4$"
692 description = "Use IPv4 connection"
695 set_if = "$ssmtp_ipv6$"
696 description = "Use IPv6 connection"
700 vars.ssmtp_address = "$check_address$"
701 vars.check_ipv4 = "$ssmtp_ipv4$"
702 vars.check_ipv6 = "$ssmtp_ipv6$"
705 object CheckCommand "imap" {
706 import "ipv4-or-ipv6"
708 command = [ PluginDir + "/check_imap" ]
711 "-H" = "$imap_address$"
713 "-E" = "$imap_escape$"
715 "-e" = "$imap_expect$"
717 set_if = "$imap_all$"
718 description = "All expect strings need to occur in server response. Default is any."
721 "-r" = "$imap_refuse$"
722 "-M" = "$imap_mismatch$"
724 set_if = "$imap_jail$"
725 description = "Hide output from TCP socket."
727 "-m" = "$imap_maxbytes$"
728 "-d" = "$imap_delay$"
729 "-D" = "$imap_certificate_age$"
731 set_if = "$imap_ssl$"
732 description = "Use SSL for the connection."
734 "-w" = "$imap_warning$"
735 "-c" = "$imap_critical$"
736 "-t" = "$imap_timeout$"
738 set_if = "$imap_ipv4$"
739 description = "Use IPv4 connection"
742 set_if = "$imap_ipv6$"
743 description = "Use IPv6 connection"
747 vars.imap_address = "$check_address$"
748 vars.check_ipv4 = "$imap_ipv4$"
749 vars.check_ipv6 = "$imap_ipv6$"
752 object CheckCommand "simap" {
753 import "ipv4-or-ipv6"
755 command = [ PluginDir + "/check_simap" ]
758 "-H" = "$simap_address$"
759 "-p" = "$simap_port$"
760 "-E" = "$simap_escape$"
761 "-s" = "$simap_send$"
762 "-e" = "$simap_expect$"
764 set_if = "$simap_all$"
765 description = "All expect strings need to occur in server response. Default is any."
767 "-q" = "$simap_quit$"
768 "-r" = "$simap_refuse$"
769 "-M" = "$simap_mismatch$"
771 set_if = "$simap_jail$"
772 description = "Hide output from TCP socket."
774 "-m" = "$simap_maxbytes$"
775 "-d" = "$simap_delay$"
776 "-D" = "$simap_certificate_age$"
778 set_if = "$simap_ssl$"
779 description = "Use SSL for the connection."
781 "-w" = "$simap_warning$"
782 "-c" = "$simap_critical$"
783 "-t" = "$simap_timeout$"
785 set_if = "$simap_ipv4$"
786 description = "Use IPv4 connection"
789 set_if = "$simap_ipv6$"
790 description = "Use IPv6 connection"
794 vars.simap_address = "$check_address$"
795 vars.check_ipv4 = "$simap_ipv4$"
796 vars.check_ipv6 = "$simap_ipv6$"
799 object CheckCommand "pop" {
800 import "ipv4-or-ipv6"
802 command = [ PluginDir + "/check_pop" ]
805 "-H" = "$pop_address$"
807 "-E" = "$pop_escape$"
809 "-e" = "$pop_expect$"
812 description = "All expect strings need to occur in server response. Default is any."
815 "-r" = "$pop_refuse$"
816 "-M" = "$pop_mismatch$"
818 set_if = "$pop_jail$"
819 description = "Hide output from TCP socket."
821 "-m" = "$pop_maxbytes$"
823 "-D" = "$pop_certificate_age$"
826 description = "Use SSL for the connection."
828 "-w" = "$pop_warning$"
829 "-c" = "$pop_critical$"
830 "-t" = "$pop_timeout$"
832 set_if = "$pop_ipv4$"
833 description = "Use IPv4 connection"
836 set_if = "$pop_ipv6$"
837 description = "Use IPv6 connection"
841 vars.pop_address = "$check_address$"
842 vars.check_ipv4 = "$pop_ipv4$"
843 vars.check_ipv6 = "$pop_ipv6$"
846 object CheckCommand "spop" {
847 import "ipv4-or-ipv6"
849 command = [ PluginDir + "/check_spop" ]
852 "-H" = "$spop_address$"
854 "-E" = "$spop_escape$"
856 "-e" = "$spop_expect$"
858 set_if = "$spop_all$"
859 description = "All expect strings need to occur in server response. Default is any."
862 "-r" = "$spop_refuse$"
863 "-M" = "$spop_mismatch$"
865 set_if = "$spop_jail$"
866 description = "Hide output from TCP socket."
868 "-m" = "$spop_maxbytes$"
869 "-d" = "$spop_delay$"
870 "-D" = "$spop_certificate_age$"
872 set_if = "$spop_ssl$"
873 description = "Use SSL for the connection."
875 "-w" = "$spop_warning$"
876 "-c" = "$spop_critical$"
877 "-t" = "$spop_timeout$"
879 set_if = "$spop_ipv4$"
880 description = "Use IPv4 connection"
883 set_if = "$spop_ipv6$"
884 description = "Use IPv6 connection"
888 vars.spop_address = "$check_address$"
889 vars.check_ipv4 = "$spop_ipv4$"
890 vars.check_ipv6 = "$spop_ipv6$"
893 object CheckCommand "ntp_time" {
894 import "ipv4-or-ipv6"
896 command = [ PluginDir + "/check_ntp_time" ]
899 "-H" = "$ntp_address$"
902 set_if = "$ntp_quiet$"
903 description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found"
905 "-w" = "$ntp_warning$"
906 "-c" = "$ntp_critical$"
907 "-o" = "$ntp_timeoffset$"
908 "-t" = "$ntp_timeout$"
910 set_if = "$ntp_ipv4$"
911 description = "Use IPv4 connection"
914 set_if = "$ntp_ipv6$"
915 description = "Use IPv6 connection"
919 vars.ntp_address = "$check_address$"
920 vars.check_ipv4 = "$ntp_ipv4$"
921 vars.check_ipv6 = "$ntp_ipv6$"
924 object CheckCommand "ntp_peer" {
925 import "ipv4-or-ipv6"
927 command = [ PluginDir + "/check_ntp_peer" ]
930 "-H" = "$ntp_address$"
932 "-w" = "$ntp_warning$"
933 "-c" = "$ntp_critical$"
934 "-W" = "$ntp_wstratum$"
935 "-C" = "$ntp_cstratum$"
936 "-j" = "$ntp_wjitter$"
937 "-k" = "$ntp_cjitter$"
938 "-m" = "$ntp_wsource$"
939 "-n" = "$ntp_csource$"
940 "-t" = "$ntp_timeout$"
942 set_if = "$ntp_ipv4$"
943 description = "Use IPv4 connection"
946 set_if = "$ntp_ipv6$"
947 description = "Use IPv6 connection"
951 vars.ntp_address = "$check_address$"
952 vars.check_ipv4 = "$ntp_ipv4$"
953 vars.check_ipv6 = "$ntp_ipv6$"
956 object CheckCommand "ssh" {
957 import "ipv4-or-ipv6"
959 command = [ PluginDir + "/check_ssh" ]
963 "-t" = "$ssh_timeout$"
965 value = "$ssh_address$"
970 set_if = "$ssh_ipv4$"
971 description = "Use IPv4 connection"
974 set_if = "$ssh_ipv6$"
975 description = "Use IPv6 connection"
979 vars.ssh_address = "$check_address$"
980 vars.check_ipv4 = "$ssh_ipv4$"
981 vars.check_ipv6 = "$ssh_ipv6$"
984 object CheckCommand "disk" {
985 command = [ PluginDir + "/check_disk" ]
989 value = "$disk_wfree$"
990 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"
996 value = "$disk_cfree$"
997 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"
1003 value = "$disk_inode_wfree$"
1004 description = "Exit with WARNING status if less than PERCENT of inode space is free"
1008 value = "$disk_inode_cfree$"
1009 description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
1013 value = "$disk_partitions$"
1014 description = "Path or partition (may be repeated)"
1021 value = "$disk_partition$"
1026 value = "$disk_partitions_excluded$"
1027 description = "Ignore device (only works if -p unspecified)"
1032 value = "$disk_partition_excluded$"
1036 set_if = "$disk_clear$"
1037 description = "Clear thresholds"
1041 set_if = "$disk_exact_match$"
1042 description = "For paths or partitions specified with -p, only check for exact paths"
1046 set_if = "$disk_errors_only$"
1047 description = "Display only devices/mountpoints with errors"
1051 set_if = "$disk_ignore_reserved$"
1052 description = "Don't account root-reserved blocks into freespace in perfdata"
1056 value = "$disk_group$"
1057 description = "Group paths. Thresholds apply to (free-)space of all partitions together"
1061 set_if = "$disk_kilobytes$"
1062 description = "Same as --units kB"
1066 set_if = "$disk_local$"
1067 description = " Only check local filesystems"
1071 set_if = "$disk_stat_remote_fs$"
1072 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)"
1076 set_if = "$disk_mountpoint$"
1077 description = "Display the mountpoint instead of the partition"
1081 set_if = "$disk_megabytes$"
1082 description = "Same as --units MB"
1086 set_if = "$disk_all$"
1087 description = "Explicitly select all paths. This is equivalent to -R .*"
1091 value = "$disk_eregi_path$"
1092 description = "Case insensitive regular expression for path/partition (may be repeated)"
1097 value = "$disk_ereg_path$"
1098 description = "Regular expression for path or partition (may be repeated)"
1103 value = "$disk_ignore_eregi_path$"
1104 description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
1110 value = "$disk_ignore_ereg_path$"
1111 description = "Regular expression to ignore selected path or partition (may be repeated)"
1117 value = "$disk_timeout$"
1118 description = "Seconds before connection times out (default: 10)"
1122 value = "$disk_units$"
1123 description = "Choose bytes, kB, MB, GB, TB (default: MB)"
1127 value = "$disk_exclude_type$"
1128 description = "Ignore all filesystems of indicated type (may be repeated)"
1133 vars.disk_wfree = "20%"
1134 vars.disk_cfree = "10%"
1135 vars.disk_megabytes = true
1136 vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ]
1139 object CheckCommand "disk_smb" {
1140 command = [ PluginDir + "/check_disk_smb" ]
1144 value = "$disk_smb_hostname$"
1145 description = "NetBIOS name of the server."
1148 value = "$disk_smb_share$"
1149 description = "Share name to be tested."
1152 value = "$disk_smb_workgroup$"
1153 description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)."
1156 value = "$disk_smb_address$"
1157 description = "IP-address of HOST (only necessary if HOST is in another network)."
1160 value = "$disk_smb_username$"
1161 description = "Username to log in to server. (Defaults to 'guest' if omitted)."
1164 value = "$disk_smb_password$"
1165 description = "Password to log in to server. (Defaults to an empty password if omitted)."
1168 value = "$disk_smb_wused$"
1169 description = "Percent of used space at which a warning will be generated (Default: 85%)."
1172 value = "$disk_smb_cused$"
1173 description = "Percent of used space at which a critical will be generated (Defaults: 95%)"
1176 value = "$disk_smb_port$"
1177 description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)."
1181 vars.disk_smb_wused = "85%"
1182 vars.disk_smb_cused = "95%"
1185 object CheckCommand "users" {
1186 command = [ PluginDir + "/check_users" ]
1189 "-w" = "$users_wgreater$"
1190 "-c" = "$users_cgreater$"
1193 vars.users_wgreater = 20
1194 vars.users_cgreater = 50
1197 object CheckCommand "procs" {
1198 command = [ PluginDir + "/check_procs" ]
1202 value = "$procs_warning$"
1203 description = "Generate warning state if metric is outside this range"
1206 value = "$procs_critical$"
1207 description = "Generate critical state if metric is outside this range"
1210 value = "$procs_metric$"
1211 description = "Check thresholds against metric"
1214 value = "$procs_timeout$"
1215 description = "Seconds before plugin times out"
1218 set_if = "$procs_traditional$"
1219 description = "Filter own process the traditional way by PID instead of /proc/pid/exe"
1222 value = "$procs_state$"
1223 description = "Only scan for processes that have one or more of the status flags you specify"
1226 value = "$procs_ppid$"
1227 description = "Only scan for children of the parent process ID indicated"
1230 value = "$procs_vsz$"
1231 description = "Only scan for processes with VSZ higher than indicated"
1234 value = "$procs_rss$"
1235 description = "Only scan for processes with RSS higher than indicated"
1238 value = "$procs_pcpu$"
1239 description = "Only scan for processes with PCPU higher than indicated"
1242 value = "$procs_user$"
1243 description = "Only scan for processes with user name or ID indicated"
1246 value = "$procs_argument$"
1247 description = "Only scan for processes with args that contain STRING"
1249 "--ereg-argument-array" = {
1250 value = "$procs_argument_regex$"
1251 description = "Only scan for processes with args that contain the regex STRING"
1254 value = "$procs_command$"
1255 description = "Only scan for exact matches of COMMAND (without path)"
1258 set_if = "$procs_nokthreads$"
1259 description = "Only scan for non kernel threads"
1263 vars.procs_traditional = false
1264 vars.procs_nokthreads = false
1265 vars.procs_warning = 250
1266 vars.procs_critical = 400
1269 object CheckCommand "swap" {
1270 command = [ PluginDir + "/check_swap" ]
1274 if (macro("$swap_integer$")) {
1275 return macro("$swap_wfree$")
1277 return macro("$swap_wfree$%")
1281 if (macro("$swap_integer$")) {
1282 return macro("$swap_cfree$")
1284 return macro("$swap_cfree$%")
1288 set_if = "$swap_allswaps$"
1289 description = "Conduct comparisons for all swap partitions, one by one"
1292 value = "$swap_noswap$"
1293 description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\""
1297 vars.swap_wfree = 50
1298 vars.swap_cfree = 25
1299 vars.swap_integer = false
1300 vars.swap_allswaps = false
1303 object CheckCommand "load" {
1304 command = [ PluginDir + "/check_load" ]
1308 value = "$load_wload1$,$load_wload5$,$load_wload15$"
1309 description = "Exit with WARNING status if load average exceeds WLOADn"
1312 value = "$load_cload1$,$load_cload5$,$load_cload15$"
1313 description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
1316 set_if = "$load_percpu$"
1317 description = "Divide the load averages by the number of CPUs (when possible)"
1321 vars.load_wload1 = 5.0
1322 vars.load_wload5 = 4.0
1323 vars.load_wload15 = 3.0
1325 vars.load_cload1 = 10.0
1326 vars.load_cload5 = 6.0
1327 vars.load_cload15 = 4.0
1329 vars.load_percpu = false
1332 object CheckCommand "snmp" {
1333 command = [ PluginDir + "/check_snmp" ]
1336 "-H" = "$snmp_address$"
1338 "-C" = "$snmp_community$"
1339 "-c" = "$snmp_crit$"
1340 "-w" = "$snmp_warn$"
1341 "-s" = "$snmp_string$"
1342 "-r" = "$snmp_ereg$"
1343 "-R" = "$snmp_eregi$"
1344 "-l" = "$snmp_label$"
1345 "-u" = "$snmp_units$"
1346 "-t" = "$snmp_timeout$"
1347 "-p" = "$snmp_port$"
1348 "-e" = "$snmp_retries$"
1349 "--invert-search" = {
1350 set_if = "$snmp_invert_search$"
1351 description = "Invert search result and return CRITICAL if found"
1353 "-P" = "$snmp_version$"
1354 "-m" = "$snmp_miblist$"
1355 "--rate-multiplier" = "$snmp_rate_multiplier$"
1357 set_if = "$snmp_rate$"
1358 description = "Enable rate calculation"
1361 set_if = "$snmp_getnext$"
1362 description = "Use SNMP GETNEXT instead of SNMP GET"
1366 vars.snmp_address = {{
1367 var addr_v4 = macro("$address$")
1368 var addr_v6 = macro("$address6$")
1373 return "udp6:[" + addr_v6 + "]"
1377 vars.snmp_community = "public"
1378 vars.snmp_invert_search = false
1379 vars.snmp_timeout = "10"
1382 object CheckCommand "snmpv3" {
1383 import "ipv4-or-ipv6"
1385 command = [ PluginDir + "/check_snmp" ]
1389 value = "$snmpv3_address$"
1390 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1393 value = "$snmpv3_port$"
1394 description = "Port number"
1397 set_if = "$snmpv3_getnext$"
1398 description = "Use SNMP GETNEXT instead of SNMP GET"
1402 description = "SNMP protocol version"
1405 value = "$snmpv3_seclevel$"
1406 description = "SNMPv3 securityLevel"
1409 value = "$snmpv3_auth_alg$"
1410 description = "SNMPv3 auth proto"
1413 value = "$snmpv3_user$"
1414 description = "SNMPv3 username"
1417 value = "$snmpv3_auth_key$"
1418 description = "SNMPv3 authentication password"
1421 value = "$snmpv3_priv_key$"
1422 description = "SNMPv3 privacy password"
1425 value = "$snmpv3_oid$"
1426 description = "Object identifier(s) or SNMP variables whose value you wish to query"
1429 value = "$snmpv3_priv_alg$"
1430 description = "SNMPv3 priv proto (default DES)"
1433 value = "$snmpv3_warn$"
1434 description = "Warning threshold range(s)"
1437 value = "$snmpv3_crit$"
1438 description = "Critical threshold range(s)"
1441 value = "$snmpv3_string$"
1442 description = "Return OK state (for that OID) if STRING is an exact match"
1445 value = "$snmpv3_ereg$"
1446 description = "Return OK state (for that OID) if extended regular expression REGEX matches"
1449 value = "$snmpv3_eregi$"
1450 description = "Return OK state (for that OID) if case-insensitive extended REGEX matches"
1452 "--invert-search" = {
1453 set_if = "$snmpv3_invert_search$"
1454 description = "Invert search result and return CRITICAL if found"
1457 value = "$snmpv3_label$"
1458 description = "Prefix label for output from plugin"
1461 value = "$snmpv3_miblist$"
1462 description = "List of SNMP MIBs for translating OIDs between numeric and textual representation"
1464 "-u" = "$snmpv3_units$"
1465 "--rate-multiplier" = "$snmpv3_rate_multiplier$"
1467 set_if = "$snmpv3_rate$"
1468 description = "Enable rate calculation"
1470 "-t" = "$snmpv3_timeout$"
1473 vars.snmpv3_address = "$check_address$"
1474 vars.snmpv3_auth_alg = "SHA"
1475 vars.snmpv3_priv_alg = "AES"
1476 vars.snmpv3_seclevel = "authPriv"
1477 vars.snmpv3_timeout = "10"
1480 object CheckCommand "snmp-uptime" {
1483 vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
1486 object CheckCommand "apt" {
1487 command = [ PluginDir + "/check_apt" ]
1491 value = "$apt_extra_opts$"
1492 description = "Read options from an ini file."
1495 value = "$apt_upgrade$"
1496 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."
1498 "--dist-upgrade" = {
1499 value = "$apt_dist_upgrade$"
1500 description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options."
1503 value = "$apt_include$"
1504 description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together."
1507 value = "$apt_exclude$"
1508 description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times."
1511 value = "$apt_critical$"
1512 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."
1515 value = "$apt_timeout$"
1516 description = "Seconds before plugin times out (default: 10)."
1518 "--only-critical" = {
1519 set_if = "$apt_only_critical$"
1520 description = "Only warn about critical upgrades."
1527 object CheckCommand "dhcp" {
1528 command = [ PluginDir + "/check_dhcp" ]
1531 "-s" = "$dhcp_serverip$"
1532 "-r" = "$dhcp_requestedip$"
1533 "-t" = "$dhcp_timeout$"
1534 "-i" = "$dhcp_interface$"
1537 set_if = "$dhcp_unicast$"
1541 vars.dhcp_unicast = false
1544 object CheckCommand "dns" {
1545 import "ipv4-or-ipv6"
1547 command = [ PluginDir + "/check_dns" ]
1551 value = "$dns_lookup$"
1552 description = "The name or address you want to query."
1555 value = "$dns_server$"
1556 description = "Optional DNS server you want to use for the lookup."
1559 value = "$dns_query_type$"
1560 description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
1563 value = "$dns_expected_answers$"
1564 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)."
1567 set_if = "$dns_authoritative$"
1570 value = "$dns_wtime$"
1571 description = "Return warning if elapsed time exceeds value."
1574 value = "$dns_ctime$"
1575 description = "Return critical if elapsed time exceeds value."
1578 value = "$dns_timeout$"
1579 description = "Seconds before connection times out. Defaults to 10."
1583 vars.dns_lookup = "$host.name$"
1584 vars.dns_query_type = "A"
1585 vars.dns_timeout = 10
1588 object CheckCommand "dig" {
1589 import "ipv4-or-ipv6"
1591 command = [ PluginDir + "/check_dig" ]
1594 "-H" = "$dig_server$"
1597 value = "$dig_lookup$"
1600 "-T" = "$dig_record_type$"
1601 "-a" = "$dig_expected_address$"
1602 "-A" = "$dig_arguments$"
1603 "-r" = "$dig_retries$"
1604 "-w" = "$dig_warning$"
1605 "-c" = "$dig_critical$"
1606 "-t" = "$dig_timeout$"
1608 set_if = "$dig_ipv4$"
1609 description = "Force dig to only use IPv4 query transport"
1612 set_if = "$dig_ipv6$"
1613 description = "Force dig to only use IPv6 query transport"
1617 vars.dig_server = "$check_address$"
1618 vars.check_ipv4 = "$dig_ipv4$"
1619 vars.check_ipv6 = "$dig_ipv6$"
1622 object CheckCommand "nscp" {
1623 import "ipv4-or-ipv6"
1625 command = [ PluginDir + "/check_nt" ]
1628 "-H" = "$nscp_address$"
1629 "-p" = "$nscp_port$"
1630 "-s" = "$nscp_password$"
1632 value = "$nscp_variable$"
1636 value = "$nscp_params$"
1639 "-w" = "$nscp_warn$"
1640 "-c" = "$nscp_crit$"
1641 "-t" = "$nscp_timeout$"
1644 description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes"
1645 set_if = "$nscp_showall$"
1649 vars.nscp_address = "$check_address$"
1650 vars.nscp_port = 12489
1651 vars.nscp_showall = false
1654 object CheckCommand "by_ssh" {
1655 import "ipv4-or-ipv6"
1657 command = [ PluginDir + "/check_by_ssh" ]
1660 "-H" = "$by_ssh_address$"
1661 "-p" = "$by_ssh_port$"
1663 var command = macro("$by_ssh_command$")
1664 var arguments = macro("$by_ssh_arguments$")
1666 if (typeof(command) == String && !arguments) {
1670 var escaped_args = []
1671 for (arg in resolve_arguments(command, arguments)) {
1672 escaped_args.add(escape_shell_arg(arg))
1674 return escaped_args.join(" ")
1676 "-l" = "$by_ssh_logname$"
1677 "-i" = "$by_ssh_identity$"
1679 set_if = "$by_ssh_quiet$"
1681 "-w" = "$by_ssh_warn$"
1682 "-c" = "$by_ssh_crit$"
1683 "-t" = "$by_ssh_timeout$"
1685 value = "$by_ssh_options$"
1686 description = "Provide ssh options (may be repeated)"
1689 set_if = "$by_ssh_ipv4$"
1690 description = "Use IPv4 only"
1693 set_if = "$by_ssh_ipv6$"
1694 description = "Use IPv6 only"
1698 vars.by_ssh_address = "$check_address$"
1699 vars.by_ssh_quiet = false
1700 vars.check_ipv4 = "$by_ssh_ipv4$"
1701 vars.check_ipv6 = "$by_ssh_ipv6$"
1704 object CheckCommand "ups" {
1705 import "ipv4-or-ipv6"
1707 command = [ PluginDir + "/check_ups" ]
1711 value = "$ups_address$"
1712 description = "Address of the upsd server"
1716 value = "$ups_name$"
1717 description = "Name of the UPS to monitor"
1721 value = "$ups_port$"
1722 description = "Port number (default: 3493)"
1725 value = "$ups_variable$"
1726 description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
1729 value = "$ups_warning$"
1730 description = "Warning threshold for the selected variable"
1733 value = "$ups_critical$"
1734 description = "Critical threshold for the selected variable"
1737 set_if = "$ups_celsius$"
1738 description = "Display temperature in degrees Celsius instead of Fahrenheit"
1741 value = "$ups_timeout$"
1742 description = "Seconds before the connection times out (default: 10)"
1746 vars.ups_address = "$check_address$"
1747 vars.ups_name = "ups"
1750 object CheckCommand "nrpe" {
1751 import "ipv4-or-ipv6"
1753 command = [ PluginDir + "/check_nrpe" ]
1756 "-H" = "$nrpe_address$"
1757 "-p" = "$nrpe_port$"
1758 "-c" = "$nrpe_command$"
1760 set_if = "$nrpe_no_ssl$"
1761 description = "Do not use SSL."
1764 set_if = "$nrpe_timeout_unknown$"
1765 description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
1767 "-t" = "$nrpe_timeout$"
1769 value = "$nrpe_arguments$"
1774 set_if = "$nrpe_ipv4$"
1775 description = "Use IPv4 connection"
1778 set_if = "$nrpe_ipv6$"
1779 description = "Use IPv6 connection"
1782 set_if = "$nrpe_version_2$"
1783 description = "Use this if you want to connect to NRPE v2"
1787 vars.nrpe_address = "$check_address$"
1788 vars.nrpe_no_ssl = false
1789 vars.nrpe_timeout_unknown = false
1790 vars.check_ipv4 = "$nrpe_ipv4$"
1791 vars.check_ipv6 = "$nrpe_ipv6$"
1792 vars.nrpe_version_2 = false
1796 object CheckCommand "hpjd" {
1797 import "ipv4-or-ipv6"
1799 command = [ PluginDir + "/check_hpjd" ]
1802 "-H" = "$hpjd_address$"
1803 "-C" = "$hpjd_community$"
1804 "-p" = "$hpjd_port$"
1807 vars.hpjd_address = "$check_address$"
1810 object CheckCommand "icmp" {
1811 command = [ PluginDir + "/check_icmp" ]
1815 value = "$icmp_address$"
1819 "-w" = "$icmp_wrta$,$icmp_wpl$%"
1820 "-c" = "$icmp_crta$,$icmp_cpl$%"
1821 "-s" = "$icmp_source$"
1822 "-n" = "$icmp_packets$"
1823 "-i" = "$icmp_packet_interval$"
1824 "-I" = "$icmp_target_interval$"
1825 "-m" = "$icmp_hosts_alive$"
1826 "-b" = "$icmp_data_bytes$"
1827 "-t" = "$icmp_timeout$"
1831 vars.icmp_address = "$address$"
1832 vars.icmp_wrta = 100
1834 vars.icmp_crta = 200
1838 object CheckCommand "ldap" {
1839 import "ipv4-or-ipv6"
1841 command = [ PluginDir + "/check_ldap" ]
1845 value = "$ldap_address$"
1846 description = "Host name, IP Address, or unix socket (must be an absolute path)"
1849 value = "$ldap_port$"
1850 description = "Port number (default: 389)"
1853 value = "$ldap_attr$"
1854 description = "ldap attribute to search (default: \"(objectclass=*)\""
1857 value = "$ldap_base$"
1859 description = "ldap base (eg. ou=my unit, o=my org, c=at"
1862 value = "$ldap_bind$"
1863 description = "ldap bind DN (if required)"
1866 value = "$ldap_pass$"
1867 description = "ldap password (if required)"
1870 set_if = "$ldap_starttls$"
1871 description = "use starttls mechanism introduced in protocol version 3"
1874 set_if = "$ldap_ssl$"
1875 description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636"
1878 set_if = "$ldap_v2$"
1879 description = "Use LDAP protocol version 2"
1882 set_if = "$ldap_v3$"
1883 description = "Use LDAP protocol version 3"
1886 value = "$ldap_warning$"
1887 description = "Response time to result in warning status (seconds)"
1890 value = "$ldap_critical$"
1891 description = "Response time to result in critical status (seconds)"
1894 value = "$ldap_warning_entries$"
1895 description = "Number of found entries to result in warning status (optional)"
1898 value = "$ldap_critical_entries$"
1899 description = "Number of found entries to result in critical status (optional)"
1902 value = "$ldap_timeout$"
1903 description = "Seconds before connection times out (default: 10)"
1906 set_if = "$ldap_verbose$"
1907 description = "Show details for command-line debugging"
1911 vars.ldap_address = "$check_address$"
1913 vars.ldap_v3 = false
1914 vars.ldap_timeout = 10s
1915 vars.ldap_verbose = false
1918 object CheckCommand "clamd" {
1919 command = [ PluginDir + "/check_clamd" ]
1923 value = "$clamd_address$"
1924 description = "The host's address or unix socket (must be an absolute path)."
1928 value = "$clamd_port$"
1929 description = "Port number (default: none)."
1932 value = "$clamd_expect$"
1933 description = "String to expect in server response (may be repeated)."
1937 set_if = "$clamd_all$"
1938 description = "All expect strings need to occur in server response. Default is any."
1943 set_if = "$clamd_escape_send$"
1944 description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
1948 value = "$clamd_send$"
1949 description = "String to send to the server."
1954 set_if = "$clamd_escape_quit$"
1955 description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
1959 value = "$clamd_quit$"
1960 description = "String to send server to initiate a clean close of the connection."
1963 value = "$clamd_refuse$"
1964 description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
1967 value = "$clamd_mismatch$"
1968 description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
1971 set_if = "$clamd_jail$"
1972 description = "Hide output from TCP socket."
1975 value = "$clamd_maxbytes$"
1976 description = "Close connection once more than this number of bytes are received."
1979 value = "$clamd_delay$"
1980 description = "Seconds to wait between sending string and polling for response."
1983 value = "$clamd_certificate$"
1984 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."
1987 set_if = "$clamd_ssl$"
1988 description = "Use SSL for the connection."
1991 value = "$clamd_wtime$"
1992 description = "Response time to result in warning status (seconds)."
1995 value = "$clamd_ctime$"
1996 description = "Response time to result in critical status (seconds)."
1999 value = "$clamd_timeout$"
2000 description = "Seconds before connection times out. Defaults to 10."
2003 set_if = "$clamd_ipv4$"
2004 description = "Use IPv4 only"
2007 set_if = "$clamd_ipv6$"
2008 description = "Use IPv6 only"
2012 vars.clamd_ssl = false
2013 vars.clamd_refuse = "crit"
2014 vars.clamd_mismatch = "warn"
2015 vars.clamd_timeout = 10
2016 vars.check_ipv4 = "$clamd_ipv4$"
2017 vars.check_ipv6 = "$clamd_ipv6$"
2020 object CheckCommand "mailq" {
2021 command = [ PluginDir + "/check_mailq" ]
2025 value = "$mailq_warning$"
2026 description = "Min. number of messages in queue to generate warning"
2030 value = "$mailq_critical$"
2031 description = "Min. number of messages in queue to generate critical alert ( w < c )"
2035 value = "$mailq_domain_warning$"
2036 description = "Min. number of messages for same domain in queue to generate warning"
2039 value = "$mailq_domain_critical$"
2040 description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
2043 value = "$mailq_timeout$"
2044 description = "Plugin timeout in seconds (default = 15)"
2047 value = "$mailq_servertype$"
2048 description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
2051 set_if = "$mailq_sudo$"
2052 description = "Use sudo for mailq command"
2057 object CheckCommand "pgsql" {
2058 import "ipv4-or-ipv6"
2060 command = [ PluginDir + "/check_pgsql" ]
2063 "-H" = "$pgsql_hostname$"
2064 "-P" = "$pgsql_port$"
2065 "-d" = "$pgsql_database$"
2066 "-l" = "$pgsql_username$"
2067 "-p" = "$pgsql_password$"
2068 "-o" = "$pgsql_options$"
2069 "-w" = "$pgsql_warning$"
2070 "-c" = "$pgsql_critical$"
2071 "-t" = "$pgsql_timeout$"
2072 "-q" = "$pgsql_query$"
2073 "-W" = "$pgsql_query_warning$"
2074 "-C" = "$pgsql_query_critical$"
2077 vars.pgsql_hostname = "$check_address$"
2080 object CheckCommand "mysql" {
2081 import "ipv4-or-ipv6"
2083 command = [ PluginDir + "/check_mysql" ]
2086 "-H" = "$mysql_hostname$"
2087 "-P" = "$mysql_port$"
2089 set_if = "$mysql_ignore_auth$"
2091 "-s" = "$mysql_socket$"
2092 "-d" = "$mysql_database$"
2093 "-f" = "$mysql_file$"
2094 "-g" = "$mysql_group$"
2095 "-u" = "$mysql_username$"
2096 "-p" = "$mysql_password$"
2098 set_if = "$mysql_check_slave$"
2100 "-w" = "$mysql_warning$"
2101 "-c" = "$mysql_critical$"
2103 set_if = "$mysql_ssl$"
2105 "-C" = "$mysql_cacert$"
2106 "-a" = "$mysql_cert$"
2107 "-k" = "$mysql_key$"
2108 "-D" = "$mysql_cadir$"
2109 "-L" = "$mysql_ciphers$"
2112 vars.mysql_hostname = "$check_address$"
2115 object CheckCommand "negate" {
2116 command = [ PluginDir + "/negate" ]
2119 "-t" = "$negate_timeout$"
2120 "-T" = "$negate_timeout_result$"
2121 "-o" = "$negate_ok$"
2122 "-w" = "$negate_warning$"
2123 "-c" = "$negate_critical$"
2125 set_if = "$negate_substitute$"
2127 "--wrapped-plugin" = {
2129 var command = macro("$negate_command$")
2130 var arguments = macro("$negate_arguments$")
2132 if (typeof(command) == String && !arguments) {
2136 var escaped_args = []
2137 for (arg in resolve_arguments(command, arguments)) {
2138 escaped_args.add(arg)
2140 return escaped_args.join(" ")
2147 vars.negate_timeout_result = "UNKNOWN"
2150 object CheckCommand "file_age" {
2151 command = [ PluginDir + "/check_file_age" ]
2155 value = "$file_age_warning_time$"
2156 description = "File must be no more than this many seconds old (default: 240s)"
2159 value = "$file_age_critical_time$"
2160 description = "File must be no more than this many seconds old (default: 600s)"
2163 value = "$file_age_warning_size$"
2164 description = "File must be at least this many bytes long"
2167 value = "$file_age_critical_size$"
2168 description = "File must be at least this many bytes long (default: 0B)"
2171 set_if = "$file_age_ignoremissing$"
2172 description = "return OK if the file does not exist"
2175 value = "$file_age_file$"
2176 description = "File to monitor"
2180 vars.file_age_ignoremissing = false
2183 object CheckCommand "smart" {
2184 command = [ PluginDir + "/check_ide_smart" ]
2188 value = "$smart_device$"
2189 description = "Name of a local hard drive to monitor"
2195 object CheckCommand "breeze" {
2196 import "ipv4-or-ipv6"
2198 command = [ PluginDir + "/check_breeze" ]
2202 value = "$breeze_hostname$"
2203 description = "Name or IP address of host to check"
2207 value = "$breeze_community$"
2208 description = "SNMPv1 community (default public)"
2211 value = "$breeze_warning$"
2212 description = "Percentage strength below which a WARNING status will result"
2216 value = "$breeze_critical$"
2217 description = "Percentage strength below which a CRITICAL status will result"
2222 vars.breeze_hostname = "$check_address$"
2223 vars.breeze_warning = "50"
2224 vars.breeze_critical = "20"
2227 object CheckCommand "flexlm" {
2228 command = [ PluginDir + "/check_flexlm" ]
2232 value = "$flexlm_licensefile$"
2233 description = "Name of license file (usually license.dat)"
2237 value = "$flexlm_timeout$"
2238 description = "Plugin time out in seconds (default = 15)"
2243 object CheckCommand "game" {
2244 import "ipv4-or-ipv6"
2246 command = [ PluginDir + "/check_game" ]
2250 value = "$game_port$"
2251 description = "Port to connect to"
2254 value = "$game_timeout$"
2255 description = "Seconds before connection times out (default: 10)"
2258 value = "$game_gamefield$"
2259 description = "Field number in raw qstat output that contains game name"
2262 value = "$game_mapfield$"
2263 description = "Field number in raw qstat output that contains map name"
2266 value = "$game_pingfield$"
2267 description = "Field number in raw qstat output that contains ping time"
2270 value = "$game_gametime$"
2271 description = "Field number in raw qstat output that contains game time"
2274 value = "$game_hostname$"
2275 description = "Name of the host running the game"
2278 value = "$game_game$"
2279 description = "Name of the game"
2284 value = "$game_ipaddress$"
2285 description = "Ipaddress of the game server to query"
2292 object CheckCommand "mysql_query" {
2293 import "ipv4-or-ipv6"
2295 command = [ PluginDir + "/check_mysql_query" ]
2298 "-H" = "$mysql_query_hostname$"
2299 "-P" = "$mysql_query_port$"
2300 "-u" = "$mysql_query_username$"
2301 "-p" = "$mysql_query_password$"
2302 "-d" = "$mysql_query_database$"
2303 "-f" = "$mysql_query_file$"
2304 "-g" = "$mysql_query_group$"
2305 "-q" = "$mysql_query_execute$"
2306 "-w" = "$mysql_query_warning$"
2307 "-c" = "$mysql_query_critical$"
2310 vars.mysql_query_hostname = "$check_address$"
2313 object CheckCommand "radius" {
2314 import "ipv4-or-ipv6"
2317 PluginDir + "/check_radius",
2321 "-H" = "$radius_address$",
2322 "-F" = "$radius_config_file$",
2323 "-u" = "$radius_username$",
2324 "-p" = "$radius_password$",
2326 value = "$radius_port$",
2329 value = "$radius_nas_id$",
2330 description = "NAS identifier"
2333 value = "$radius_nas_address$",
2334 description = "NAS IP Address"
2337 value = "$radius_expect$",
2338 description = "Response string to expect from the server"
2341 value = "$radius_retries$",
2342 description = "Number of times to retry a failed connection"
2345 value = "$radius_timeout$",
2346 description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
2350 vars.radius_address = "$check_address$"