I’ve been scouring the SDK documentation for the 4.1.x ADC code and have been unable to figure out how to determine the date time of the last configuration change. In the CLI I can run ‘show running-config’ and look at the top where it indicates when it was last updated and when it was last saved.
In the earlier 2.x AXAPI I was able to get this using a call to system.config\_status.get.
Any idea how to do this through the AXAPI in 4.1.x?
Thanks for that. From this I can get the last time the config was saved to disk, but more importantly I need to know the last time the running config was changed. I’d like to cache config and only re-read when it’s changed.
Hi Shawn, I would say to try: http://192.168.0.152/axapi/v3/running-config however it doesn’t appear to return anything for me, so another approach would be to run cli-deploy to get the running-config. The running-config has the info I think you are looking for at the top. If you wanted, you could also hash the response and then check the hash against the previous hash to see if it changed. Would this work for you?
!Current configuration: 18822 bytes
!Configuration last updated at 22:27:45 PST Tue Nov 28 2017
!Configuration last saved at 22:28:01 PST Tue Nov 28 2017
!64-bit Advanced Core OS (ACOS) version 4.1.0-P10, build 105 (Oct-30-2017,17:16)
!
vrrp-a common
device-id 2
set-id 5
enable
!
...
That’s what I’d feared. That’s a decent work-around though. I can limit the output by passing something along the lines of “show running-config | include !Configuration last updated”.