From 91c9320e5a8f2ad31eb2561a8e880e510977a54c Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov <5081863+zeridon@users.noreply.github.com> Date: Tue, 29 Oct 2019 05:48:13 +0200 Subject: [PATCH] new services --- monitoring/icinga2/conf.d/services-new.conf | 31 +++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/monitoring/icinga2/conf.d/services-new.conf b/monitoring/icinga2/conf.d/services-new.conf index d71b6e9..84f23fc 100644 --- a/monitoring/icinga2/conf.d/services-new.conf +++ b/monitoring/icinga2/conf.d/services-new.conf @@ -1,10 +1,12 @@ apply Service "network_interfaces_traffic" { import "generic-service" check_interval = 5m - retry_interval = 5m + retry_interval = 1m + max_check_attempts = 3 check_command = "check_net_int" vars.int_warn="925" vars.int_crit="950" + enable_perfdata = true assign where host.vars.net_interfaces @@ -13,8 +15,9 @@ apply Service "network_interfaces_traffic" { apply Service "network_open_ports" { import "generic-service" + max_check_attempts = 3 check_interval = 5m - retry_interval = 5m + retry_interval = 1m check_command = "check_open_ports" vars.ports=host.vars.open_ports vars.host=host.address @@ -22,3 +25,27 @@ apply Service "network_open_ports" { vars.notif_prio = "high" } + +apply Service for (iface => config in host.vars.ifaces) { + import "generic-service" + display_name = "check_bandwidth" + + check_command = "check_bandwidth" + + vars += config + # NB: you probably want to use another condition/hostgroup + assign where "openwrt" in host.vars.groups +} + +apply Service for (iface => config in host.vars.snmp_ifaces) { + import "generic-service" + display_name = "check_operstatus" + + check_command = "check_operstatus" + + vars.host = host.address + vars += config + # NB: you probably want to use another condition/hostgroup + assign where "vocsw" in host.vars.groups + assign where "ciscosw" in host.vars.groups +}