diff --git a/monitoring/icinga2/conf.d/commands-new.conf b/monitoring/icinga2/conf.d/commands-new.conf index ceef132..89ef50d 100644 --- a/monitoring/icinga2/conf.d/commands-new.conf +++ b/monitoring/icinga2/conf.d/commands-new.conf @@ -28,12 +28,21 @@ object CheckCommand "check_open_ports" { vars.host="" } +object CheckCommand "check_sensors" { + import "plugin-check-command" + command = PluginDir + "/check_sensors_vin" +} + +object CheckCommand "check_unbound" { + import "plugin-check-command" + command = PluginDir + "/check_unbound-ng.sh" +} ######################################################################################## # OpenWRT APs ######################################################################################## object CheckCommand "check_bandwidth" { import "by_ssh" - vars.by_ssh_command = PluginDir + "/check_bandwidth.sh -i $interface$" + vars.by_ssh_command = PluginDir + "/check_bandwidth.sh -i $interface$ -w $int_warn$ -c $int_crit$" vars.by_ssh_timeout = "420" timeout = "420" vars.by_ssh_options = [ @@ -42,6 +51,8 @@ object CheckCommand "check_bandwidth" { "ControlPath=/var/run/icinga2/$host.name$", "ControlPersist=20m" ] + vars.int_warn="50000" + vars.int_crit="100000" } ####################################################################################### @@ -84,6 +95,12 @@ object CheckCommand "rtmp-check" { vars.timeout = 10 } +object CheckCommand "check-audio-stream" { + import "plugin-check-command" + command = PluginDir + "/check_http -N -H openfest.org -p 8000 -E -u $monitoredpath$" + vars.monitoredpath = "" +} + ######################################################################################## # Router services ######################################################################################## diff --git a/monitoring/icinga2/conf.d/hosts/equipment/halla.mp3 b/monitoring/icinga2/conf.d/hosts/equipment/halla.mp3 new file mode 100644 index 0000000..b954f4a Binary files /dev/null and b/monitoring/icinga2/conf.d/hosts/equipment/halla.mp3 differ diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-1.conf.disabled b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-1.conf.disabled new file mode 100644 index 0000000..cbc16ba --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-1.conf.disabled @@ -0,0 +1,9 @@ +object Host "voc-icom-A-1" { + import "generic-host" + + # RPI intercom receiver 1 - main room [1/3] + address = "icom-A-1" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-A.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-2.conf.disabled b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-2.conf.disabled new file mode 100644 index 0000000..cada79e --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-2.conf.disabled @@ -0,0 +1,9 @@ +object Host "voc-icom-A-2" { + import "generic-host" + + # RPI intercom receiver 2 - main room [2/3] + address = "icom-A-2" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-A.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-3.conf.disabled b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-3.conf.disabled new file mode 100644 index 0000000..5c7fa98 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-A-3.conf.disabled @@ -0,0 +1,9 @@ +object Host "voc-icom-A-3" { + import "generic-host" + + # RPI intercom receiver 3 - main room [3/3] + address = "icom-A-3" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-A.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-1.conf.disabled b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-1.conf.disabled new file mode 100644 index 0000000..e090037 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-1.conf.disabled @@ -0,0 +1,9 @@ +object Host "voc-icom-B-1" { + import "generic-host" + + # RPI intercom receiver 1 - second room [1/3] + address = "icom-B-1" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-B.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-2.conf.disabled b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-2.conf.disabled new file mode 100644 index 0000000..00f2978 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-2.conf.disabled @@ -0,0 +1,9 @@ +object Host "voc-icom-B-2" { + import "generic-host" + + # RPI intercom receiver 2 - second room [2/3] + address = "icom-B-2" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-B.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-3.conf.disabled b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-3.conf.disabled new file mode 100644 index 0000000..e77b9e8 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-icom-B-3.conf.disabled @@ -0,0 +1,9 @@ +object Host "voc-icom-B-3" { + import "generic-host" + + # RPI intercom receiver 3 - second room [3/3] + address = "icom-B-3" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-B.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/equipment/voc-videoswitcher-A.conf b/monitoring/icinga2/conf.d/hosts/equipment/voc-videoswitcher-A.conf new file mode 100644 index 0000000..1f57cbb --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/equipment/voc-videoswitcher-A.conf @@ -0,0 +1,9 @@ +object Host "voc-videoswitcher-A" { + import "generic-host" + + # Atlona scaler in room A + address = "videoswitcher-A" + vars.groups = [ "equipment" ] + + vars.parent = "vocsw-A.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/misc/printer.conf-disabled b/monitoring/icinga2/conf.d/hosts/misc/printer.conf-disabled new file mode 100644 index 0000000..c59c1c4 --- /dev/null +++ b/monitoring/icinga2/conf.d/hosts/misc/printer.conf-disabled @@ -0,0 +1,9 @@ +object Host "printer-1" { + import "generic-host" + + # reception printer + address = "printer-1" + vars.groups = [ "misc" ] + + vars.parent = "receptionsw.openfest.org" +} diff --git a/monitoring/icinga2/conf.d/hosts/router-vin.conf b/monitoring/icinga2/conf.d/hosts/router-vin.conf index cd04081..2c23979 100644 --- a/monitoring/icinga2/conf.d/hosts/router-vin.conf +++ b/monitoring/icinga2/conf.d/hosts/router-vin.conf @@ -14,7 +14,7 @@ object Host "vin-external.openfest.org" { vars.open_ports = "80 179 2004 53 22 7002 8443 443" vars.ASN = "65500" - vars.sessions_down = "" + vars.sessions_down = "hawk_pri marla_pri marla_tp_v spitfire_pri" vars.notification["slack"] = { groups = [ "icingaadmins" ] @@ -22,12 +22,24 @@ object Host "vin-external.openfest.org" { vars.rtmp_check[ "hall-a" ] = { monitoreduri = "rtmp://127.0.0.1/st/hall-a" + timeout =15 } vars.rtmp_check[ "hall-b" ] = { monitoreduri = "rtmp://127.0.0.1/st/hall-b" + timeout =15 } vars.rtmp_check[ "hall-c" ] = { monitoreduri = "rtmp://127.0.0.1/st/hall-c" + timeout =15 + } + vars.audiostream_check[ "hall-a-sound" ] = { + monitoredpath = "/halla.mp3" + } + vars.audiostream_check[ "hall-b-sound" ] = { + monitoredpath = "/hallb.mp3" + } + vars.audiostream_check[ "hall-c-sound" ] = { + monitoredpath = "/hallc.mp3" } } diff --git a/monitoring/icinga2/conf.d/hosts/switches/coresw.conf b/monitoring/icinga2/conf.d/hosts/switches/coresw.conf index 2cb448b..08b3105 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/coresw.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/coresw.conf @@ -200,7 +200,7 @@ object Host "coresw.openfest.org" { } vars.snmp_ifaces [ "GigabitEthernet1/0/35" ] = { OID = "1.3.6.1.2.1.2.2.1.8.10135" - value = "2" + value = "1|2" } vars.snmp_ifaces [ "GigabitEthernet1/0/36" ] = { OID = "1.3.6.1.2.1.2.2.1.8.10136" diff --git a/monitoring/icinga2/conf.d/hosts/switches/f0sw.conf b/monitoring/icinga2/conf.d/hosts/switches/f0sw.conf index 22f756d..c3ba527 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/f0sw.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/f0sw.conf @@ -52,6 +52,11 @@ object Host "f0sw.openfest.org" { value = "2" } + # Overflow raspberry + vars.snmp_ifaces [ "GigabitEthernet0/20" ] = { + OID = "1.3.6.1.2.1.2.2.1.8.10120" + value = "1" + } # uplink vars.snmp_ifaces [ "GigabitEthernet0/49" ] = { OID = "1.3.6.1.2.1.2.2.1.8.10149" @@ -99,10 +104,7 @@ vars.snmp_ifaces [ "GigabitEthernet0/19" ] = { OID = "1.3.6.1.2.1.2.2.1.8.10119" value = "2" } -vars.snmp_ifaces [ "GigabitEthernet0/20" ] = { - OID = "1.3.6.1.2.1.2.2.1.8.10120" - value = "2" -} + vars.snmp_ifaces [ "GigabitEthernet0/21" ] = { OID = "1.3.6.1.2.1.2.2.1.8.10121" value = "2" diff --git a/monitoring/icinga2/conf.d/hosts/switches/receptionsw.conf b/monitoring/icinga2/conf.d/hosts/switches/receptionsw.conf index 6fae843..459c3e5 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/receptionsw.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/receptionsw.conf @@ -16,14 +16,16 @@ object Host "receptionsw.openfest.org" { value = "1" # UP - 1 , 2 - down } + # printer - on usb vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = { OID = "1.3.6.1.2.1.2.2.1.8.2" - value = "1" + value = "2" } + # pc ? vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = { OID = "1.3.6.1.2.1.2.2.1.8.3" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { @@ -40,9 +42,10 @@ object Host "receptionsw.openfest.org" { value = "2" } + # ip camera in reception vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { OID = "1.3.6.1.2.1.2.2.1.8.7" - value = "2" + value = "1" } vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { diff --git a/monitoring/icinga2/conf.d/hosts/switches/teamsw.conf b/monitoring/icinga2/conf.d/hosts/switches/teamsw.conf index 657a974..150a088 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/teamsw.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/teamsw.conf @@ -23,7 +23,7 @@ object Host "teamsw.openfest.org" { vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = { OID = "1.3.6.1.2.1.2.2.1.8.3" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { diff --git a/monitoring/icinga2/conf.d/hosts/switches/vocsw-A.conf b/monitoring/icinga2/conf.d/hosts/switches/vocsw-A.conf index ab1f4ba..d0991b1 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/vocsw-A.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/vocsw-A.conf @@ -32,16 +32,16 @@ object Host "vocsw-A.openfest.org" { vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = { OID = "1.3.6.1.2.1.2.2.1.8.5" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = { OID = "1.3.6.1.2.1.2.2.1.8.6" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { OID = "1.3.6.1.2.1.2.2.1.8.7" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { diff --git a/monitoring/icinga2/conf.d/hosts/switches/vocsw-B.conf b/monitoring/icinga2/conf.d/hosts/switches/vocsw-B.conf index 026f359..4d87380 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/vocsw-B.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/vocsw-B.conf @@ -17,12 +17,12 @@ object Host "vocsw-B.openfest.org" { vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = { OID = "1.3.6.1.2.1.2.2.1.8.2" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = { OID = "1.3.6.1.2.1.2.2.1.8.3" - value = "1" + value = "2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { @@ -32,16 +32,16 @@ object Host "vocsw-B.openfest.org" { vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = { OID = "1.3.6.1.2.1.2.2.1.8.5" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = { OID = "1.3.6.1.2.1.2.2.1.8.6" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { OID = "1.3.6.1.2.1.2.2.1.8.7" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { diff --git a/monitoring/icinga2/conf.d/hosts/switches/vocsw-C.conf b/monitoring/icinga2/conf.d/hosts/switches/vocsw-C.conf index 83ab4e9..01b592f 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/vocsw-C.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/vocsw-C.conf @@ -21,9 +21,10 @@ object Host "vocsw-C.openfest.org" { value = "1" } + # cambox - moved to core vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = { OID = "1.3.6.1.2.1.2.2.1.8.3" - value = "1" + value = "2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { @@ -33,16 +34,16 @@ object Host "vocsw-C.openfest.org" { vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = { OID = "1.3.6.1.2.1.2.2.1.8.5" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = { OID = "1.3.6.1.2.1.2.2.1.8.6" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { OID = "1.3.6.1.2.1.2.2.1.8.7" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { diff --git a/monitoring/icinga2/conf.d/hosts/switches/vocsw-D.conf b/monitoring/icinga2/conf.d/hosts/switches/vocsw-D.conf index 17f010f..eb38deb 100644 --- a/monitoring/icinga2/conf.d/hosts/switches/vocsw-D.conf +++ b/monitoring/icinga2/conf.d/hosts/switches/vocsw-D.conf @@ -28,21 +28,21 @@ object Host "vocsw-D.openfest.org" { vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = { OID = "1.3.6.1.2.1.2.2.1.8.4" - value = "1" + value = "2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = { OID = "1.3.6.1.2.1.2.2.1.8.5" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = { OID = "1.3.6.1.2.1.2.2.1.8.6" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = { OID = "1.3.6.1.2.1.2.2.1.8.7" - value = "1" + value = "1|2" } vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = { diff --git a/monitoring/icinga2/conf.d/services-new.conf b/monitoring/icinga2/conf.d/services-new.conf index cc88317..7c295c9 100644 --- a/monitoring/icinga2/conf.d/services-new.conf +++ b/monitoring/icinga2/conf.d/services-new.conf @@ -100,6 +100,22 @@ apply Service "bird_bgp_sessions" { vars.notif_prio = "high" } +apply Service "check_sensors" { + import "generic-service" + display_name = "Check LM Sensors " + check_command = "check_sensors" +### vars += config + + assign where host.name == "vin-external.openfest.org" +} + +apply Service "check_unbound" { + import "generic-service" + display_name = "Check Unbound Status" + check_command = "check_unbound" + assign where host.name == "vin-external.openfest.org" +} + apply Service for (ups_check => config in host.vars.ups) { import "generic-service" display_name = "UPS " + ups_check @@ -110,3 +126,12 @@ apply Service for (ups_check => config in host.vars.ups) { assign where host.vars.ups } + +apply Service for (stream => config in host.vars.audiostream_check) { + import "generic-service" + display_name = "Stream check " + stream + check_command = "check-audio-stream" + vars += config + + assign where host.vars.audiostream_check +} diff --git a/monitoring/icinga2/scripts/check_rtmp.sh b/monitoring/icinga2/scripts/check_rtmp.sh index ef579cd..9fb5de5 100755 --- a/monitoring/icinga2/scripts/check_rtmp.sh +++ b/monitoring/icinga2/scripts/check_rtmp.sh @@ -69,7 +69,7 @@ NAME=`echo $URL | sed -e s/[^A-Za-z0-9.]/_/g` ERR=/tmp/check_rtmp_err_$NAME.tmp # Testejant -timeout 7 --preserve-status $RTMPDUMP --live -r $URL --stop $TIMEOUT > /dev/null 2> $ERR +timeout --preserve-status 7 $RTMPDUMP --live -r $URL --stop $TIMEOUT > /dev/null 2> $ERR status=$?