Sitemap
Booking.com Infrastructure

Core Infrastructure in Booking.com

F5 BIG-IP Custom MIB

4 min readMar 11, 2013

--

Photo by arvin febry on Unsplash
register_mib ".<oid>" <tcl_function> <type>
proc time {}
{
set status [catch {exec date +%s} now]
if {$status != 0} {
return -1
} else { return $now }
}
snmpwalk -Os -c public -v 2c localhost 
.1.3.6.1.4.1.3375.2.100.1
tmsh -c "list sys db configsync.localconfigtime one-line" | cut -d\" -f2 > /tmp/lastupdate
register_mib ".1" config_age int

proc config_age {}
{
set now_status [catch {exec date +%s} now]
set config_status [catch {exec /bin/cat /tmp/lastupdate} config]
if {$now_status == 0 and $config_status == 0} {
set result [expr $now - $config]
} else {
set result -1
}
return $result
}

--

--

No responses yet