Check-mk routing plugin

This commit is contained in:
Sebastian Lohff 2018-01-19 13:19:34 +01:00
parent ab5b37a335
commit 63b2a35010
1 changed files with 35 additions and 0 deletions

35
bin/checkmk-routing.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
# get state from routing information, targeted are routing protocols
# currently supporting quagga and bird
if which birdc >/dev/null; then
term=$TERM
export TERM=
echo "<<<bird>>>"
{
echo show status
echo show memory
echo show protocols all
echo show ospf
echo show ospf neighbors
echo show ospf interface
echo show route all
}|birdc -v
export TERM=$term
fi
if which vtysh >/dev/null; then
echo "<<<quagga>>>"
{
echo show ip bgp sum # summary of all neighbors
echo show ip bgp neighbors # very detailed neighbor information
echo show ip bgp rsclient summary
echo show ip bgp
echo show ip ospf
echo show ip ospf neighbor
echo show ip ospf interface
echo show ip ospf border-routers
}|vtysh
fi