08-30-2023 07:40 AM
Hello Everyone,
We are looking into creating an automated report with all the ports that show status down on a Cisco switch and the time stamp when was the port last active.
We were thinking to use Ansible to extract the output from the "show interface" : Last input, output and write it into an Excel spreadsheet.
GigabitEthernet1/0/33 is down, line protocol is down
Last input 00:51:46, output 00:50:43, output hang never
We were wondering if anybody knows any other command that would show us the time stamp other than the logs. We also have the switches in Cisco Prime and DNA, but we couldn't find any report that would give us the wanted result.
If anybody has tried this before, let us know, we are looking forward to seeing other options as well. Thank you!
Solved! Go to Solution.
08-30-2023 07:47 AM
You can use Python to get details of interface status (compare with switch uptime and generate report)
i generally run below command :
show int | i proto.*notconnect|proto.*administratively down|Last in.* [6-9]w|Last in.*[0-9][0-9]w|[0-9]y|disabled|Last input never, output never, output hang never
output show example :
GigabitEthernet4/0/43 is down, line protocol is down (notconnect)
Last input 14w2d, output 14w2d, output hang never
DNAC you can generate report : (Run a Network Devices Report)
08-30-2023 07:47 AM
You can use Python to get details of interface status (compare with switch uptime and generate report)
i generally run below command :
show int | i proto.*notconnect|proto.*administratively down|Last in.* [6-9]w|Last in.*[0-9][0-9]w|[0-9]y|disabled|Last input never, output never, output hang never
output show example :
GigabitEthernet4/0/43 is down, line protocol is down (notconnect)
Last input 14w2d, output 14w2d, output hang never
DNAC you can generate report : (Run a Network Devices Report)
09-01-2023 04:11 AM
Thanks BB! We are going to try that.
08-30-2023 05:48 PM
@DLSDOLTOperations wrote:
GigabitEthernet1/0/33 is down, line protocol is down
Last input 00:51:46, output 00:50:43, output hang never
There are some IOS/IOS-XE versions which will render this output useless because of bugs.
We use AKiPS daily to map out unused ports. It is reliable and takes less than five seconds to map out a full stack of switch.
09-01-2023 04:25 AM
Thank you Leo! We are looking into methods that are independent of any other external tool, we are already monitoring the switches in DNAC and Prime but the reports found there weren't necessarily what we needed.
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