Add BGP sessions check

This commit is contained in:
root 2019-11-01 16:29:48 +02:00
parent 2cca0f90da
commit 170e6f36b2
3 changed files with 26 additions and 0 deletions

View File

@ -83,3 +83,13 @@ object CheckCommand "rtmp-check" {
vars.monitoreduri = "" vars.monitoreduri = ""
vars.timeout = 10 vars.timeout = 10
} }
########################################################################################
# Router services
########################################################################################
object CheckCommand "bgp_sessions_check" {
import "plugin-check-command"
command = PluginDir + "/check_bird_bgp --asn $ASN$ --ebgp --sessions_down_ok $sessions_down$"
vars.ASN = ""
vars.sessions_down = ""
}

View File

@ -13,6 +13,9 @@ object Host "vin-external.openfest.org" {
vars.open_ports = "80 179 2004 53 22 7002 8443 443" vars.open_ports = "80 179 2004 53 22 7002 8443 443"
vars.ASN = "65500"
vars.sessions_down = ""
vars.notification["slack"] = { vars.notification["slack"] = {
groups = [ "icingaadmins" ] groups = [ "icingaadmins" ]
} }

View File

@ -86,3 +86,16 @@ apply Service for (stream => config in host.vars.rtmp_check) {
### assign where host.name == "vin-external.openfest.org" ### assign where host.name == "vin-external.openfest.org"
assign where host.vars.rtmp_check assign where host.vars.rtmp_check
} }
apply Service "bird_bgp_sessions" {
import "generic-service"
max_check_attempts = 3
check_interval = 5m
retry_interval = 1m
check_command = "bgp_sessions_check"
vars.ASN = host.vars.ASN
vars.sessions_down = host.vars.sessions_down
assign where host.vars.ASN
vars.notif_prio = "high"
}