/****************************************************************************** * Icinga 2 * * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software Foundation * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ template CheckCommand "ipv4-or-ipv6" { vars.check_address = {{ var addr_v4 = macro("$address$") var addr_v6 = macro("$address6$") if (addr_v4 && !macro("$check_ipv6$") || macro("$check_ipv4$")) { return addr_v4 } else { return addr_v6 } }} vars.check_ipv4 = false vars.check_ipv6 = false } template CheckCommand "ping-common" { command = [ PluginDir + "/check_ping" ] arguments = { "-H" = "$ping_address$" "-w" = "$ping_wrta$,$ping_wpl$%" "-c" = "$ping_crta$,$ping_cpl$%" "-p" = "$ping_packets$" "-t" = "$ping_timeout$" } vars.ping_wrta = 100 vars.ping_wpl = 5 vars.ping_crta = 200 vars.ping_cpl = 15 } object CheckCommand "ping" { import "ping-common" import "ipv4-or-ipv6" vars.ping_address = "$check_address$" } object CheckCommand "ping4" { import "ping-common" command += [ "-4" ] vars.ping_address = "$address$" } object CheckCommand "ping6" { import "ping-common" command += [ "-6" ] vars.ping_address = "$address6$" } template CheckCommand "hostalive-common" { vars.ping_wrta = 3000.0 vars.ping_wpl = 80 vars.ping_crta = 5000.0 vars.ping_cpl = 100 } object CheckCommand "hostalive" { import "ping" import "hostalive-common" } object CheckCommand "hostalive4" { import "ping4" import "hostalive-common" } object CheckCommand "hostalive6" { import "ping6" import "hostalive-common" } template CheckCommand "fping-common" { command = [ PluginDir + "/check_fping", "$fping_address$" ] arguments = { "-w" = "$fping_wrta$,$fping_wpl$%" "-c" = "$fping_crta$,$fping_cpl$%" "-n" = "$fping_number$" "-i" = "$fping_interval$" "-b" = "$fping_bytes$" "-T" = "$fping_target_timeout$" "-S" = "$fping_source_ip$" "-I" = "$fping_source_interface$" } vars.fping_wrta = 100 vars.fping_wpl = 5 vars.fping_crta = 200 vars.fping_cpl = 15 vars.fping_number = 5 vars.fping_interval = 500 } object CheckCommand "fping4" { import "fping-common" command += [ "-4" ] vars.fping_address = "$address$" } object CheckCommand "fping6" { import "fping-common" command += [ "-6" ] vars.fping_address = "$address6$" } object CheckCommand "dummy" { command = [ PluginDir + "/check_dummy" ] arguments = { "state" = { value = "$dummy_state$" skip_key = true order = 1 description = "The state. Can be one of 0 (ok), 1 (warning), 2 (critical) and 3 (unknown). Defaults to 0." } "text" = { value = "$dummy_text$" skip_key = true order = 2 description = "Plugin output. Defaults to Check was successful." } } vars.dummy_state = 0 vars.dummy_text = "Check was successful." } object CheckCommand "passive" { import "dummy" vars.dummy_state = 3 vars.dummy_text = "No Passive Check Result Received." } object CheckCommand "tcp" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_tcp" ] arguments = { "-H" = { value = "$tcp_address$" description = "Host name, IP Address, or unix socket (must be an absolute path)." } "-p" = { value = "$tcp_port$" description = "The TCP port number." } "-e" = { value = "$tcp_expect$" description = "String to expect in server response (may be repeated)." } "-A" = { set_if = "$tcp_all$" description = "All expect strings need to occur in server response. Defaults to false." } "-E_send" = { key = "-E" order = 1 set_if = "$tcp_escape_send$" description = "Enable usage of \n, \r, \t or \\ in send string." } "-s" = { order = 2 value = "$tcp_send$" description = "String to send to the server." } "-E_quit" = { key = "-E" order = 3 set_if = "$tcp_escape_quit$" description = "Enable usage of \n, \r, \t or \\ in quit string." } "-q" = { order = 4 value = "$tcp_quit$" description = "String to send server to initiate a clean close of the connection." } "-r" = { value = "$tcp_refuse$" description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit." } "-M" = { value = "$tcp_mismatch$" description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn." } "-j" = { set_if = "$tcp_jail$" description = "Hide output from TCP socket." } "-m" = { value = "$tcp_maxbytes$" description = "Close connection once more than this number of bytes are received." } "-d" = { value = "$tcp_delay$" description = "Seconds to wait between sending string and polling for response." } "-D" = { value = "$tcp_certificate$" 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." } "-S" = { set_if = "$tcp_ssl$" description = "Use SSL for the connection." } "-w" = { value = "$tcp_wtime$" description = "Response time to result in warning status (seconds)." } "-c" = { value = "$tcp_ctime$" description = "Response time to result in critical status (seconds)." } "-t" = { value = "$tcp_timeout$" description = "Seconds before connection times out. Defaults to 10." } "-4" = { set_if = "$tcp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$tcp_ipv6$" description = "Use IPv6 connection" } } vars.tcp_address = "$check_address$" vars.tcp_all = false vars.tcp_refuse = "crit" vars.tcp_mismatch = "warn" vars.tcp_timeout = 10 vars.check_ipv4 = "$tcp_ipv4$" vars.check_ipv6 = "$tcp_ipv6$" } object CheckCommand "ssl" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_tcp" ] arguments = { "-H" = "$ssl_address$" "-p" = "$ssl_port$" "--ssl" = { } "--timeout" = "$ssl_timeout$" "-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$" "-N" = "$ssl_sni$" } vars.ssl_address = "$check_address$" vars.ssl_sni = "$ssl_address$" } object CheckCommand "udp" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_udp", "-H", "$udp_address$", "-p", "$udp_port$" ] arguments = { "-s" = { value = "$udp_send$" required = true } "-e" = { value = "$udp_expect$" required = true } "-q" = "$udp_quit$" "-4" = { set_if = "$udp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$udp_ipv6$" description = "Use IPv6 connection" } } vars.udp_address = "$check_address$" vars.check_ipv4 = "$udp_ipv4$" vars.check_ipv6 = "$udp_ipv6$" } object CheckCommand "http" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_http" ] arguments = { "-H" = "$http_vhost$" "-I" = "$http_address$" "-u" = "$http_uri$" "-p" = "$http_port$" "-S" = { set_if = "$http_ssl$" } "-S1" = { set_if = "$http_ssl_force_tlsv1$" } "-S1.1" = { set_if = "$http_ssl_force_tlsv1_1$" } "-S1.2" = { set_if = "$http_ssl_force_tlsv1_2$" } "-S2" = { set_if = "$http_ssl_force_sslv2$" } "-S3" = { set_if = "$http_ssl_force_sslv3$" } "-S1+" = { set_if = "$http_ssl_force_tlsv1_or_higher$" } "-S1.1+" = { set_if = "$http_ssl_force_tlsv1_1_or_higher$" } "-S1.2+" = { set_if = "$http_ssl_force_tlsv1_2_or_higher$" } "-S2+" = { set_if = "$http_ssl_force_sslv2_or_higher$" } "-S3+" = { set_if = "$http_ssl_force_sslv3_or_higher$" } "--sni" = { set_if = "$http_sni$" } "-C" = { value = "$http_certificate$" 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." } "-J" = { value = "$http_clientcert$" description = "Name of file contains the client certificate (PEM format)" } "-K" = { value = "$http_privatekey$" description = "Name of file contains the private key (PEM format)" } "-a" = { value = "$http_auth_pair$" description = "Username:password on sites with basic authentication" } "--no-body" = { set_if = "$http_ignore_body$" } "-w" = "$http_warn_time$" "-c" = "$http_critical_time$" "-e" = "$http_expect$" "-d" = { value = "$http_headerstring$" description = "String to expect in the response headers" } "-s" = { value = "$http_string$" description = "String to expect in the content" } "-P" = { value = "$http_post$" description = "URL encoded http POST data" } "-j" = { value = "$http_method$" description = "Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE)" } "-M" = { value = "$http_maxage$" description = "Warn if document is more than seconds old" } "-T" = { value = "$http_contenttype$" description = "Specify Content-Type header when POSTing" } "-l" = { set_if = "$http_linespan$" description = "Allow regex to span newline" order = 1 } "-r" = { value = "$http_expect_body_regex$" description = "Search page for regex" order = 2 } "-R" = { value = "$http_expect_body_eregi$" description = "Search page for case-insensitive regex" order = 2 } "--invert-regex" = { set_if = "$http_invertregex$" description = "Return CRITICAL if found, OK if not" } "-b" = { value = "$http_proxy_auth_pair$" description = "Username:password on proxy-servers with basic authentication" } "-A" = { value = "$http_useragent$" description = "String to be sent in http header as User Agent" } "-k" = { value = "$http_header$" description = "Any other tags to be sent in http header" } "-E" = { set_if = "$http_extendedperfdata$" description = "Print additional perfdata" } "-f" = { value = "$http_onredirect$" description = "How to handle redirect pages" } "-m" = { value = "$http_pagesize$" description = "Minim page size required:Maximum page size required" } "-t" = { value = "$http_timeout$" description = "Seconds before connection times out" } "-4" = { set_if = "$http_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$http_ipv6$" description = "Use IPv6 connection" } "-L" = { set_if = "$http_link$" description = "Wrap output in HTML link" } "-v" = { set_if = "$http_verbose$" description = "Show details for command-line debugging" } } vars.http_address = "$check_address$" vars.http_ssl = false vars.http_sni = false vars.http_linespan = false vars.http_invertregex = false vars.check_ipv4 = "$http_ipv4$" vars.check_ipv6 = "$http_ipv6$" vars.http_link = false vars.http_verbose = false } object CheckCommand "ftp" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ftp" ] arguments = { "-H" = { value = "$ftp_address$" description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set." } "-p" = { value = "$ftp_port$" description = "The FTP port number. Defaults to none" } "-e" = { value = "$ftp_expect$" description = "String to expect in server response (may be repeated)." } "-A" = { set_if = "$ftp_all$" description = "All expect strings need to occur in server response. Default is any." } "-E_send" = { key = "-E" order = 1 set_if = "$ftp_escape_send$" description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing." } "-s" = { order = 2 value = "$ftp_send$" description = "String to send to the server." } "-E_quit" = { key = "-E" order = 3 set_if = "$ftp_escape_quit$" description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit." } "-q" = { order = 4 value = "$ftp_quit$" description = "String to send server to initiate a clean close of the connection." } "-r" = { value = "$ftp_refuse$" description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit." } "-M" = { value = "$ftp_mismatch$" description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn." } "-j" = { set_if = "$ftp_jail$" description = "Hide output from TCP socket." } "-m" = { value = "$ftp_maxbytes$" description = "Close connection once more than this number of bytes are received." } "-d" = { value = "$ftp_delay$" description = "Seconds to wait between sending string and polling for response." } "-D" = { value = "$ftp_certificate$" 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." } "-S" = { set_if = "$ftp_ssl$" description = "Use SSL for the connection." } "-w" = { value = "$ftp_wtime$" description = "Response time to result in warning status (seconds)." } "-c" = { value = "$ftp_ctime$" description = "Response time to result in critical status (seconds)." } "-t" = { value = "$ftp_timeout$" description = "Seconds before connection times out. Defaults to 10." } "-4" = { set_if = "$ftp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$ftp_ipv6$" description = "Use IPv6 connection" } } vars.ftp_address = "$check_address$" vars.ftp_ssl = false vars.ftp_refuse = "crit" vars.ftp_mismatch = "warn" vars.ftp_timeout = 10 vars.check_ipv4 = "$ftp_ipv4$" vars.check_ipv6 = "$ftp_ipv6$" } object CheckCommand "smtp" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_smtp" ] arguments = { "-H" = "$smtp_address$" "-p" = "$smtp_port$" "-f" = "$smtp_mail_from$" "-e" = "$smtp_expect$" "-C" = "$smtp_command$" "-R" = "$smtp_response$" "-F" = "$smtp_helo_fqdn$" "-D" = "$smtp_certificate_age$" "-S" = { set_if = "$smtp_starttls$" description = "Use STARTTLS for the connection." } "-A" = "$smtp_authtype$" "-U" = "$smtp_authuser$" "-P" = "$smtp_authpass$" "-q" = "$smtp_ignore_quit$" "-w" = "$smtp_warning$" "-c" = "$smtp_critical$" "-t" = "$smtp_timeout$" "-4" = { set_if = "$smtp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$smtp_ipv6$" description = "Use IPv6 connection" } } vars.smtp_address = "$check_address$" vars.check_ipv4 = "$smtp_ipv4$" vars.check_ipv6 = "$smtp_ipv6$" } object CheckCommand "ssmtp" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ssmtp" ] arguments = { "-H" = "$ssmtp_address$" "-p" = "$ssmtp_port$" "-E" = "$ssmtp_escape$" "-s" = "$ssmtp_send$" "-e" = "$ssmtp_expect$" "-A" = { set_if = "$ssmtp_all$" description = "All expect strings need to occur in server response. Default is any." } "-q" = "$ssmtp_quit$" "-r" = "$ssmtp_refuse$" "-M" = "$ssmtp_mismatch$" "-j" = { set_if = "$ssmtp_jail$" description = "Hide output from TCP socket." } "-m" = "$ssmtp_maxbytes$" "-d" = "$ssmtp_delay$" "-D" = "$ssmtp_certificate_age$" "-S" = { set_if = "$ssmtp_ssl$" description = "Use SSL for the connection." } "-w" = "$ssmtp_warning$" "-c" = "$ssmtp_critical$" "-t" = "$ssmtp_timeout$" "-4" = { set_if = "$ssmtp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$ssmtp_ipv6$" description = "Use IPv6 connection" } } vars.ssmtp_address = "$check_address$" vars.check_ipv4 = "$ssmtp_ipv4$" vars.check_ipv6 = "$ssmtp_ipv6$" } object CheckCommand "imap" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_imap" ] arguments = { "-H" = "$imap_address$" "-p" = "$imap_port$" "-E" = "$imap_escape$" "-s" = "$imap_send$" "-e" = "$imap_expect$" "-A" = { set_if = "$imap_all$" description = "All expect strings need to occur in server response. Default is any." } "-q" = "$imap_quit$" "-r" = "$imap_refuse$" "-M" = "$imap_mismatch$" "-j" = { set_if = "$imap_jail$" description = "Hide output from TCP socket." } "-m" = "$imap_maxbytes$" "-d" = "$imap_delay$" "-D" = "$imap_certificate_age$" "-S" = { set_if = "$imap_ssl$" description = "Use SSL for the connection." } "-w" = "$imap_warning$" "-c" = "$imap_critical$" "-t" = "$imap_timeout$" "-4" = { set_if = "$imap_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$imap_ipv6$" description = "Use IPv6 connection" } } vars.imap_address = "$check_address$" vars.check_ipv4 = "$imap_ipv4$" vars.check_ipv6 = "$imap_ipv6$" } object CheckCommand "simap" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_simap" ] arguments = { "-H" = "$simap_address$" "-p" = "$simap_port$" "-E" = "$simap_escape$" "-s" = "$simap_send$" "-e" = "$simap_expect$" "-A" = { set_if = "$simap_all$" description = "All expect strings need to occur in server response. Default is any." } "-q" = "$simap_quit$" "-r" = "$simap_refuse$" "-M" = "$simap_mismatch$" "-j" = { set_if = "$simap_jail$" description = "Hide output from TCP socket." } "-m" = "$simap_maxbytes$" "-d" = "$simap_delay$" "-D" = "$simap_certificate_age$" "-S" = { set_if = "$simap_ssl$" description = "Use SSL for the connection." } "-w" = "$simap_warning$" "-c" = "$simap_critical$" "-t" = "$simap_timeout$" "-4" = { set_if = "$simap_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$simap_ipv6$" description = "Use IPv6 connection" } } vars.simap_address = "$check_address$" vars.check_ipv4 = "$simap_ipv4$" vars.check_ipv6 = "$simap_ipv6$" } object CheckCommand "pop" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_pop" ] arguments = { "-H" = "$pop_address$" "-p" = "$pop_port$" "-E" = "$pop_escape$" "-s" = "$pop_send$" "-e" = "$pop_expect$" "-A" = { set_if = "$pop_all$" description = "All expect strings need to occur in server response. Default is any." } "-q" = "$pop_quit$" "-r" = "$pop_refuse$" "-M" = "$pop_mismatch$" "-j" = { set_if = "$pop_jail$" description = "Hide output from TCP socket." } "-m" = "$pop_maxbytes$" "-d" = "$pop_delay$" "-D" = "$pop_certificate_age$" "-S" = { set_if = "$pop_ssl$" description = "Use SSL for the connection." } "-w" = "$pop_warning$" "-c" = "$pop_critical$" "-t" = "$pop_timeout$" "-4" = { set_if = "$pop_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$pop_ipv6$" description = "Use IPv6 connection" } } vars.pop_address = "$check_address$" vars.check_ipv4 = "$pop_ipv4$" vars.check_ipv6 = "$pop_ipv6$" } object CheckCommand "spop" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_spop" ] arguments = { "-H" = "$spop_address$" "-p" = "$spop_port$" "-E" = "$spop_escape$" "-s" = "$spop_send$" "-e" = "$spop_expect$" "-A" = { set_if = "$spop_all$" description = "All expect strings need to occur in server response. Default is any." } "-q" = "$spop_quit$" "-r" = "$spop_refuse$" "-M" = "$spop_mismatch$" "-j" = { set_if = "$spop_jail$" description = "Hide output from TCP socket." } "-m" = "$spop_maxbytes$" "-d" = "$spop_delay$" "-D" = "$spop_certificate_age$" "-S" = { set_if = "$spop_ssl$" description = "Use SSL for the connection." } "-w" = "$spop_warning$" "-c" = "$spop_critical$" "-t" = "$spop_timeout$" "-4" = { set_if = "$spop_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$spop_ipv6$" description = "Use IPv6 connection" } } vars.spop_address = "$check_address$" vars.check_ipv4 = "$spop_ipv4$" vars.check_ipv6 = "$spop_ipv6$" } object CheckCommand "ntp_time" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ntp_time" ] arguments = { "-H" = "$ntp_address$" "-p" = "$ntp_port$" "-q" = { set_if = "$ntp_quiet$" description = "Returns UNKNOWN instead of CRITICAL if offset cannot be found" } "-w" = "$ntp_warning$" "-c" = "$ntp_critical$" "-o" = "$ntp_timeoffset$" "-t" = "$ntp_timeout$" "-4" = { set_if = "$ntp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$ntp_ipv6$" description = "Use IPv6 connection" } } vars.ntp_address = "$check_address$" vars.check_ipv4 = "$ntp_ipv4$" vars.check_ipv6 = "$ntp_ipv6$" } object CheckCommand "ntp_peer" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ntp_peer" ] arguments = { "-H" = "$ntp_address$" "-p" = "$ntp_port$" "-w" = "$ntp_warning$" "-c" = "$ntp_critical$" "-W" = "$ntp_wstratum$" "-C" = "$ntp_cstratum$" "-j" = "$ntp_wjitter$" "-k" = "$ntp_cjitter$" "-m" = "$ntp_wsource$" "-n" = "$ntp_csource$" "-t" = "$ntp_timeout$" "-4" = { set_if = "$ntp_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$ntp_ipv6$" description = "Use IPv6 connection" } } vars.ntp_address = "$check_address$" vars.check_ipv4 = "$ntp_ipv4$" vars.check_ipv6 = "$ntp_ipv6$" } object CheckCommand "ssh" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ssh" ] arguments = { "-p" = "$ssh_port$" "-t" = "$ssh_timeout$" "host" = { value = "$ssh_address$" skip_key = true order = 1 } "-4" = { set_if = "$ssh_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$ssh_ipv6$" description = "Use IPv6 connection" } } vars.ssh_address = "$check_address$" vars.check_ipv4 = "$ssh_ipv4$" vars.check_ipv6 = "$ssh_ipv6$" } object CheckCommand "disk" { command = [ PluginDir + "/check_disk" ] arguments = { "-w" = { value = "$disk_wfree$" 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" required = true order = -3 } "-c" = { value = "$disk_cfree$" 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" required = true order = -3 } "-W" = { value = "$disk_inode_wfree$" description = "Exit with WARNING status if less than PERCENT of inode space is free" } "-K" = { value = "$disk_inode_cfree$" description = "Exit with CRITICAL status if less than PERCENT of inode space is free" } "-p" = { value = "$disk_partitions$" description = "Path or partition (may be repeated)" repeat_key = true order = 1 } "-p_old" = { key = "-p" value = "$disk_partition$" order = 1 } "-x" = { value = "$disk_partitions_excluded$" description = "Ignore device (only works if -p unspecified)" } "-x_old" = { key = "-x" value = "$disk_partition_excluded$" } "-C" = { set_if = "$disk_clear$" description = "Clear thresholds" } "-E" = { set_if = "$disk_exact_match$" description = "For paths or partitions specified with -p, only check for exact paths" } "-e" = { set_if = "$disk_errors_only$" description = "Display only devices/mountpoints with errors" } "-f" = { set_if = "$disk_ignore_reserved$" description = "Don't account root-reserved blocks into freespace in perfdata" } "-g" = { value = "$disk_group$" description = "Group paths. Thresholds apply to (free-)space of all partitions together" } "-k" = { set_if = "$disk_kilobytes$" description = "Same as --units kB" } "-l" = { set_if = "$disk_local$" description = " Only check local filesystems" } "-L" = { set_if = "$disk_stat_remote_fs$" 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)" } "-M" = { set_if = "$disk_mountpoint$" description = "Display the mountpoint instead of the partition" } "-m" = { set_if = "$disk_megabytes$" description = "Same as --units MB" } "-A" = { set_if = "$disk_all$" description = "Explicitly select all paths. This is equivalent to -R .*" } "-R" = { value = "$disk_eregi_path$" description = "Case insensitive regular expression for path/partition (may be repeated)" repeat_key = true } "-r" = { value = "$disk_ereg_path$" description = "Regular expression for path or partition (may be repeated)" repeat_key = true } "-I" = { value = "$disk_ignore_eregi_path$" description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)" repeat_key = true order = 2 } "-i" = { value = "$disk_ignore_ereg_path$" description = "Regular expression to ignore selected path or partition (may be repeated)" repeat_key = true order = 2 } "-t" = { value = "$disk_timeout$" description = "Seconds before connection times out (default: 10)" } "-u" = { value = "$disk_units$" description = "Choose bytes, kB, MB, GB, TB (default: MB)" } "-X" = { value = "$disk_exclude_type$" description = "Ignore all filesystems of indicated type (may be repeated)" repeat_key = true } } vars.disk_wfree = "20%" vars.disk_cfree = "10%" vars.disk_megabytes = true vars.disk_exclude_type = [ "none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs" ] } object CheckCommand "disk_smb" { command = [ PluginDir + "/check_disk_smb" ] arguments = { "-H" = { value = "$disk_smb_hostname$" description = "NetBIOS name of the server." } "-s" = { value = "$disk_smb_share$" description = "Share name to be tested." } "-W" = { value = "$disk_smb_workgroup$" description = "Workgroup or Domain used (Defaults to 'WORKGROUP' if omitted)." } "-a" = { value = "$disk_smb_address$" description = "IP-address of HOST (only necessary if HOST is in another network)." } "-u" = { value = "$disk_smb_username$" description = "Username to log in to server. (Defaults to 'guest' if omitted)." } "-p" = { value = "$disk_smb_password$" description = "Password to log in to server. (Defaults to an empty password if omitted)." } "-w" = { value = "$disk_smb_wused$" description = "Percent of used space at which a warning will be generated (Default: 85%)." } "-c" = { value = "$disk_smb_cused$" description = "Percent of used space at which a critical will be generated (Defaults: 95%)" } "-P" = { value = "$disk_smb_port$" description = "Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default if omitted)." } } vars.disk_smb_wused = "85%" vars.disk_smb_cused = "95%" } object CheckCommand "users" { command = [ PluginDir + "/check_users" ] arguments = { "-w" = "$users_wgreater$" "-c" = "$users_cgreater$" } vars.users_wgreater = 20 vars.users_cgreater = 50 } object CheckCommand "procs" { command = [ PluginDir + "/check_procs" ] arguments = { "-w" = { value = "$procs_warning$" description = "Generate warning state if metric is outside this range" } "-c" = { value = "$procs_critical$" description = "Generate critical state if metric is outside this range" } "-m" = { value = "$procs_metric$" description = "Check thresholds against metric" } "-t" = { value = "$procs_timeout$" description = "Seconds before plugin times out" } "-T" = { set_if = "$procs_traditional$" description = "Filter own process the traditional way by PID instead of /proc/pid/exe" } "-s" = { value = "$procs_state$" description = "Only scan for processes that have one or more of the status flags you specify" } "-p" = { value = "$procs_ppid$" description = "Only scan for children of the parent process ID indicated" } "-z" = { value = "$procs_vsz$" description = "Only scan for processes with VSZ higher than indicated" } "-r" = { value = "$procs_rss$" description = "Only scan for processes with RSS higher than indicated" } "-P" = { value = "$procs_pcpu$" description = "Only scan for processes with PCPU higher than indicated" } "-u" = { value = "$procs_user$" description = "Only scan for processes with user name or ID indicated" } "-a" = { value = "$procs_argument$" description = "Only scan for processes with args that contain STRING" } "--ereg-argument-array" = { value = "$procs_argument_regex$" description = "Only scan for processes with args that contain the regex STRING" } "-C" = { value = "$procs_command$" description = "Only scan for exact matches of COMMAND (without path)" } "-k" = { set_if = "$procs_nokthreads$" description = "Only scan for non kernel threads" } } vars.procs_traditional = false vars.procs_nokthreads = false vars.procs_warning = 250 vars.procs_critical = 400 } object CheckCommand "swap" { command = [ PluginDir + "/check_swap" ] arguments = { "-w" = {{ if (macro("$swap_integer$")) { return macro("$swap_wfree$") } else { return macro("$swap_wfree$%") } }} "-c" = {{ if (macro("$swap_integer$")) { return macro("$swap_cfree$") } else { return macro("$swap_cfree$%") } }} "-a" = { set_if = "$swap_allswaps$" description = "Conduct comparisons for all swap partitions, one by one" } "-n" = { value = "$swap_noswap$" description = "Resulting state when there is no swap regardless of thresholds. Possible values are \"ok\", \"warning\", \"critical\", \"unknown\". Defaults to \"critical\"" } } vars.swap_wfree = 50 vars.swap_cfree = 25 vars.swap_integer = false vars.swap_allswaps = false } object CheckCommand "load" { command = [ PluginDir + "/check_load" ] arguments = { "-w" = { value = "$load_wload1$,$load_wload5$,$load_wload15$" description = "Exit with WARNING status if load average exceeds WLOADn" } "-c" = { value = "$load_cload1$,$load_cload5$,$load_cload15$" description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'" } "-r" = { set_if = "$load_percpu$" description = "Divide the load averages by the number of CPUs (when possible)" } } vars.load_wload1 = 5.0 vars.load_wload5 = 4.0 vars.load_wload15 = 3.0 vars.load_cload1 = 10.0 vars.load_cload5 = 6.0 vars.load_cload15 = 4.0 vars.load_percpu = false } object CheckCommand "snmp" { command = [ PluginDir + "/check_snmp" ] arguments = { "-H" = "$snmp_address$" "-o" = "$snmp_oid$" "-C" = "$snmp_community$" "-c" = "$snmp_crit$" "-w" = "$snmp_warn$" "-s" = "$snmp_string$" "-r" = "$snmp_ereg$" "-R" = "$snmp_eregi$" "-l" = "$snmp_label$" "-u" = "$snmp_units$" "-t" = "$snmp_timeout$" "-p" = "$snmp_port$" "-e" = "$snmp_retries$" "--invert-search" = { set_if = "$snmp_invert_search$" description = "Invert search result and return CRITICAL if found" } "-P" = "$snmp_version$" "-m" = "$snmp_miblist$" "--rate-multiplier" = "$snmp_rate_multiplier$" "--rate" = { set_if = "$snmp_rate$" description = "Enable rate calculation" } "-n" = { set_if = "$snmp_getnext$" description = "Use SNMP GETNEXT instead of SNMP GET" } } vars.snmp_address = {{ var addr_v4 = macro("$address$") var addr_v6 = macro("$address6$") if (addr_v4) { return addr_v4 } else { return "udp6:[" + addr_v6 + "]" } }} vars.snmp_community = "public" vars.snmp_invert_search = false vars.snmp_timeout = "10" } object CheckCommand "snmpv3" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_snmp" ] arguments = { "-H" = { value = "$snmpv3_address$" description = "Host name, IP Address, or unix socket (must be an absolute path)" } "-p" = { value = "$snmpv3_port$" description = "Port number" } "-n" = { set_if = "$snmpv3_getnext$" description = "Use SNMP GETNEXT instead of SNMP GET" } "-P" = { value = 3 description = "SNMP protocol version" } "-L" = { value = "$snmpv3_seclevel$" description = "SNMPv3 securityLevel" } "-a" = { value = "$snmpv3_auth_alg$" description = "SNMPv3 auth proto" } "-U" = { value = "$snmpv3_user$" description = "SNMPv3 username" } "-A" = { value = "$snmpv3_auth_key$" description = "SNMPv3 authentication password" } "-X" = { value = "$snmpv3_priv_key$" description = "SNMPv3 privacy password" } "-o" = { value = "$snmpv3_oid$" description = "Object identifier(s) or SNMP variables whose value you wish to query" } "-x" = { value = "$snmpv3_priv_alg$" description = "SNMPv3 priv proto (default DES)" } "-w" = { value = "$snmpv3_warn$" description = "Warning threshold range(s)" } "-c" = { value = "$snmpv3_crit$" description = "Critical threshold range(s)" } "-s" = { value = "$snmpv3_string$" description = "Return OK state (for that OID) if STRING is an exact match" } "-r" = { value = "$snmpv3_ereg$" description = "Return OK state (for that OID) if extended regular expression REGEX matches" } "-R" = { value = "$snmpv3_eregi$" description = "Return OK state (for that OID) if case-insensitive extended REGEX matches" } "--invert-search" = { set_if = "$snmpv3_invert_search$" description = "Invert search result and return CRITICAL if found" } "-l" = { value = "$snmpv3_label$" description = "Prefix label for output from plugin" } "-m" = { value = "$snmpv3_miblist$" description = "List of SNMP MIBs for translating OIDs between numeric and textual representation" } "-u" = "$snmpv3_units$" "--rate-multiplier" = "$snmpv3_rate_multiplier$" "--rate" = { set_if = "$snmpv3_rate$" description = "Enable rate calculation" } "-t" = "$snmpv3_timeout$" } vars.snmpv3_address = "$check_address$" vars.snmpv3_auth_alg = "SHA" vars.snmpv3_priv_alg = "AES" vars.snmpv3_seclevel = "authPriv" vars.snmpv3_timeout = "10" } object CheckCommand "snmp-uptime" { import "snmp" vars.snmp_oid = "1.3.6.1.2.1.1.3.0" } object CheckCommand "apt" { command = [ PluginDir + "/check_apt" ] arguments = { "--extra-opts" = { value = "$apt_extra_opts$" description = "Read options from an ini file." } "--upgrade" = { value = "$apt_upgrade$" 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." } "--dist-upgrade" = { value = "$apt_dist_upgrade$" description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options." } "--include" = { value = "$apt_include$" description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together." } "--exclude" = { value = "$apt_exclude$" description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times." } "--critical" = { value = "$apt_critical$" 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." } "--timeout" = { value = "$apt_timeout$" description = "Seconds before plugin times out (default: 10)." } "--only-critical" = { set_if = "$apt_only_critical$" description = "Only warn about critical upgrades." } } timeout = 5m } object CheckCommand "dhcp" { command = [ PluginDir + "/check_dhcp" ] arguments = { "-s" = "$dhcp_serverip$" "-r" = "$dhcp_requestedip$" "-t" = "$dhcp_timeout$" "-i" = "$dhcp_interface$" "-m" = "$dhcp_mac$" "-u" = { set_if = "$dhcp_unicast$" } } vars.dhcp_unicast = false } object CheckCommand "dns" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_dns" ] arguments = { "-H" = { value = "$dns_lookup$" description = "The name or address you want to query." } "-s" = { value = "$dns_server$" description = "Optional DNS server you want to use for the lookup." } "-q" = { value = "$dns_query_type$" description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)" } "-a" = { value = "$dns_expected_answers$" 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)." } "-A" = { set_if = "$dns_authoritative$" } "-w" = { value = "$dns_wtime$" description = "Return warning if elapsed time exceeds value." } "-c" = { value = "$dns_ctime$" description = "Return critical if elapsed time exceeds value." } "-t" = { value = "$dns_timeout$" description = "Seconds before connection times out. Defaults to 10." } } vars.dns_lookup = "$host.name$" vars.dns_query_type = "A" vars.dns_timeout = 10 } object CheckCommand "dig" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_dig" ] arguments = { "-H" = "$dig_server$" "-p" = "$dig_port$" "-l" = { value = "$dig_lookup$" required = true } "-T" = "$dig_record_type$" "-a" = "$dig_expected_address$" "-A" = "$dig_arguments$" "-r" = "$dig_retries$" "-w" = "$dig_warning$" "-c" = "$dig_critical$" "-t" = "$dig_timeout$" "-4" = { set_if = "$dig_ipv4$" description = "Force dig to only use IPv4 query transport" } "-6" = { set_if = "$dig_ipv6$" description = "Force dig to only use IPv6 query transport" } } vars.dig_server = "$check_address$" vars.check_ipv4 = "$dig_ipv4$" vars.check_ipv6 = "$dig_ipv6$" } object CheckCommand "nscp" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_nt" ] arguments = { "-H" = "$nscp_address$" "-p" = "$nscp_port$" "-s" = "$nscp_password$" "-v" = { value = "$nscp_variable$" required = true } "-l" = { value = "$nscp_params$" repeat_key = false } "-w" = "$nscp_warn$" "-c" = "$nscp_crit$" "-t" = "$nscp_timeout$" "-d" = { value = "SHOWALL" description = "Use with SERVICESTATE to see working services or PROCSTATE for running processes" set_if = "$nscp_showall$" } } vars.nscp_address = "$check_address$" vars.nscp_port = 12489 vars.nscp_showall = false } object CheckCommand "by_ssh" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_by_ssh" ] arguments = { "-H" = "$by_ssh_address$" "-p" = "$by_ssh_port$" "-C" = {{ var command = macro("$by_ssh_command$") var arguments = macro("$by_ssh_arguments$") if (typeof(command) == String && !arguments) { return command } var escaped_args = [] for (arg in resolve_arguments(command, arguments)) { escaped_args.add(escape_shell_arg(arg)) } return escaped_args.join(" ") }} "-l" = "$by_ssh_logname$" "-i" = "$by_ssh_identity$" "-q" = { set_if = "$by_ssh_quiet$" } "-w" = "$by_ssh_warn$" "-c" = "$by_ssh_crit$" "-t" = "$by_ssh_timeout$" "-o" = { value = "$by_ssh_options$" description = "Provide ssh options (may be repeated)" } "-4" = { set_if = "$by_ssh_ipv4$" description = "Use IPv4 only" } "-6" = { set_if = "$by_ssh_ipv6$" description = "Use IPv6 only" } } vars.by_ssh_address = "$check_address$" vars.by_ssh_quiet = false vars.check_ipv4 = "$by_ssh_ipv4$" vars.check_ipv6 = "$by_ssh_ipv6$" } object CheckCommand "ups" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ups" ] arguments = { "-H" = { value = "$ups_address$" description = "Address of the upsd server" required = true } "-u" = { value = "$ups_name$" description = "Name of the UPS to monitor" required = true } "-p" = { value = "$ups_port$" description = "Port number (default: 3493)" } "-v" = { value = "$ups_variable$" description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT" } "-w" = { value = "$ups_warning$" description = "Warning threshold for the selected variable" } "-c" = { value = "$ups_critical$" description = "Critical threshold for the selected variable" } "-T" = { set_if = "$ups_celsius$" description = "Display temperature in degrees Celsius instead of Fahrenheit" } "-t" = { value = "$ups_timeout$" description = "Seconds before the connection times out (default: 10)" } } vars.ups_address = "$check_address$" vars.ups_name = "ups" } object CheckCommand "nrpe" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_nrpe" ] arguments = { "-H" = "$nrpe_address$" "-p" = "$nrpe_port$" "-c" = "$nrpe_command$" "-n" = { set_if = "$nrpe_no_ssl$" description = "Do not use SSL." } "-u" = { set_if = "$nrpe_timeout_unknown$" description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL" } "-t" = "$nrpe_timeout$" "-a" = { value = "$nrpe_arguments$" repeat_key = false order = 1 } "-4" = { set_if = "$nrpe_ipv4$" description = "Use IPv4 connection" } "-6" = { set_if = "$nrpe_ipv6$" description = "Use IPv6 connection" } } vars.nrpe_address = "$check_address$" vars.nrpe_no_ssl = false vars.nrpe_timeout_unknown = false vars.check_ipv4 = "$nrpe_ipv4$" vars.check_ipv6 = "$nrpe_ipv6$" timeout = 5m } object CheckCommand "hpjd" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_hpjd" ] arguments = { "-H" = "$hpjd_address$" "-C" = "$hpjd_community$" "-p" = "$hpjd_port$" } vars.hpjd_address = "$check_address$" } object CheckCommand "icmp" { command = [ PluginDir + "/check_icmp" ] arguments = { "-H" = { value = "$icmp_address$" repeat_key = false order = 1 } "-w" = "$icmp_wrta$,$icmp_wpl$%" "-c" = "$icmp_crta$,$icmp_cpl$%" "-s" = "$icmp_source$" "-n" = "$icmp_packets$" "-i" = "$icmp_packet_interval$" "-I" = "$icmp_target_interval$" "-m" = "$icmp_hosts_alive$" "-b" = "$icmp_data_bytes$" "-t" = "$icmp_timeout$" "-l" = "$icmp_ttl$" } vars.icmp_address = "$address$" vars.icmp_wrta = 100 vars.icmp_wpl = 5 vars.icmp_crta = 200 vars.icmp_cpl = 15 } object CheckCommand "ldap" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_ldap" ] arguments = { "-H" = { value = "$ldap_address$" description = "Host name, IP Address, or unix socket (must be an absolute path)" } "-p" = { value = "$ldap_port$" description = "Port number (default: 389)" } "-a" = { value = "$ldap_attr$" description = "ldap attribute to search (default: \"(objectclass=*)\"" } "-b" = { value = "$ldap_base$" required = true description = "ldap base (eg. ou=my unit, o=my org, c=at" } "-D" = { value = "$ldap_bind$" description = "ldap bind DN (if required)" } "-P" = { value = "$ldap_pass$" description = "ldap password (if required)" } "-T" = { set_if = "$ldap_starttls$" description = "use starttls mechanism introduced in protocol version 3" } "-S" = { set_if = "$ldap_ssl$" description = "use ldaps (ldap v2 ssl method). this also sets the default port to 636" } "-2" = { set_if = "$ldap_v2$" description = "Use LDAP protocol version 2" } "-3" = { set_if = "$ldap_v3$" description = "Use LDAP protocol version 3" } "-w" = { value = "$ldap_warning$" description = "Response time to result in warning status (seconds)" } "-c" = { value = "$ldap_critical$" description = "Response time to result in critical status (seconds)" } "-t" = { value = "$ldap_timeout$" description = "Seconds before connection times out (default: 10)" } "-v" = { set_if = "$ldap_verbose$" description = "Show details for command-line debugging" } } vars.ldap_address = "$check_address$" vars.ldap_v2 = true vars.ldap_v3 = false vars.ldap_timeout = 10s vars.ldap_verbose = false } object CheckCommand "clamd" { command = [ PluginDir + "/check_clamd" ] arguments = { "-H" = { value = "$clamd_address$" description = "The host's address or unix socket (must be an absolute path)." required = true } "-p" = { value = "$clamd_port$" description = "Port number (default: none)." } "-e" = { value = "$clamd_expect$" description = "String to expect in server response (may be repeated)." repeat_key = true } "-A" = { set_if = "$clamd_all$" description = "All expect strings need to occur in server response. Default is any." } "-E_send" = { key = "-E" order = 1 set_if = "$clamd_escape_send$" description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing." } "-s" = { order = 2 value = "$clamd_send$" description = "String to send to the server." } "-E_quit" = { key = "-E" order = 3 set_if = "$clamd_escape_quit$" description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit." } "-q" = { order = 4 value = "$clamd_quit$" description = "String to send server to initiate a clean close of the connection." } "-r" = { value = "$clamd_refuse$" description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit." } "-M" = { value = "$clamd_mismatch$" description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn." } "-j" = { set_if = "$clamd_jail$" description = "Hide output from TCP socket." } "-m" = { value = "$clamd_maxbytes$" description = "Close connection once more than this number of bytes are received." } "-d" = { value = "$clamd_delay$" description = "Seconds to wait between sending string and polling for response." } "-D" = { value = "$clamd_certificate$" 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." } "-S" = { set_if = "$clamd_ssl$" description = "Use SSL for the connection." } "-w" = { value = "$clamd_wtime$" description = "Response time to result in warning status (seconds)." } "-c" = { value = "$clamd_ctime$" description = "Response time to result in critical status (seconds)." } "-t" = { value = "$clamd_timeout$" description = "Seconds before connection times out. Defaults to 10." } "-4" = { set_if = "$clamd_ipv4$" description = "Use IPv4 only" } "-6" = { set_if = "$clamd_ipv6$" description = "Use IPv6 only" } } vars.clamd_ssl = false vars.clamd_refuse = "crit" vars.clamd_mismatch = "warn" vars.clamd_timeout = 10 vars.check_ipv4 = "$clamd_ipv4$" vars.check_ipv6 = "$clamd_ipv6$" } object CheckCommand "mailq" { command = [ PluginDir + "/check_mailq" ] arguments = { "-w" = { value = "$mailq_warning$" description = "Min. number of messages in queue to generate warning" required = true } "-c" = { value = "$mailq_critical$" description = "Min. number of messages in queue to generate critical alert ( w < c )" required = true } "-W" = { value = "$mailq_domain_warning$" description = "Min. number of messages for same domain in queue to generate warning" } "-C" = { value = "$mailq_domain_critical$" description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )" } "-t" = { value = "$mailq_timeout$" description = "Plugin timeout in seconds (default = 15)" } "-M" = { value = "$mailq_servertype$" description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)" } "-s" = { set_if = "$mailq_sudo$" description = "Use sudo for mailq command" } } } object CheckCommand "pgsql" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_pgsql" ] arguments = { "-H" = "$pgsql_hostname$" "-P" = "$pgsql_port$" "-d" = "$pgsql_database$" "-l" = "$pgsql_username$" "-p" = "$pgsql_password$" "-o" = "$pgsql_options$" "-w" = "$pgsql_warning$" "-c" = "$pgsql_critical$" "-t" = "$pgsql_timeout$" "-q" = "$pgsql_query$" "-W" = "$pgsql_query_warning$" "-C" = "$pgsql_query_critical$" } vars.pgsql_hostname = "$check_address$" } object CheckCommand "mysql" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_mysql" ] arguments = { "-H" = "$mysql_hostname$" "-P" = "$mysql_port$" "-n" = { set_if = "$mysql_ignore_auth$" } "-s" = "$mysql_socket$" "-d" = "$mysql_database$" "-f" = "$mysql_file$" "-g" = "$mysql_group$" "-u" = "$mysql_username$" "-p" = "$mysql_password$" "-S" = { set_if = "$mysql_check_slave$" } "-w" = "$mysql_warning$" "-c" = "$mysql_critical$" "-l" = { set_if = "$mysql_ssl$" } "-C" = "$mysql_cacert$" "-a" = "$mysql_cert$" "-k" = "$mysql_key$" "-D" = "$mysql_cadir$" "-L" = "$mysql_ciphers$" } vars.mysql_hostname = "$check_address$" } object CheckCommand "negate" { command = [ PluginDir + "/negate" ] arguments = { "-t" = "$negate_timeout$" "-T" = "$negate_timeout_result$" "-o" = "$negate_ok$" "-w" = "$negate_warning$" "-c" = "$negate_critical$" "-s" = { set_if = "$negate_substitute$" } "--wrapped-plugin" = { value = {{ var command = macro("$negate_command$") var arguments = macro("$negate_arguments$") if (typeof(command) == String && !arguments) { return command } var escaped_args = [] for (arg in resolve_arguments(command, arguments)) { escaped_args.add(arg) } return escaped_args.join(" ") }} skip_key = true order = 1 } } vars.negate_timeout_result = "UNKNOWN" } object CheckCommand "file_age" { command = [ PluginDir + "/check_file_age" ] arguments = { "-w" = { value = "$file_age_warning_time$" description = "File must be no more than this many seconds old (default: 240s)" } "-c" = { value = "$file_age_critical_time$" description = "File must be no more than this many seconds old (default: 600s)" } "-W" = { value = "$file_age_warning_size$" description = "File must be at least this many bytes long" } "-C" = { value = "$file_age_critical_size$" description = "File must be at least this many bytes long (default: 0B)" } "-i" = { set_if = "$file_age_ignoremissing$" description = "return OK if the file does not exist" } "-f" = { value = "$file_age_file$" description = "File to monitor" } } vars.file_age_ignoremissing = false } object CheckCommand "smart" { command = [ PluginDir + "/check_ide_smart" ] arguments = { "-d" = { value = "$smart_device$" description = "Name of a local hard drive to monitor" required = true } } } object CheckCommand "breeze" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_breeze" ] arguments = { "-H" = { value = "$breeze_hostname$" description = "Name or IP address of host to check" required = true } "-C" = { value = "$breeze_community$" description = "SNMPv1 community (default public)" } "-w" = { value = "$breeze_warning$" description = "Percentage strength below which a WARNING status will result" required = true } "-c" = { value = "$breeze_critical$" description = "Percentage strength below which a CRITICAL status will result" required = true } } vars.breeze_hostname = "$check_address$" vars.breeze_warning = "50" vars.breeze_critical = "20" } object CheckCommand "flexlm" { command = [ PluginDir + "/check_flexlm" ] arguments = { "-F" = { value = "$flexlm_licensefile$" description = "Name of license file (usually license.dat)" required = true } "-t" = { value = "$flexlm_timeout$" description = "Plugin time out in seconds (default = 15)" } } } object CheckCommand "game" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_game" ] arguments = { "-P" = { value = "$game_port$" description = "Port to connect to" } "-t" = { value = "$game_timeout$" description = "Seconds before connection times out (default: 10)" } "-g" = { value = "$game_gamefield$" description = "Field number in raw qstat output that contains game name" } "-m" = { value = "$game_mapfield$" description = "Field number in raw qstat output that contains map name" } "-p" = { value = "$game_pingfield$" description = "Field number in raw qstat output that contains ping time" } "-G" = { value = "$game_gametime$" description = "Field number in raw qstat output that contains game time" } "-H" = { value = "$game_hostname$" description = "Name of the host running the game" } "game" = { value = "$game_game$" description = "Name of the game" order = 1 skip_key = true } "ipaddress" = { value = "$game_ipaddress$" description = "Ipaddress of the game server to query" order = 2 skip_key = true } } } object CheckCommand "mysql_query" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_mysql_query" ] arguments = { "-H" = "$mysql_query_hostname$" "-P" = "$mysql_query_port$" "-u" = "$mysql_query_username$" "-p" = "$mysql_query_password$" "-d" = "$mysql_query_database$" "-f" = "$mysql_query_file$" "-g" = "$mysql_query_group$" "-q" = "$mysql_query_execute$" "-w" = "$mysql_query_warning$" "-c" = "$mysql_query_critical$" } vars.mysql_query_hostname = "$check_address$" } object CheckCommand "radius" { import "ipv4-or-ipv6" command = [ PluginDir + "/check_radius", ] arguments = { "-H" = "$radius_address$", "-F" = "$radius_config_file$", "-u" = "$radius_username$", "-p" = "$radius_password$", "-P" = { value = "$radius_port$", }, "-n" = { value = "$radius_nas_id$", description = "NAS identifier" } "-N" = { value = "$radius_nas_address$", description = "NAS IP Address" }, "-e" = { value = "$radius_expect$", description = "Response string to expect from the server" }, "-r" = { value = "$radius_retries$", description = "Number of times to retry a failed connection" }, "-t" = { value = "$radius_timeout$", description = "Seconds before connection times out (default: 10) Optional : can be a state integer (0,1,2,3) or a state STRING" }, } vars.radius_address = "$check_address$" }