2013-06-13 11:33:00 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
2014-03-19 01:02:29 +01:00
|
|
|
* Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
|
2013-06-13 11:33:00 +02:00
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
******************************************************************************/
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
template CheckCommand "ping-common" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2013-06-13 11:33:00 +02:00
|
|
|
command = [
|
2014-04-26 13:16:08 +02:00
|
|
|
PluginDir + "/check_ping"
|
|
|
|
]
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
|
|
|
"-H" = "$ping_address$"
|
|
|
|
"-w" = "$ping_wrta$,$ping_wpl$%"
|
|
|
|
"-c" = "$ping_crta$,$ping_cpl$%"
|
2014-04-29 10:41:32 +02:00
|
|
|
"-p" = "$ping_packets$"
|
|
|
|
"-t" = "$ping_timeout$"
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.ping_wrta = 100
|
|
|
|
vars.ping_wpl = 5
|
|
|
|
vars.ping_crta = 200
|
|
|
|
vars.ping_cpl = 15
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
object CheckCommand "ping4" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "ping-common"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command += [ "-4" ]
|
|
|
|
|
|
|
|
vars.ping_address = "$address$"
|
|
|
|
}
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
object CheckCommand "ping6" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "ping-common"
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command += [ "-6" ]
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.ping_address = "$address6$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-04 19:04:13 +02:00
|
|
|
object CheckCommand "hostalive" {
|
2014-04-04 16:22:12 +02:00
|
|
|
import "ping4"
|
|
|
|
|
2014-04-29 10:44:09 +02:00
|
|
|
vars.ping_wrta = 3000.0
|
|
|
|
vars.ping_wpl = 80
|
2014-04-04 16:22:12 +02:00
|
|
|
|
2014-04-29 10:44:09 +02:00
|
|
|
vars.ping_crta = 5000.0
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.ping_cpl = 100
|
2014-04-04 16:22:12 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "dummy" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2013-06-13 11:33:00 +02:00
|
|
|
command = [
|
2014-03-31 13:11:36 +02:00
|
|
|
PluginDir + "/check_dummy",
|
2014-04-26 13:16:08 +02:00
|
|
|
"$dummy_state$",
|
|
|
|
"$dummy_text$"
|
2013-06-13 11:33:00 +02:00
|
|
|
],
|
|
|
|
|
2014-04-29 10:44:09 +02:00
|
|
|
vars.dummy_state = 0
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.dummy_text = "Check was successful."
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "passive" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "dummy"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-29 10:44:09 +02:00
|
|
|
vars.dummy_state = 3
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.dummy_text = "No Passive Check Result Received."
|
2013-11-24 17:47:34 +01:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "tcp" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2013-06-13 11:33:00 +02:00
|
|
|
command = [
|
2014-03-31 13:11:36 +02:00
|
|
|
PluginDir + "/check_tcp",
|
2014-04-26 13:16:08 +02:00
|
|
|
"-H", "$tcp_address$",
|
|
|
|
"-p", "$tcp_port$"
|
2013-06-13 11:33:00 +02:00
|
|
|
]
|
2014-04-26 13:16:08 +02:00
|
|
|
|
|
|
|
vars.tcp_address = "$address$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "udp" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2013-06-13 11:33:00 +02:00
|
|
|
command = [
|
2014-03-31 13:11:36 +02:00
|
|
|
PluginDir + "/check_udp",
|
2014-04-26 13:16:08 +02:00
|
|
|
"-H", "$udp_address$",
|
|
|
|
"-p", "$udp_port$"
|
2013-06-13 11:33:00 +02:00
|
|
|
]
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.udp_address = "$address$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
object CheckCommand "http" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_http"
|
|
|
|
|
|
|
|
arguments = {
|
2014-04-29 10:41:32 +02:00
|
|
|
"-H" = "$http_vhost$"
|
2014-04-26 13:16:08 +02:00
|
|
|
"-I" = "$http_address$"
|
2014-04-29 10:41:32 +02:00
|
|
|
"-u" = "$http_uri$"
|
|
|
|
"-p" = "$http_port$"
|
2014-04-26 13:16:08 +02:00
|
|
|
"-S" = {
|
|
|
|
set_if = "$http_ssl$"
|
|
|
|
}
|
2014-04-29 10:41:32 +02:00
|
|
|
"-w" = "$http_warn_time$"
|
|
|
|
"-c" = "$http_critical_time$"
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.http_address = "$address$"
|
|
|
|
vars.http_ssl = false
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
object CheckCommand "smtp" {
|
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_smtp"
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
|
|
|
"-H" = "$smtp_address$"
|
|
|
|
}
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.smtp_address = "$address$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "ssmtp" {
|
2014-04-26 13:16:08 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_ssmtp"
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$ssmtp_address$"
|
2014-04-29 10:41:32 +02:00
|
|
|
"-p" = "$ssmtp_port$"
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.ssmtp_address = "$address$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "ntp_time" {
|
2014-04-26 13:16:08 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_ntp_time"
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$ntp_address$"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.ntp_address = "$address$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "ssh" {
|
2014-04-26 13:16:08 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 18:19:12 +02:00
|
|
|
command = PluginDir + "/check_ssh"
|
|
|
|
|
|
|
|
arguments = {
|
2014-04-29 10:41:32 +02:00
|
|
|
"-p" = "$ssh_port$"
|
2014-04-26 18:19:12 +02:00
|
|
|
"host" = {
|
|
|
|
value = "$ssh_address$"
|
|
|
|
skip_key = true
|
2014-04-29 10:32:06 +02:00
|
|
|
order = -1
|
2014-04-26 18:19:12 +02:00
|
|
|
}
|
|
|
|
}
|
2014-04-26 13:16:08 +02:00
|
|
|
|
|
|
|
vars.ssh_address = "$address$"
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-03-27 12:30:24 +01:00
|
|
|
object CheckCommand "disk" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_disk"
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
|
|
|
"-w" = "$disk_wfree$%"
|
|
|
|
"-c" = "$disk_cfree$%"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.disk_wfree = 20
|
|
|
|
vars.disk_cfree = 10
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-12 08:18:38 +02:00
|
|
|
object CheckCommand "users" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_users"
|
|
|
|
|
|
|
|
arguments = {
|
2014-04-26 16:40:30 +02:00
|
|
|
"-w" = "$users_wgreater$"
|
2014-04-26 13:16:08 +02:00
|
|
|
"-c" = "$users_cgreater$"
|
|
|
|
}
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.users_wgreater = 20
|
|
|
|
vars.users_cgreater = 50
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
object CheckCommand "procs" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_procs"
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-w" = "$procs_wgreater$"
|
|
|
|
"-c" = "$procs_cgreater$"
|
|
|
|
}
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.procs_wgreater = 250
|
2014-04-29 10:44:09 +02:00
|
|
|
vars.procs_cgreater = 400
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-12 08:18:38 +02:00
|
|
|
object CheckCommand "swap" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-04-12 08:18:38 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_swap"
|
2014-04-12 08:18:38 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
|
|
|
"-w" = "$swap_wfree$%",
|
|
|
|
"-c" = "$swap_cfree$%"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.swap_wfree = 50
|
|
|
|
vars.swap_cfree = 25
|
2014-04-12 08:18:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "load" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_load"
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-w" = "$load_wload1$,$load_wload5$,$load_wload15$"
|
|
|
|
"-c" = "$load_cload1$,$load_cload5$,$load_cload15$"
|
|
|
|
}
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.load_wload1 = 5.0
|
|
|
|
vars.load_wload5 = 4.0
|
|
|
|
vars.load_wload15 = 3.0
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.load_cload1 = 10.0
|
|
|
|
vars.load_cload5 = 6.0
|
|
|
|
vars.load_cload15 = 4.0
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-12 08:18:38 +02:00
|
|
|
object CheckCommand "snmp" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
command = PluginDir + "/check_snmp"
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
|
|
|
"-H" = "$snmp_address$",
|
|
|
|
"-o" = "$snmp_oid$",
|
|
|
|
"-C" = "$snmp_community$"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.snmp_address = "$address$"
|
|
|
|
vars.snmp_community = "public"
|
2013-07-30 20:45:09 +02:00
|
|
|
}
|
2013-09-30 13:17:07 +02:00
|
|
|
|
2014-04-12 08:18:38 +02:00
|
|
|
object CheckCommand "snmp-uptime" {
|
2014-04-29 10:44:09 +02:00
|
|
|
import "snmp"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
|
2013-09-30 13:17:07 +02:00
|
|
|
}
|
|
|
|
|
2014-04-13 18:47:02 +02:00
|
|
|
object CheckCommand "apt" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
|
|
|
command = [
|
|
|
|
PluginDir + "/check_apt"
|
|
|
|
]
|
|
|
|
}
|
2014-05-12 12:25:14 +02:00
|
|
|
|
2014-05-17 13:33:57 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2014-05-12 12:25:14 +02:00
|
|
|
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$",
|
2014-05-12 13:03:04 +02:00
|
|
|
"-t" = "$nscp_timeout$"
|
2014-05-12 12:25:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.nscp_address = "$address$"
|
|
|
|
vars.nscp_port = 12489
|
|
|
|
}
|