cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
256
Views
1
Helpful
1
Replies

Retrieving Log Files from CSR1000v IOS-XE Device using APIs

Tim fly
Level 1
Level 1

As someone who is still in the early stages of learning about APIs, I've been working with a CSR1000v IOS-XE Device and faced difficulties using restconf/netconf-yang to retrieve log files. Recognizing my limited experience, could you share general insights and alternative approaches for obtaining log files from network devices using APIs? I'm currently using: Cisco IOS XE Software, Version 17.03.04a in a testing enviroment.

Thank you very much in advance for any kind of help provided

1 Reply 1

Hey @Tim fly  2 cent here -  Whilst restconf/network are two really powerful protocols are IMO better for configuration management, i have found they are not be the most intuitive way for retrieving logs. (especially for beginners) as their focus is on data modeling and manipulation, which can be complex for log retrieval.

IMO i would look at pyats for this, while not technically an API approach, you can use Python libraries https://pubhub.devnetcloud.com/media/pyats/docs/cli/pyats_logs.html and https://learningnetwork.cisco.com/s/blogs/a0D6e00000sR7Q6EAK/testdriven-automation-with-pyats and https://devnetdan.com/2021/07/12/pyats-and-genie-part-3/

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io