Monitoring ZebOS changes on F5 with RANCID

Checking of which routing daemons are enabled in ZebOS, ie.
**[root@bigip:Active] ~ # zebos**
**usage: zebos (enable|disable) bgp|isis|ospf|ospf6|rip|ripng**
**       zebos check**
**       zebos (cmd command1)[,command2]**
**[root@bigip:Active] ~ # zebos check**
**nsm     is running [5512]**
**imi     is running [5511]**
**bgpd    is running [5513]**
**[root@bigip:Active] ~ #**
And also we want to look at the content of /config/ZebOS.conf
So to patch in,
**— f5rancid.orig       2010-12-24 14:27:41.000000000 +1000**
**+++ f5rancid    2010-12-24 14:38:44.000000000 +1000**
**@@ -280,6 +280,40 @@**
**     return(0);**
** }**
**+# This routine parses “zebos check”**
**+sub ShowZebOSCheck {**
**+    print STDERR ”    In ShowZebOSCheck: $_” if ($debug);**
**+**
**+    while () {**
**+        tr/15//d;**
**+        last if (/^$prompt/);**
**+        next if (/^(s*|s*$cmds*)$/);**
**+        return(1) if /^s*^s*$/;**
**+        return(1) if /(Invalid input detected|Type help or )/;**
**+        return(-1) if (/command authorization failed/i);**
**+**
**+        ProcessHistory(“ZEBOSCHECK”,””,””,”# $_”) && next;**
**+    }**
**+    return(0);**
**+}**
**+**
**+# This routine parses “cat /config/ZebOS.conf”**
**+sub ShowZebOSconf {**
**+    print STDERR ”    In ShowZebOSconf: $_” if ($debug);**
**+**
**+    while () {**
**+        tr/15//d;**
**+        last if (/^$prompt/);**
**+        next if (/^(s*|s*$cmds*)$/);**
**+        return(1) if /^s*^s*$/;**
**+        return(1) if /(Invalid input detected|Type help or )/;**
**+        return(-1) if (/command authorization failed/i);**
**+**
**+        ProcessHistory(“ZEBOSCONFIG”,””,””,”# $_”) && next;**
**+    }**
**+    return(0);**
**+}**
**+**
** # This routine parses “bigpipe platform”**
** sub ShowPlatform {**
**     print STDERR ”    In ShowPlatform: $_” if ($debug);**
**@@ -519,6 +553,8 @@**
**        {‘bigpipe version’              => ‘ShowVersion’},**
**        {‘bigpipe platform’             => ‘ShowPlatform’},**
**        {‘cat /config/bigip.license’    => ‘ShowLicense’},**
**+       {‘zebos check’                  => ‘ShowZebOSCheck’},**
**+       {‘cat /config/ZebOS.conf’       => ‘ShowZebOSconf’},**
**        {‘bigpipe monitor list all’     => ‘ShowMonitor’},**
**        {‘bigpipe profile list’         => ‘ShowProfile’},**
**        {‘bigpipe base list’            => ‘ShowBaseRun’},**
Adds something like this to the resulting rancid file,
**[rancid@rancid ~]$ grep -A 26 nsm f5bigip.new**
**# nsm   is running [5512]**
**# imi   is running [5511]**
**# bgpd  is running [5513]**
**# !**
**# service password-encryption**
**# !**
**# no banner motd**
**# !**
**# !**
**# router bgp 65534**
**#  no bgp fast-external-failover**
**#  bgp always-compare-med**
**#  bgp log-neighbor-changes**
**#  bgp graceful-restart**
**#  redistribute kernel**
**#  neighbor PE_PEERS peer-group**
**#  neighbor PE_PEERS remote-as 65535**
**#  neighbor PE_PEERS description EBGP Sessions to PE Routers**
**#  neighbor PE_PEERS ebgp-multihop 2**
**# !**
**# line con 0**
**#  login**
**# line vty 0 4**
**#  login**
**# !**
**# end**
**#**
I’ve sent this in as a suggestion so hopefully it may be added at some point to the official RANCID release.
Author image
About colin-stubbs