add log for skipping when duplicate lldpRemChassisId seen

This commit is contained in:
Oliver Gorwits
2017-11-28 21:05:51 +00:00
parent bc97cde2a3
commit 629b046a94

View File

@@ -45,14 +45,19 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
# discover_* config permits the discovery # discover_* config permits the discovery
foreach my $neighbor (@to_discover) { foreach my $neighbor (@to_discover) {
my ($ip, $remote_type, $remote_id) = @$neighbor; my ($ip, $remote_type, $remote_id) = @$neighbor;
next if $remote_id and $seen_id{ $remote_id }++; if ($remote_id and $seen_id{ $remote_id }++) {
debug sprintf
' queue - skip: %s with ID [%s] already queued from %s',
$ip, $remote_id, $device->ip;
next;
}
my $device = get_device($ip); my $device = get_device($ip);
next if $device->in_storage; next if $device->in_storage;
if (not is_discoverable($device, $remote_type)) { if (not is_discoverable($device, $remote_type)) {
debug sprintf debug sprintf
' queue - %s, type [%s] excluded by discover_* config', ' queue - skip: %s of type [%s] excluded by discover_* config',
$ip, ($remote_type || ''); $ip, ($remote_type || '');
next; next;
} }