netdisco
netdisco copied to clipboard
unknown vendor and model
Expected Behavior
being able to figure out just what device has unknown vendor & model.
Current Behavior
somehow i have a vendor "Unknown" (capital u) and model "unknown" (lowercase u) in my inventory and i can't for the life of me figure out which device that is. can't click through on either vendor or model, and had no success trying to find it in the database.
netdisco=> \pset null '<null>'
Null display is "<null>".
netdisco=> SELECT ip,uptime,layers,mac,serial,model,vendor,os,snmp_class FROM public.device WHERE vendor = 'unknown';
ip | uptime | layers | mac | serial | model | vendor | os | snmp_class
-------------+-----------+----------+--------+--------+-------+---------+--------+--------------------
10.91.45.25 | 216654576 | 01000000 | <null> | | | unknown | <null> | SNMP::Info::Layer7
10.109.1.22 | 18580172 | 01000000 | <null> | | | unknown | <null> | SNMP::Info::Layer7
(2 rows)
netdisco=> SELECT ip,uptime,layers,mac,serial,model,vendor,os,snmp_class FROM public.device WHERE vendor = 'Unknown';
ip | uptime | layers | mac | serial | model | vendor | os | snmp_class
----+--------+--------+-----+--------+-------+--------+----+------------
(0 rows)
netdisco=> SELECT ip,uptime,layers,mac,serial,model,vendor,os,snmp_class FROM public.device WHERE model = 'unknown';
ip | uptime | layers | mac | serial | model | vendor | os | snmp_class
----+--------+--------+-----+--------+-------+--------+----+------------
(0 rows)
netdisco=> SELECT ip,uptime,layers,mac,serial,model,vendor,os,snmp_class FROM public.device WHERE model = 'Unknown';
ip | uptime | layers | mac | serial | model | vendor | os | snmp_class
----+--------+--------+-----+--------+-------+--------+----+------------
(0 rows)
netdisco=> SELECT ip,uptime,layers,mac,serial,model,vendor,os,snmp_class FROM public.device WHERE model is NULL;
ip | uptime | layers | mac | serial | model | vendor | os | snmp_class
----+--------+--------+-----+--------+-------+--------+----+------------
(0 rows)
netdisco=> SELECT ip,uptime,layers,mac,serial,model,vendor,os,snmp_class FROM public.device WHERE snmp_class is NULL;
ip | uptime | layers | mac | serial | model | vendor | os | snmp_class
----+--------+--------+-----+--------+-------+--------+----+------------
(0 rows)
this returned all snmp v3 devices, but not my mystery device:
SELECT ip,uptime,layers,mac,model,vendor,os,snmp_class,snmp_comm FROM public.device WHERE snmp_comm is NULL;
SELECT * FROM public.device WHERE vendor is NULL;
returns 26 rows, while the inventory says it knows of only 1 Unknown / unknown. it's interesting however that all 26 results have snmp_class as "SNMP::Info" vendor NULL.
Possible Solution
can be added to an unkown device/model report if i had any clue where this mysery device is hiding.
the only thing i can think of is the query SELECT * FROM public.device WHERE vendor is NULL;
might get collapsed and shown as 1 device by the magic of dbix?
or, since i have 26 devices which identify with snmp_class "SNMP::Info" and have vendor NULL those are the issue? but while vendor is null, model is an empty string. do null & "" get handled the same perhaps?
Steps to Reproduce (for bugs)
if only i knew.
Context
sometimes devices from other teams get picked up by netdisco and discovered, when this happens i look at why and make an exclude filter and remove the devices again. most of the time this involves the unwanted device using public as community. i'm somewhat undecided how to handle this: it's a good way to find poorly configured devices, but also means i need to clean up & exluded at regular intervals.
until i get my db cleaned up again i've limited to use of public to a group of 4 ips.
- tag: 'default_v2_readonly_4'
community: 'public'
read: true
write: false
only: "group:snmppublic"
Your Environment
- Netdisco version used: 2.071001
- SNMP::Info version used: 3.95
Config info (deployment.yml)
Device information
https://github.com/netdisco/netdisco/wiki/Snapshot#share-a-snapshot