nanog mailing list archives

Re: Quick Script to check the uptime of ASR920's


From: Laurent Dumont <laurentfdumont () gmail com>
Date: Fri, 25 Jan 2019 20:06:41 -0500

It's worth mentioning that's it's not limited to just the cosmetic issue of
interface counters/snmp counters.

- I've had multiple instances of 920 interfaces getting stuck in their
previous operational state. Unplugging-replugging/shut/no-shut doesn't
change anything.
- The 920 fails to process traffic towards very specific IPs. That one is a
pain to debug. You can reach the IP directly from the device but flows
through the device are just dropped (also saw the same behavior on 903 with
RSP3)
- ARP under a BDI show up and are re-learned after a clear but traffic
towards those IP do not work through or sourced from the 920.
- One 920 started to show the above described symptoms, was rebooted and
failed to back up. ISIS went up, cannot ping any of the P2P.

That said, uptime should definitely be monitored through your central
NMS-flavor system. ;)

On Fri, Jan 25, 2019 at 7:45 PM Erik Sundberg <ESundberg () nitelusa com>
wrote:

It was a script I created in regards to this thread below... Interface
counters and some other things stop working after a Cisco ASR920 is up 889
days.... Fun Fun

https://puck.nether.net/pipermail/cisco-nsp/2019-January/106558.html


-----Original Message-----
From: Mel Beckman <mel () beckman org>
Sent: Friday, January 25, 2019 6:39 PM
To: Erik Sundberg <ESundberg () nitelusa com>
Cc: nanog () nanog org
Subject: Re: Quick Script to check the uptime of ASR920's

Erik,

That’s a nice little script. Thanks!

So you want a warning if a router hasn’t been rebooted in a long time?
Just out of curiosity, why? I’m kind of glad that my routers don’t reboot,
pretty much ever. Usually I want to know if the uptime suddenly became less
than the most recent uptime, indicting a possibly unplanned reboot.

 -mel

On Jan 25, 2019, at 4:29 PM, Erik Sundberg <ESundberg () nitelusa com>
wrote:

All,

I just created a quick script to check the uptime of a ASR920 via SNMP
if you have a fairly long list of devices. It's a simple bash script
and snmpwalk version 2c. Figured I would share it with you. Happy
Friday

Grab the code from GitHub:
https://github.com/esundberg/CiscoRouterUptime
It's a quick and dirty script and my first repo on github. Let me know
if there any issues with it.


Output Format in CSV
DeviceName, IP, Uptime in Days, OK/Warning

I set my warning to 800 Days, you can change this in the code


ASR920list.txt
-------------
ASR920-1.SEA1, 192.168.28.1, SuperSecretSNMPKey ASR920-2.SEA1,
192.168.28.2, SuperSecretSNMPKey ~~~~snip you get the idea~~~~


Output

[user@Linux]$ ./CiscoRouterUptime.sh ASR920list.txt ASR920-1.SEA1,
192.168.28.1, 827, WARNING ASR920-2.SEA1, 192.168.28.2, 827, WARNING
ASR920-2.ATL1, 192.168.23.2, 828, WARNING ASR920-1.ATL1, 192.168.23.1,
813, WARNING ASR920-1.CHI1, 192.168.21.3, 828, WARNING ASR920-1.NYC1,
192.168.25.1, 787, OK ASR920-2.CHI1, 192.168.21.4, 720, OK
ASR920-3.CHI1, 192.168.21.5, 720, OK ASR920-1.DAL1, 192.168.26.3, 488,
OK ASR920-4.CHI1, 192.168.21.6, 142, OK



________________________________

CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents,
files or previous e-mail messages attached to it may contain confidential
information that is legally privileged. If you are not the intended
recipient, or a person responsible for delivering it to the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or use of any of the information contained in or attached to
this transmission is STRICTLY PROHIBITED. If you have received this
transmission in error please notify the sender immediately by replying to
this e-mail. You must destroy the original transmission and its attachments
without reading or saving in any manner. Thank you.


________________________________

CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files
or previous e-mail messages attached to it may contain confidential
information that is legally privileged. If you are not the intended
recipient, or a person responsible for delivering it to the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or use of any of the information contained in or attached to
this transmission is STRICTLY PROHIBITED. If you have received this
transmission in error please notify the sender immediately by replying to
this e-mail. You must destroy the original transmission and its attachments
without reading or saving in any manner. Thank you.


Current thread: