09-18-2015 03:16 PM - edited 03-08-2019 01:51 AM
I am looking for ideas on comparing the dates the running-config was last changed, and the startup-config was last changed.
One way I know that I can do this is to just log into a switch/router via CLI, save the output, parse the dates, and compare using Python and SSH or Telnet.
Current configuration : 198613 bytes
!
! Last configuration change at 13:50:55 CDT Sat Aug 1 2015 by whoever
! NVRAM config last updated at 13:51:37 CDT Sat Aug 1 2015 by somebody
However, for a list of hundreds of switches, I don't feel it is the most efficient way, and would prefer to avoid having a script log into each switch and type show run | i !config.*
I do have RANCID set up, and may be able to grep those config files, but I wonder if anyone knows, can this be done easily with an SNMP query? If so, does anyone know the MIB to use?
Thanks in advance, I look forward to hearing back!
Solved! Go to Solution.
09-19-2015 01:56 AM
Hi Adam,
Take a look at the CISCO-CONFIG-MAN-MIB and specifically comparing the ccmHistoryRunningLastChanged and ccmHistoryRunningLastSaved objects. From the MIB:
"The value of sysUpTime when the running configuration was last saved (written).
If the value of ccmHistoryRunningLastChanged is greater than cmHistoryRunningLastSaved, the configuration has been changed but not saved."
Regards
09-19-2015 01:56 AM
Hi Adam,
Take a look at the CISCO-CONFIG-MAN-MIB and specifically comparing the ccmHistoryRunningLastChanged and ccmHistoryRunningLastSaved objects. From the MIB:
"The value of sysUpTime when the running configuration was last saved (written).
If the value of ccmHistoryRunningLastChanged is greater than cmHistoryRunningLastSaved, the configuration has been changed but not saved."
Regards
09-21-2015 06:45 AM
Thanks,
Exactly what I was looking for.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide