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
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ 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-06-18 19:26:18 +02:00
|
|
|
|
|
|
|
template CheckCommand "fping-common" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-09-11 08:55:59 +02:00
|
|
|
command = [
|
|
|
|
PluginDir + "/check_fping",
|
|
|
|
"$fping_address$"
|
|
|
|
]
|
2014-06-18 19:26:18 +02:00
|
|
|
|
|
|
|
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$"
|
|
|
|
}
|
|
|
|
|
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$"
|
2014-07-11 14:38:15 +02:00
|
|
|
]
|
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-06-15 23:58:46 +02:00
|
|
|
object CheckCommand "ssl" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_tcp" ]
|
2014-06-15 23:58:46 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$ssl_address$"
|
|
|
|
"-p" = "$ssl_port$"
|
|
|
|
"--ssl" = { }
|
|
|
|
"--timeout" = "$ssl_timeout$"
|
2014-07-23 09:37:04 +02:00
|
|
|
"-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$"
|
2014-06-15 23:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.ssl_address = "$address$"
|
|
|
|
}
|
|
|
|
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_http" ]
|
2014-06-02 10:47:31 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
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-06-27 21:38:11 +02:00
|
|
|
"--sni" = {
|
|
|
|
set_if = "$http_sni$"
|
|
|
|
}
|
2014-09-24 10:37:24 +02:00
|
|
|
"-C" = {
|
|
|
|
value = "$http_certificate$"
|
|
|
|
description = "Minimum number of days a certificate has to be valid. Port defaults to 443."
|
|
|
|
}
|
|
|
|
"-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)"
|
|
|
|
}
|
2014-06-03 19:54:59 +02:00
|
|
|
"-a" = {
|
|
|
|
value = "$http_auth_pair$"
|
|
|
|
description = "Username:password on sites with basic authentication"
|
|
|
|
}
|
2014-06-15 23:13:04 +02:00
|
|
|
"--no-body" = {
|
|
|
|
set_if = "$http_ignore_body$"
|
|
|
|
}
|
2014-04-29 10:41:32 +02:00
|
|
|
"-w" = "$http_warn_time$"
|
|
|
|
"-c" = "$http_critical_time$"
|
2014-07-10 22:16:14 +02:00
|
|
|
"-e" = "$http_expect$"
|
2014-09-24 10:37:24 +02:00
|
|
|
"-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" = {
|
2014-10-11 19:30:53 +02:00
|
|
|
set_if = "$http_linespan$"
|
2014-09-24 10:37:24 +02:00
|
|
|
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"
|
|
|
|
}
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.http_address = "$address$"
|
|
|
|
vars.http_ssl = false
|
2014-06-27 21:38:11 +02:00
|
|
|
vars.http_sni = false
|
2014-09-24 10:37:24 +02:00
|
|
|
vars.http_linespan = false
|
|
|
|
vars.http_invertregex = false
|
2013-06-13 11:33:00 +02:00
|
|
|
}
|
|
|
|
|
2014-05-28 23:08:32 +02:00
|
|
|
object CheckCommand "ftp" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_ftp" ]
|
2014-05-28 23:08:32 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$ftp_address$"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.ftp_address = "$address$"
|
|
|
|
}
|
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
object CheckCommand "smtp" {
|
|
|
|
import "plugin-check-command"
|
2014-03-27 12:30:24 +01:00
|
|
|
|
2014-07-16 12:58:18 +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-06-22 14:21:11 +02:00
|
|
|
"-p" = "$smtp_port$"
|
2014-06-15 21:55:06 +02:00
|
|
|
"-f" = "$smtp_mail_from$"
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_ssmtp" ]
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
|
|
|
"-H" = "$ssmtp_address$"
|
2014-04-29 10:41:32 +02:00
|
|
|
"-p" = "$ssmtp_port$"
|
2014-06-15 21:55:06 +02:00
|
|
|
"-f" = "$ssmtp_mail_from$"
|
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-05-28 22:14:24 +02:00
|
|
|
object CheckCommand "imap" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_imap" ]
|
2014-05-28 22:14:24 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$imap_address$"
|
2014-06-22 14:21:11 +02:00
|
|
|
"-p" = "$imap_port$"
|
2014-05-28 22:14:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.imap_address = "$address$"
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "simap" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_simap" ]
|
2014-05-28 22:14:24 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$simap_address$"
|
|
|
|
"-p" = "$simap_port$"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.simap_address = "$address$"
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "pop" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_pop" ]
|
2014-05-28 22:14:24 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$pop_address$"
|
2014-06-22 14:21:11 +02:00
|
|
|
"-p" = "$pop_port$"
|
2014-05-28 22:14:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.pop_address = "$address$"
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "spop" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_spop" ]
|
2014-05-28 22:14:24 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$spop_address$"
|
|
|
|
"-p" = "$spop_port$"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.spop_address = "$address$"
|
|
|
|
}
|
|
|
|
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_ntp_time" ]
|
2014-04-26 13:16:08 +02:00
|
|
|
|
|
|
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_ssh" ]
|
2014-04-26 18:19:12 +02:00
|
|
|
|
|
|
|
arguments = {
|
2014-04-29 10:41:32 +02:00
|
|
|
"-p" = "$ssh_port$"
|
2014-07-28 10:28:16 +02:00
|
|
|
"-t" = "$ssh_timeout$"
|
2014-04-26 18:19:12 +02:00
|
|
|
"host" = {
|
|
|
|
value = "$ssh_address$"
|
|
|
|
skip_key = true
|
2014-07-21 15:09:01 +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-07-16 12:58:18 +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$%"
|
2014-11-06 14:17:28 +01:00
|
|
|
"-W" = "$disk_inode_wfree$%"
|
|
|
|
"-K" = "$disk_inode_cfree$%"
|
|
|
|
"-p" = "$disk_partition$"
|
|
|
|
"-x" = "$disk_partition_excluded$"
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_users" ]
|
2014-04-26 13:16:08 +02:00
|
|
|
|
|
|
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_procs" ]
|
2014-04-26 13:16:08 +02:00
|
|
|
|
2014-09-24 10:37:24 +02:00
|
|
|
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
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_swap" ]
|
2014-04-12 08:18:38 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
2014-05-22 14:05:56 +02:00
|
|
|
"-w" = "$swap_wfree$%"
|
2014-04-26 13:16:08 +02:00
|
|
|
"-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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_load" ]
|
2014-04-26 13:16:08 +02:00
|
|
|
|
|
|
|
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-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_snmp" ]
|
2013-06-13 11:33:00 +02:00
|
|
|
|
2014-04-26 13:16:08 +02:00
|
|
|
arguments = {
|
2014-05-22 14:05:56 +02:00
|
|
|
"-H" = "$snmp_address$"
|
|
|
|
"-o" = "$snmp_oid$"
|
2014-04-26 13:16:08 +02:00
|
|
|
"-C" = "$snmp_community$"
|
2014-06-16 00:17:07 +02:00
|
|
|
"-c" = "$snmp_crit$"
|
|
|
|
"-w" = "$snmp_warn$"
|
2014-06-26 16:13:41 +02:00
|
|
|
"-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"
|
|
|
|
}
|
2014-04-26 13:16:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.snmp_address = "$address$"
|
|
|
|
vars.snmp_community = "public"
|
2014-06-26 16:13:41 +02:00
|
|
|
vars.snmp_invert_search = false
|
2013-07-30 20:45:09 +02:00
|
|
|
}
|
2013-09-30 13:17:07 +02:00
|
|
|
|
2014-06-16 00:17:07 +02:00
|
|
|
object CheckCommand "snmpv3" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_snmp" ]
|
2014-06-16 00:17:07 +02:00
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_apt" ]
|
2014-04-13 18:47:02 +02:00
|
|
|
}
|
2014-05-12 12:25:14 +02:00
|
|
|
|
2014-05-17 13:33:57 +02:00
|
|
|
object CheckCommand "dhcp" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_dhcp" ]
|
2014-05-17 13:33:57 +02:00
|
|
|
|
|
|
|
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-06-16 01:03:08 +02:00
|
|
|
object CheckCommand "dns" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_dns" ]
|
2014-06-16 01:03:08 +02:00
|
|
|
|
|
|
|
arguments = {
|
2014-07-11 14:38:15 +02:00
|
|
|
"-H" = "$dns_lookup$"
|
|
|
|
"-s" = "$dns_server$"
|
|
|
|
"-a" = "$dns_expected_answer$"
|
2014-06-16 01:03:08 +02:00
|
|
|
"-A" = {
|
2014-06-16 08:47:54 +02:00
|
|
|
set_if = "$dns_authoritative$"
|
2014-06-16 01:03:08 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.dns_lookup = "$host_name$"
|
|
|
|
vars.dns_expected_answer = "$address$"
|
|
|
|
}
|
|
|
|
|
2014-06-22 14:21:11 +02:00
|
|
|
object CheckCommand "dig" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_dig" ]
|
2014-06-22 14:21:11 +02:00
|
|
|
|
|
|
|
arguments = {
|
2014-07-11 14:38:15 +02:00
|
|
|
"-H" = "$dig_server$"
|
|
|
|
"-l" = "$dig_lookup$"
|
2014-06-22 14:21:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vars.dig_server = "$address$"
|
|
|
|
}
|
|
|
|
|
2014-05-12 12:25:14 +02:00
|
|
|
object CheckCommand "nscp" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_nt" ]
|
2014-05-12 12:25:14 +02:00
|
|
|
|
|
|
|
arguments = {
|
2014-05-22 14:05:56 +02:00
|
|
|
"-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
|
|
|
|
}
|
2014-05-22 14:05:56 +02:00
|
|
|
|
|
|
|
object CheckCommand "by_ssh" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_by_ssh" ]
|
2014-05-22 14:05:56 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2014-05-22 19:08:47 +02:00
|
|
|
|
2014-05-28 23:08:32 +02:00
|
|
|
object CheckCommand "ups" {
|
|
|
|
import "plugin-check-command"
|
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_ups" ]
|
2014-05-28 23:08:32 +02:00
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = "$ups_address$"
|
|
|
|
"-u" = "$ups_name$"
|
|
|
|
}
|
|
|
|
|
|
|
|
vars.ups_address = "$address$"
|
|
|
|
vars.ups_name = "ups"
|
|
|
|
}
|
|
|
|
|
2014-05-22 19:08:47 +02:00
|
|
|
object CheckCommand "nrpe" {
|
2014-05-22 21:06:19 +02:00
|
|
|
import "plugin-check-command"
|
2014-05-22 19:08:47 +02:00
|
|
|
|
2014-07-16 12:58:18 +02:00
|
|
|
command = [ PluginDir + "/check_nrpe" ]
|
2014-05-22 19:08:47 +02:00
|
|
|
|
2014-05-22 21:06:19 +02:00
|
|
|
arguments = {
|
|
|
|
"-H" = "$nrpe_address$"
|
|
|
|
"-p" = "$nrpe_port$"
|
|
|
|
"-c" = "$nrpe_command$"
|
|
|
|
"-n" = {
|
|
|
|
set_if = "$nrpe_no_ssl$"
|
2014-05-22 19:08:47 +02:00
|
|
|
description = "Do not use SSL."
|
2014-05-22 21:06:19 +02:00
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
set_if = "$nrpe_timeout_unknown$"
|
2014-05-22 19:08:47 +02:00
|
|
|
description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
|
|
|
|
}
|
2014-05-22 21:06:19 +02:00
|
|
|
"-t" = "$nrpe_timeout$"
|
|
|
|
}
|
2014-05-22 19:08:47 +02:00
|
|
|
|
2014-05-22 21:06:19 +02:00
|
|
|
vars.nrpe_address = "$address$"
|
|
|
|
vars.nrpe_no_ssl = false
|
|
|
|
vars.nrpe_timeout_unknown = false
|
2014-11-21 22:05:03 +01:00
|
|
|
|
|
|
|
timeout = 5m
|
2014-05-22 19:08:47 +02:00
|
|
|
}
|
|
|
|
|
2014-06-02 13:34:35 +02:00
|
|
|
/* Contrib plugins */
|
|
|
|
object CheckCommand "running_kernel" {
|
|
|
|
import "plugin-check-command"
|
2014-07-16 12:58:18 +02:00
|
|
|
|
2014-06-02 19:59:28 +02:00
|
|
|
command = [ "sudo", PluginDir + "/check_running_kernel" ]
|
2014-06-02 13:34:35 +02:00
|
|
|
}
|
|
|
|
|