Could DevOps and network automation help here?
In order to test this out, I’ve built a test bed using a Cisco Nexus 9000 switch using its NX-API and the Ansible automation framework.
While the remainder of this post walks through how this is accomplished, the main takeaway should be, there may be more opportunities for automation than we think. Keep your eyes open!
Here is a screen shot of the Ansible playbook that I’ll be testing.
Note: interface supports two options: all or a specific interface, e.g. Ethernet1/1. Sample outputs for each will be shown below.
The second task uses the data returned and formats it using a pre-built template called interface_stats.j2 so that the admin can easily interpret the data.
Now that we’ve taken a quick look at the playbook, let’s run it!
This particular report showed the data for all interfaces although you can only see 3 interfaces in the above screen shot. The next two screen shots show the playbook and report when just one interface is specified.
Jinja2 Template
I’m sure some of you will want to see this – the screen shot below shows the j2 template that I used to create the report.
Let me know if you have any questions or any other thoughts on topics like this!
Thanks,
Jason
Twitter: @jedelman8