I had some time today and added a routine into my rancid config to gather my Cisco GSS's running config and gslb config. Here is how you add it:<div><br></div><div>Edit file: rancid-fe</div><div><br></div><div>In the %vendortable section near the top of the file add the following:</div>
<div><br></div><div> 'gss' => 'gssrancid',</div><div><br></div><div>Here is some context to help you:</div><div><br></div><div><div> 'foundry' => 'francid',</div>
<div> 'gss' => 'gssrancid',</div><div> 'hitachi' => 'htrancid',</div></div><div><br></div><div>In the same directory as your rancid-fe file, you have a file called "rancid". Copy this file to a new file named gssrancid.</div>
<div><br></div><div>Edit file: gssrancid</div><div><br></div><div>Add the follwing code:</div><div><br></div><div><div># This routine parses "show gslb-config"</div><div>sub ShowGslbConfig {</div><div> print STDERR " In ShowGslbConfig: $_" if ($debug);</div>
<div> ProcessHistory("","","","!Begin GSLB Config\n!\n");</div><div> while (<INPUT>) {</div><div> tr/\015//d;</div><div> last if (/^$prompt/);</div><div> next if (/^(\s*|\s*$cmd\s*)$/);</div>
<div> return(1) if /^\s*\^\s*$/;</div><div> return(1) if /Line has invalid autocommand /;</div><div> return(1) if /(Invalid input detected|Type help or )/;</div><div> return(-1) if (/command authorization failed/i);</div>
<div> # the pager can not be disabled per-session on the PIX</div><div> if (/^(<-+ More -+>)/) {</div><div> my($len) = length($1);</div><div> s/^$1\s{$len}//;</div><div> }</div>
<div><br></div><div> ProcessHistory("","","","$_");</div><div> }</div><div> ProcessHistory("","","","\n!\n!End GSLB Config\n!\n");</div>
<div> return(0);</div><div>}</div></div><div><br></div><div>I added the above section right above this line:</div><div><br></div><div><div># This routine processes a "write term"</div><div>sub WriteTerm {</div>
</div><div><br></div><div><br></div><div>Lastly, in the commandtable section add the following line:</div><div><br></div><div> {'show gslb-config' => 'ShowGslbConfig'},</div><div><br>
</div><div>Again here is some context to guide you:</div><div><br></div><div><div># {'show debug' => 'ShowDebug'},</div><div> {'show gslb-config' => 'ShowGslbConfig'},</div>
<div> {'show running-config' => 'WriteTerm'},</div></div><div><br></div><div>Optionally, you can rem out the `show debug` as it does not work at all on the GSS and it makes your rancid config look ugly.</div>
<div><br></div><div>Here is a diff of my gssrancid vs rancid:</div><div><br></div><div>~/bin$ diff gssrancid rancid</div><div><div>1525,1548d1524</div><div>< # This routine parses "show gslb-config"</div><div>
< sub ShowGslbConfig {</div><div>< print STDERR " In ShowGslbConfig: $_" if ($debug);</div><div>< ProcessHistory("","","","!Begin GSLB Config\n!\n");</div>
<div>< while (<INPUT>) {</div><div>< tr/\015//d;</div><div>< last if (/^$prompt/);</div><div>< next if (/^(\s*|\s*$cmd\s*)$/);</div><div>< return(1) if /^\s*\^\s*$/;</div>
<div>< return(1) if /Line has invalid autocommand /;</div><div>< return(1) if /(Invalid input detected|Type help or )/;</div><div>< return(-1) if (/command authorization failed/i);</div><div>
< # the pager can not be disabled per-session on the PIX</div><div>< if (/^(<-+ More -+>)/) {</div><div>< my($len) = length($1);</div><div>< s/^$1\s{$len}//;</div>
<div>< }</div><div>< </div><div>< ProcessHistory("","","","$_");</div><div>< }</div><div>< ProcessHistory("","","","\n!\n!End GSLB Config\n!\n");</div>
<div>< return(0);</div><div>< }</div><div>< </div><div>1946,1947c1922,1923</div><div>< # {'show debug' => 'ShowDebug'},</div><div>< {'show gslb-config' => 'ShowGslbConfig'},</div>
<div>---</div><div>> {'show debug' => 'ShowDebug'},</div><div>> {'more system:running-config' => 'WriteTerm'}, # ASA/PIX</div></div><div><br>
</div><div><br></div><div>Enjoy,</div><div>Chris</div>