05-03-2024 02:01 AM - edited 05-03-2024 02:02 AM
Using Cisco Defence Orchestrator, Is there a way to export all ACLs from all network policies to CSV in one go?
I know you can do it on a per policy (as per article below) basis but need everything in one excel with the associated hitcounts.
https://docs.defenseorchestrator.com/t-export-network-policy-rules.html
05-03-2024 03:02 AM
Exporting all ACLs from all network policies to a CSV file in one go directly from Cisco Defence Orchestrator (CDO) might not be directly supported as of my last update. However, you can achieve this by using the CDO API in combination with scripting or programming.
Here's a general outline of the steps you can take:
By following this approach, you can automate the process of exporting ACLs from all network policies to a CSV file, including associated hit counts.
Keep in mind that implementing this solution may require some programming or scripting knowledge, as well as an understanding of the CDO API. You may also need appropriate permissions to access and retrieve data from CDO programmatically.
If you're not comfortable with programming or scripting, you could consider reaching out to Cisco support or consulting with a developer who has experience with Cisco APIs to assist you with this task.
05-03-2024 11:43 AM - edited 05-03-2024 11:44 AM
Thanks for the advice. I ended up downloading each policy to CSV into a single folder and then running this command in terminal to join them into a single CSV with the filename in column A.
for file in *.csv; do awk -v filename="$file" 'BEGIN{FS=OFS=","} {print filename, $0}' "$file" >> merged.csv; done
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