From 5b1f63343fd86ab65a157c964442fb7e79b53c82 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 Oct 2019 16:48:19 +0200 Subject: [PATCH] Add the two uplink switches --- .../conf.d/hosts/switches/uplink-gkc.conf | 71 ++++++++++++++++++ .../conf.d/hosts/switches/uplink-sw.conf | 72 +++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 monitoring/icinga2/conf.d/hosts/switches/uplink-gkc.conf create mode 100644 monitoring/icinga2/conf.d/hosts/switches/uplink-sw.conf diff --git a/monitoring/icinga2/conf.d/hosts/switches/uplink-gkc.conf b/monitoring/icinga2/conf.d/hosts/switches/uplink-gkc.conf new file mode 100644 index 0000000..d0829b9 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/switches/uplink-gkc.conf @@ -0,0 +1,71 @@ +object Host "uplink-gkc.openfest.org" { + import "generic-host" + + address = "uplink-gkc" + vars.groups = [ "vocsw" ] + + vars.parent = "coresw.openfest.org" + + # check_command = "xxx_health" + # vars.extra_port_check = "" + # vars.specification = "vocsw" + + # debug + vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.1" + value = "2" # UP - 1 , 2 - down + } + + # down + vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.2" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.3" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.4" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.5" + value = "2" + } + vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.6" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.7" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.8" + value = "2" + } + + # uplink - ipacct + vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.9" + value = "1" + } + + # to gkc + vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.10" + value = "1" + } + + vars.notification["slack"] = { + groups = [ "icingaadmins" ] + } + vars.snmp_uptime = "true" +} + diff --git a/monitoring/icinga2/conf.d/hosts/switches/uplink-sw.conf b/monitoring/icinga2/conf.d/hosts/switches/uplink-sw.conf new file mode 100644 index 0000000..777e231 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/switches/uplink-sw.conf @@ -0,0 +1,72 @@ +object Host "uplink-sw.openfest.org" { + import "generic-host" + + address = "uplink-sw" + vars.groups = [ "vocsw" ] + + vars.parent = "uplink-gkc.openfest.org" + + # check_command = "xxx_health" + # vars.extra_port_check = "" + # vars.specification = "vocsw" + + # debug + vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.1" + value = "2" # UP - 1 , 2 - down + } + + # down + vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.2" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.3" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.4" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.5" + value = "2" + } + vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.6" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.7" + value = "2" + } + + vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.8" + value = "2" + } + + # uplink - ipacct + vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.9" + value = "1" + } + + # to gkc + vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.10" + value = "1" + } + + vars.snmp_uptime = "true" + + vars.notification["slack"] = { + groups = [ "icingaadmins" ] + } +} +