From 4716be4c2ffa10d1eb204b9942e8a1554b42bf98 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 5 Jan 2018 17:26:36 +0000 Subject: [PATCH] more useful to log the ID than the type (esp in homogeneous networks) --- Changes | 1 + lib/App/Netdisco/Worker/Plugin/Discover/Neighbors.pm | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 9c41b466..8c791aaa 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ [ENHANCEMENTS] * Disable preventLabelOverlappingOnForceEnd on network neighbor map + * Debug log the neighbor ID to help with problem diagnosis [BUG FIXES] diff --git a/lib/App/Netdisco/Worker/Plugin/Discover/Neighbors.pm b/lib/App/Netdisco/Worker/Plugin/Discover/Neighbors.pm index 7f87701a..121c1b5c 100644 --- a/lib/App/Netdisco/Worker/Plugin/Discover/Neighbors.pm +++ b/lib/App/Netdisco/Worker/Plugin/Discover/Neighbors.pm @@ -72,6 +72,9 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub { subaction => 'with-nodes', ($remote_id ? (device_key => $remote_id) : ()), }); + + debug sprintf ' queue - queued device %s (ID: [%s])', + $ip, ($remote_id || ''); } return Status->info(sprintf ' [%s] neigh - processed %s neighbors', @@ -241,8 +244,8 @@ sub store_neighbors { # what we came here to do.... discover the neighbor debug sprintf - ' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue', - $device->ip, $remote_ip, ($remote_type || ''), $port; + ' [%s] neigh - adding neighbor %s, ID [%s], on %s to discovery queue', + $device->ip, $remote_ip, ($remote_id || ''), $port; push @to_discover, [$remote_ip, $remote_type, $remote_id]; $remote_port = $c_port->{$entry};