[#179] Catch failure to get uptime from device

This commit is contained in:
Oliver Gorwits
2015-01-25 10:06:10 +00:00
parent e03cb75729
commit bb49b695a6
2 changed files with 9 additions and 0 deletions

View File

@@ -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;