2013-02-01 11:39:06 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
|
|
|
* Copyright (C) 2012 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. *
|
|
|
|
******************************************************************************/
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "ping4" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_ping",
|
|
|
|
"-4",
|
|
|
|
"-H", "$address$",
|
|
|
|
"-w", "$wrta$,$wpl$%",
|
|
|
|
"-c", "$crta$,$cpl$%",
|
|
|
|
"-p", "$packets$",
|
|
|
|
"-t", "$timeout$"
|
|
|
|
},
|
2013-02-01 11:39:06 +01:00
|
|
|
|
|
|
|
macros = {
|
|
|
|
wrta = 100,
|
|
|
|
wpl = 5,
|
2013-02-04 12:43:16 +01:00
|
|
|
|
2013-02-01 11:39:06 +01:00
|
|
|
crta = 200,
|
|
|
|
cpl = 15,
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
packets = 5,
|
|
|
|
timeout = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "ping6" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_ping",
|
|
|
|
"-6",
|
|
|
|
"-H", "$address6$",
|
|
|
|
"-w", "$wrta$,$wpl$%",
|
|
|
|
"-c", "$crta$,$cpl$%",
|
|
|
|
"-p", "$packets$",
|
|
|
|
"-t", "$timeout$"
|
|
|
|
},
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
macros = {
|
|
|
|
wrta = 100,
|
|
|
|
wpl = 5,
|
|
|
|
|
|
|
|
crta = 200,
|
|
|
|
cpl = 15,
|
|
|
|
|
2013-02-01 11:39:06 +01:00
|
|
|
packets = 5,
|
|
|
|
timeout = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "dummy" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_dummy",
|
|
|
|
"$state$",
|
|
|
|
"$text$"
|
|
|
|
},
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
macros = {
|
|
|
|
state = 0,
|
|
|
|
text = "Check was successful."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "http_vhost" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_http",
|
|
|
|
"-H", "$vhost$"
|
|
|
|
},
|
2013-02-01 11:39:06 +01:00
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "http_ip" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_http",
|
|
|
|
"-I", "$address$"
|
|
|
|
}
|
2013-02-01 11:39:06 +01:00
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "ssh" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_ssh",
|
|
|
|
"$address$"
|
|
|
|
}
|
2013-02-01 11:39:06 +01:00
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "disk" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_disk",
|
|
|
|
"-w", "$wfree$",
|
|
|
|
"-c", "$cfree$"
|
|
|
|
},
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
macros += {
|
|
|
|
wfree = "20%",
|
|
|
|
cfree = "10%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "users" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_users",
|
|
|
|
"-w", "$wgreater$",
|
|
|
|
"-c", "$cgreater$"
|
|
|
|
},
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
macros += {
|
|
|
|
wgreater = 20,
|
|
|
|
cgreater = 50,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "processes" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_procs",
|
|
|
|
"-w", "$wgreater$",
|
|
|
|
"-c", "$cgreater$"
|
|
|
|
},
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
macros += {
|
|
|
|
wgreater = 250,
|
|
|
|
cgreater = 400,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-02-16 09:18:34 +01:00
|
|
|
template Service "load" inherits "plugin-service" {
|
2013-02-13 20:08:09 +01:00
|
|
|
check_command = {
|
|
|
|
"$plugindir$/check_load",
|
|
|
|
"-w", "$wload1$,$wload5$,$wload15$",
|
|
|
|
"-c", "$cload1$,$cload5$,$cload15$"
|
|
|
|
},
|
2013-02-04 12:43:16 +01:00
|
|
|
|
|
|
|
macros = {
|
|
|
|
wload1 = 5.0,
|
|
|
|
wload5 = 4.0,
|
|
|
|
wload15 = 3.0,
|
|
|
|
|
|
|
|
cload1 = 10.0,
|
|
|
|
cload5 = 6.0,
|
|
|
|
cload15 = 4.0
|
|
|
|
}
|
2013-02-01 11:39:06 +01:00
|
|
|
}
|