[#179] Catch failure to get uptime from device
This commit is contained in:
		| @@ -4,6 +4,10 @@ | ||||
|  | ||||
|   * [#171] Log files now rotate at 10MB up to seven times | ||||
|  | ||||
|   [ENHANCEMENTS] | ||||
|  | ||||
|   * [#179] Catch failure to get uptime from device | ||||
|  | ||||
|   [BUG FIXES] | ||||
|  | ||||
|   * Another fix for NetAddr::MAC tripping up on v6 addresses | ||||
|   | ||||
| @@ -220,6 +220,11 @@ sub store_interfaces { | ||||
|  | ||||
|   # clear the cached uptime and get a new one | ||||
|   my $dev_uptime = $snmp->load_uptime; | ||||
|   if (!defined $dev_uptime) { | ||||
|       error sprintf ' [%s] interfaces - Error! Failed to get uptime from device!', | ||||
|         $device->ip; | ||||
|       return; | ||||
|   } | ||||
|  | ||||
|   # used to track how many times the device uptime wrapped | ||||
|   my $dev_uptime_wrapped = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user