2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2015-03-25 10:48:20 +01:00
|
|
|
|
|
|
|
object CheckCommand "disk-windows" {
|
|
|
|
command = [ PluginDir + "/check_disk.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$disk_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$disk_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
"-p" = {
|
|
|
|
value = "$disk_win_path$"
|
|
|
|
description = "Optional paths to check"
|
2015-09-16 15:14:33 +02:00
|
|
|
repeat_key = true
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
value = "$disk_win_unit$"
|
|
|
|
description = "Use this unit to display disk space"
|
|
|
|
}
|
2015-12-10 18:01:01 +01:00
|
|
|
"-x" = {
|
|
|
|
value = "$disk_win_exclude$"
|
|
|
|
description = "Exclude these drives from check"
|
|
|
|
}
|
2017-07-24 10:14:15 +02:00
|
|
|
"-U" = {
|
|
|
|
set_if = "$disk_win_show_used$"
|
|
|
|
description = "Work with used instead of free space"
|
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2018-04-25 21:26:44 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
//The default
|
2018-04-25 21:26:44 +02:00
|
|
|
vars.disk_win_unit = "mb"
|
|
|
|
vars.disk_win_warn = "20%"
|
|
|
|
vars.disk_win_crit = "10%"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
object CheckCommand "load-windows" {
|
|
|
|
command = [ PluginDir + "/check_load.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$load_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$load_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "memory-windows" {
|
|
|
|
command = [ PluginDir + "/check_memory.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$memory_win_warn$"
|
|
|
|
description = "Warning Threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$memory_win_crit$"
|
|
|
|
description = "Critical Threshold"
|
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
value = "$memory_win_unit$"
|
|
|
|
description = "Use this unit to display memory"
|
|
|
|
}
|
2018-10-01 12:02:30 +02:00
|
|
|
"-U" = {
|
|
|
|
set_if = "$memory_win_show_used$"
|
|
|
|
description = "Show used memory instead of the free memory"
|
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2018-04-25 21:26:44 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
//The default
|
2018-04-25 21:26:44 +02:00
|
|
|
vars.memory_win_unit = "mb"
|
|
|
|
vars.memory_win_warn = "10%"
|
|
|
|
vars.memory_win_crit = "5%"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "network-windows" {
|
|
|
|
command = [ PluginDir + "/check_network.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$network_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$network_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
2016-09-28 11:18:39 +02:00
|
|
|
"-n" = {
|
2016-09-28 11:26:08 +02:00
|
|
|
set_if = "$network_no_isatap$"
|
|
|
|
description = "Don't show ISATAP interfaces in output"
|
2016-09-28 11:18:39 +02:00
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2016-09-28 11:26:08 +02:00
|
|
|
vars.network_no_isatap = true
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "perfmon-windows" {
|
|
|
|
command = [ PluginDir + "/check_perfmon.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$perfmon_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$perfmon_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
"-P" = {
|
|
|
|
value = "$perfmon_win_counter$"
|
|
|
|
description = "The Performance Counter string"
|
|
|
|
required = true
|
|
|
|
}
|
|
|
|
"--performance-wait" = {
|
|
|
|
value = "$perfmon_win_wait$"
|
|
|
|
description = "Wait time between two counter collections in ms"
|
|
|
|
}
|
|
|
|
"--fmt-countertype" = {
|
|
|
|
value = "$perfmon_win_type$"
|
|
|
|
description = "Performance counter type"
|
|
|
|
}
|
2017-01-12 15:55:26 +01:00
|
|
|
"--perf-syntax" = {
|
|
|
|
value = "$perfmon_win_syntax$"
|
|
|
|
description = "Use this instead of the counter name in the perfomance data"
|
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-05-12 13:08:10 +02:00
|
|
|
vars.performance_win_wait = 1000
|
|
|
|
vars.perfmon_win_type = "double"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template CheckCommand "ping-common-windows" {
|
|
|
|
command = [ PluginDir + "/check_ping.exe" ]
|
|
|
|
|
|
|
|
arguments = {
|
|
|
|
"-H" = {
|
|
|
|
value = "$ping_win_address$"
|
|
|
|
required = true
|
|
|
|
description = "Address to ping"
|
|
|
|
}
|
|
|
|
"-w" = {
|
|
|
|
value = "$ping_win_wrta$,$ping_win_wpl$%"
|
|
|
|
description = "Warning threshold: RTA and package loss seperated by comma"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$ping_win_crta$,$ping_win_cpl$%"
|
|
|
|
description = "Warning threshold: RTA and package loss seperated by comma"
|
|
|
|
}
|
2015-07-15 16:39:33 +02:00
|
|
|
"-p" = {
|
2015-03-25 10:48:20 +01:00
|
|
|
value = "$ping_win_packets$"
|
|
|
|
description = "Number of packages to send"
|
|
|
|
}
|
|
|
|
"-t" = {
|
|
|
|
value = "$ping_win_timeout$"
|
|
|
|
description = "Timeout in ms"
|
|
|
|
}
|
|
|
|
}
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
vars.ping_win_packets = "5"
|
|
|
|
vars.ping_win_timeout = "1000"
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "ping-windows" {
|
|
|
|
import "ping-common-windows"
|
|
|
|
import "ipv4-or-ipv6"
|
|
|
|
|
|
|
|
vars.ping_win_address = "$check_address$"
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "ping4-windows" {
|
|
|
|
import "ping-common-windows"
|
|
|
|
|
|
|
|
command += [ "-4" ]
|
|
|
|
|
2015-05-13 08:09:31 +02:00
|
|
|
vars.ping_win_address = "$address$"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "ping6-windows" {
|
|
|
|
import "ping-common-windows"
|
|
|
|
|
|
|
|
command += [ "-6" ]
|
|
|
|
|
2015-05-13 08:09:31 +02:00
|
|
|
vars.ping_win_address = "$address6$"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "procs-windows" {
|
|
|
|
command = [ PluginDir + "/check_procs.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$procs_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$procs_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
value = "$procs_win_user$"
|
|
|
|
description = "Count only procs of this user"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "service-windows" {
|
|
|
|
command = [ PluginDir + "/check_service.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
set_if = "$service_win_warn$"
|
|
|
|
description = "Warn instead of critical when service is not running"
|
|
|
|
}
|
|
|
|
"-s" = {
|
|
|
|
value = "$service_win_service$"
|
|
|
|
required = true
|
|
|
|
description = "Service to check"
|
|
|
|
}
|
2019-05-17 15:09:58 +02:00
|
|
|
"--description" = {
|
2017-07-26 17:02:18 +02:00
|
|
|
set_if = "$service_win_description$"
|
|
|
|
description = "Use service description instead of name"
|
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "swap-windows" {
|
|
|
|
command = [ PluginDir + "/check_swap.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$swap_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$swap_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
value = "$swap_win_unit$"
|
|
|
|
description = "Unit to display swap in"
|
|
|
|
}
|
2018-10-06 20:26:15 +02:00
|
|
|
"-U" = {
|
|
|
|
set_if = "$swap_win_show_used$"
|
|
|
|
description = "Show used swap instead of the free swap"
|
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2018-04-25 21:26:44 +02:00
|
|
|
// Default
|
2015-03-25 10:48:20 +01:00
|
|
|
vars.swap_win_unit = "mb"
|
2018-04-25 21:26:44 +02:00
|
|
|
vars.swap_win_warn = "10%"
|
|
|
|
vars.swap_win_crit = "5%"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "update-windows" {
|
|
|
|
command = [ PluginDir + "/check_update.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
2018-07-24 22:00:47 +02:00
|
|
|
value = "$update_win_warn$"
|
|
|
|
description = "Number of updates to trigger a warning"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
"-c" = {
|
2018-07-24 22:00:47 +02:00
|
|
|
value = "$update_win_crit$"
|
|
|
|
description = "Number of updates to trigger a critical"
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
"--possible-reboot" = {
|
|
|
|
set_if = "$update_win_reboot$"
|
|
|
|
description = "Treat 'may need update' as 'definitely needs update'"
|
|
|
|
}
|
2018-07-24 22:00:47 +02:00
|
|
|
"--no-reboot-critical" = {
|
|
|
|
set_if = "$ignore_reboot$"
|
|
|
|
description = "Do not automatically return critical if an update requiring reboot is present."
|
|
|
|
}
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
2015-11-06 15:41:54 +01:00
|
|
|
|
|
|
|
timeout = 5m
|
2015-03-25 10:48:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "uptime-windows" {
|
|
|
|
command = [ PluginDir + "/check_uptime.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$uptime_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$uptime_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
"-u" = {
|
|
|
|
value = "$uptime_win_unit$"
|
|
|
|
description = "Time unit to use"
|
|
|
|
}
|
|
|
|
}
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
vars.uptime_win_unit = "s"
|
|
|
|
}
|
|
|
|
|
|
|
|
object CheckCommand "users-windows" {
|
|
|
|
command = [ PluginDir + "/check_users.exe" ]
|
2016-10-10 11:42:18 +02:00
|
|
|
|
2015-03-25 10:48:20 +01:00
|
|
|
arguments = {
|
|
|
|
"-w" = {
|
|
|
|
value = "$users_win_warn$"
|
|
|
|
description = "Warning threshold"
|
|
|
|
}
|
|
|
|
"-c" = {
|
|
|
|
value = "$users_win_crit$"
|
|
|
|
description = "Critical threshold"
|
|
|
|
}
|
|
|
|
}
|
2015-05-12 13:08:10 +02:00
|
|
|
}
|