mirror of https://github.com/Icinga/icinga2.git
605 lines
12 KiB
Plaintext
605 lines
12 KiB
Plaintext
/******************************************************************************
|
|
* Icinga 2 *
|
|
* Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
|
|
* *
|
|
* 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 "ping-common" {
|
|
import "plugin-check-command"
|
|
|
|
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 "ping4" {
|
|
import "ping-common"
|
|
|
|
command += [ "-4" ]
|
|
|
|
vars.ping_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "ping6" {
|
|
import "ping-common"
|
|
|
|
command += [ "-6" ]
|
|
|
|
vars.ping_address = "$address6$"
|
|
}
|
|
|
|
object CheckCommand "hostalive" {
|
|
import "ping4"
|
|
|
|
vars.ping_wrta = 3000.0
|
|
vars.ping_wpl = 80
|
|
|
|
vars.ping_crta = 5000.0
|
|
vars.ping_cpl = 100
|
|
}
|
|
|
|
|
|
template CheckCommand "fping-common" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_fping" ]
|
|
|
|
arguments = {
|
|
"host" = {
|
|
value = "$fping_address$"
|
|
skip_key = true
|
|
order = 0
|
|
}
|
|
"-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" {
|
|
import "plugin-check-command"
|
|
|
|
command = [
|
|
PluginDir + "/check_dummy",
|
|
"$dummy_state$",
|
|
"$dummy_text$"
|
|
]
|
|
|
|
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 "plugin-check-command"
|
|
|
|
command = [
|
|
PluginDir + "/check_tcp",
|
|
"-H", "$tcp_address$",
|
|
"-p", "$tcp_port$"
|
|
]
|
|
|
|
vars.tcp_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "ssl" {
|
|
import "plugin-check-command"
|
|
|
|
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$"
|
|
}
|
|
|
|
vars.ssl_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "udp" {
|
|
import "plugin-check-command"
|
|
|
|
command = [
|
|
PluginDir + "/check_udp",
|
|
"-H", "$udp_address$",
|
|
"-p", "$udp_port$"
|
|
]
|
|
|
|
vars.udp_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "http" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_http" ]
|
|
|
|
arguments = {
|
|
"-H" = "$http_vhost$"
|
|
"-I" = "$http_address$"
|
|
"-u" = "$http_uri$"
|
|
"-p" = "$http_port$"
|
|
"-S" = {
|
|
set_if = "$http_ssl$"
|
|
}
|
|
"--sni" = {
|
|
set_if = "$http_sni$"
|
|
}
|
|
"-a" = {
|
|
value = "$http_auth_pair$"
|
|
description = "Username:password on sites with basic authentication"
|
|
}
|
|
"--no-body" = {
|
|
set_if = "$http_ignore_body$"
|
|
}
|
|
"-r" = "$http_expect_body_regex$"
|
|
"-w" = "$http_warn_time$"
|
|
"-c" = "$http_critical_time$"
|
|
"-e" = "$http_expect$"
|
|
}
|
|
|
|
vars.http_address = "$address$"
|
|
vars.http_ssl = false
|
|
vars.http_sni = false
|
|
}
|
|
|
|
object CheckCommand "ftp" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_ftp" ]
|
|
|
|
arguments = {
|
|
"-H" = "$ftp_address$"
|
|
}
|
|
|
|
vars.ftp_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "smtp" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_smtp" ]
|
|
|
|
arguments = {
|
|
"-H" = "$smtp_address$"
|
|
"-p" = "$smtp_port$"
|
|
"-f" = "$smtp_mail_from$"
|
|
}
|
|
|
|
vars.smtp_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "ssmtp" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_ssmtp" ]
|
|
arguments = {
|
|
"-H" = "$ssmtp_address$"
|
|
"-p" = "$ssmtp_port$"
|
|
"-f" = "$ssmtp_mail_from$"
|
|
}
|
|
|
|
vars.ssmtp_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "imap" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_imap" ]
|
|
|
|
arguments = {
|
|
"-H" = "$imap_address$"
|
|
"-p" = "$imap_port$"
|
|
}
|
|
|
|
vars.imap_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "simap" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_simap" ]
|
|
|
|
arguments = {
|
|
"-H" = "$simap_address$"
|
|
"-p" = "$simap_port$"
|
|
}
|
|
|
|
vars.simap_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "pop" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_pop" ]
|
|
|
|
arguments = {
|
|
"-H" = "$pop_address$"
|
|
"-p" = "$pop_port$"
|
|
}
|
|
|
|
vars.pop_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "spop" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_spop" ]
|
|
|
|
arguments = {
|
|
"-H" = "$spop_address$"
|
|
"-p" = "$spop_port$"
|
|
}
|
|
|
|
vars.spop_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "ntp_time" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_ntp_time" ]
|
|
|
|
arguments = {
|
|
"-H" = "$ntp_address$"
|
|
}
|
|
|
|
vars.ntp_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "ssh" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_ssh" ]
|
|
|
|
arguments = {
|
|
"-p" = "$ssh_port$"
|
|
"host" = {
|
|
value = "$ssh_address$"
|
|
skip_key = true
|
|
order = 1
|
|
}
|
|
}
|
|
|
|
vars.ssh_address = "$address$"
|
|
}
|
|
|
|
object CheckCommand "disk" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_disk" ]
|
|
|
|
arguments = {
|
|
"-w" = "$disk_wfree$%"
|
|
"-c" = "$disk_cfree$%"
|
|
}
|
|
|
|
vars.disk_wfree = 20
|
|
vars.disk_cfree = 10
|
|
}
|
|
|
|
object CheckCommand "users" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_users" ]
|
|
|
|
arguments = {
|
|
"-w" = "$users_wgreater$"
|
|
"-c" = "$users_cgreater$"
|
|
}
|
|
|
|
vars.users_wgreater = 20
|
|
vars.users_cgreater = 50
|
|
}
|
|
|
|
object CheckCommand "procs" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_procs" ]
|
|
|
|
arguments = {
|
|
"-w" = "$procs_wgreater$"
|
|
"-c" = "$procs_cgreater$"
|
|
}
|
|
|
|
vars.procs_wgreater = 250
|
|
vars.procs_cgreater = 400
|
|
}
|
|
|
|
object CheckCommand "swap" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_swap" ]
|
|
|
|
arguments = {
|
|
"-w" = "$swap_wfree$%"
|
|
"-c" = "$swap_cfree$%"
|
|
}
|
|
|
|
vars.swap_wfree = 50
|
|
vars.swap_cfree = 25
|
|
}
|
|
|
|
object CheckCommand "load" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_load" ]
|
|
|
|
arguments = {
|
|
"-w" = "$load_wload1$,$load_wload5$,$load_wload15$"
|
|
"-c" = "$load_cload1$,$load_cload5$,$load_cload15$"
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
object CheckCommand "snmp" {
|
|
import "plugin-check-command"
|
|
|
|
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$"
|
|
"--invert-search" = {
|
|
set_if = "$snmp_invert_search$"
|
|
description = "Invert search result and return CRITICAL if found"
|
|
}
|
|
}
|
|
|
|
vars.snmp_address = "$address$"
|
|
vars.snmp_community = "public"
|
|
vars.snmp_invert_search = false
|
|
}
|
|
|
|
object CheckCommand "snmpv3" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_snmp" ]
|
|
|
|
arguments = {
|
|
"-H" = "$snmpv3_address$"
|
|
"-P" = 3
|
|
"--seclevel" = "authPriv"
|
|
"-U" = "$snmpv3_user$"
|
|
"-a" = "$snmpv3_auth_alg$"
|
|
"-A" = "$snmpv3_auth_key$"
|
|
"-x" = "$snmpv3_priv_alg$"
|
|
"-X" = "$snmpv3_priv_key$"
|
|
"-o" = "$snmpv3_oid$"
|
|
"-c" = "$snmpv3_crit$"
|
|
"-w" = "$snmpv3_warn$"
|
|
}
|
|
|
|
vars.snmpv3_address = "$address$"
|
|
vars.snmpv3_auth_alg = "SHA"
|
|
vars.snmpv3_priv_alg = "AES"
|
|
}
|
|
|
|
object CheckCommand "snmp-uptime" {
|
|
import "snmp"
|
|
|
|
vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
|
|
}
|
|
|
|
object CheckCommand "apt" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_apt" ]
|
|
}
|
|
|
|
object CheckCommand "dhcp" {
|
|
import "plugin-check-command"
|
|
|
|
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 "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_dns" ]
|
|
|
|
arguments = {
|
|
"-H" = "$dns_lookup$"
|
|
"-s" = "$dns_server$"
|
|
"-a" = "$dns_expected_answer$"
|
|
"-A" = {
|
|
set_if = "$dns_authoritative$"
|
|
}
|
|
}
|
|
|
|
vars.dns_lookup = "$host_name$"
|
|
vars.dns_expected_answer = "$address$"
|
|
}
|
|
|
|
object CheckCommand "dig" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_dig" ]
|
|
|
|
arguments = {
|
|
"-H" = "$dig_server$"
|
|
"-l" = "$dig_lookup$"
|
|
}
|
|
|
|
vars.dig_server = "$address$"
|
|
}
|
|
|
|
object CheckCommand "nscp" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_nt" ]
|
|
|
|
arguments = {
|
|
"-H" = "$nscp_address$"
|
|
"-p" = "$nscp_port$"
|
|
"-s" = "$nscp_password$"
|
|
"-v" = {
|
|
value = "$nscp_variable$"
|
|
required = true
|
|
}
|
|
"-l" = "$nscp_params$"
|
|
"-w" = "$nscp_warn$"
|
|
"-c" = "$nscp_crit$"
|
|
"-t" = "$nscp_timeout$"
|
|
}
|
|
|
|
vars.nscp_address = "$address$"
|
|
vars.nscp_port = 12489
|
|
}
|
|
|
|
object CheckCommand "by_ssh" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_by_ssh" ]
|
|
|
|
arguments = {
|
|
"-H" = "$by_ssh_address$"
|
|
"-p" = "$by_ssh_port$"
|
|
"-C" = "$by_ssh_command$"
|
|
"-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$"
|
|
}
|
|
|
|
vars.by_ssh_address = "$address$"
|
|
vars.by_ssh_quiet = false
|
|
}
|
|
|
|
object CheckCommand "ups" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ PluginDir + "/check_ups" ]
|
|
|
|
arguments = {
|
|
"-H" = "$ups_address$"
|
|
"-u" = "$ups_name$"
|
|
}
|
|
|
|
vars.ups_address = "$address$"
|
|
vars.ups_name = "ups"
|
|
}
|
|
|
|
object CheckCommand "nrpe" {
|
|
import "plugin-check-command"
|
|
|
|
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$"
|
|
}
|
|
|
|
vars.nrpe_address = "$address$"
|
|
vars.nrpe_no_ssl = false
|
|
vars.nrpe_timeout_unknown = false
|
|
}
|
|
|
|
/* Contrib plugins */
|
|
object CheckCommand "running_kernel" {
|
|
import "plugin-check-command"
|
|
|
|
command = [ "sudo", PluginDir + "/check_running_kernel" ]
|
|
}
|
|
|