cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Summary

When a device is discovered it shows up as a workstation when in actual fact it is a printer or possibly shows as a printer when in actual fact it is a print server

Symptoms

When a device is discovered it shows up as a workstation when in actual fact it is a printer or possibly shows as a printer when in actual fact it is a print server. Essentially the device role is incorrect, those 2 are just examples but there are several others that could occur ? it?s the device role being incorrect that this article covers.


Cause

When a device is discovered, part of the discovery process is to collect the SNMP information for the device and this is stored in the dbo.NetworkDeviceSNMPInfo table with the DeviceID being a foreign key to the dbo.NetworkDevice table. One particular SNMP field is the SNMP_sysObjectID and when the device is added we look up this value to see if a matching record exists in the OID field of the dbo.ASN1Object table, if it does then the ObjectRole in the dbo.ASN1Object is used for the discovered device, if it doesn?t exist then we fall back to a default DeviceRole which is usually Workstation or Server.


Steps To Reproduce

In order to reproduce this you will need to identify a record in Discovered Devices node where the role is incorrect, if you have the .disco file for the device this makes it easier to lookup the information but otherwise you can search for the device in the database using the name in the following query:

SELECT nd.DeviceID, nd.DeviceName, nd.DNSFullName, nd.ComputerID, ndsn.SNMP_sysObjectID AS DiscoveredSNMP, nd.DeviceRole, dr.Description AS RoleDesc, asn.OID, asn.Description, asn.ObjectRole
FROM NetworkDevice nd
INNER JOIN NetworkDeviceSNMPInfo ndsn ON ndsn.DeviceID = nd.DeviceID
INNER JOIN DeviceRole dr ON nd.DeviceRole = dr.DeviceRoleID
LEFT JOIN ASN1Object asn ON asn.OID = ndsn.SNMP_sysObjectID
WHERE nd.DeviceName LIKE '%MyDevice%' OR nd.DNSFullName LIKE '%MyDevice%'

Here?s how to interpret the query results:

  1. The first 4 fields are to help identify the device and this can be used to filter the results, I?ve used DeviceName or DNSFullName but any of these 4 can be used if you know the details of the sample device.

  2. The DiscoveredSNMP, DeviceRole and RoleDesc show the SNMP / Role information that has actually been detected on the device and are found in the disco file. It is the DiscoveredSNMP field that contains the SNMP_sysObjectID that we lookup in the ASN1Object table.

  3. The final 3 fields; OID, Description and ObjectRole are the values in the lookup table and both OID and ObjectRole should match up with the DiscoveredSNMP and DeviceRole fields from point 2 respectively, if they are NULL then that means that the SNMP ID is unknown and the role will default to Workstation / Server.


Once you have confirmed that the final 3 fields (OID, Description and ObjectRole) are either NULL or the Description / ObjectRole are incorrect then you have successfully replicated this issue.


Workaround

The fix for this issue is to simply add the corresponding SNMP_sysObjectID for the device into the ASN1Object table, so here?s a workable example:

You have a device called ATL0P83C and in the .disco file you can see the following information:

SNMP_sysDescr="Dell Laser Printer 5100cn"
SNMP_sysObjectID="1.3.6.1.4.1.674.10898.10.2"

You have confirmed that this is a printer (says so in the SNMP_sysDescr) so from the DeviceRole table the NetworkDevice record should have a DeviceRole of Printer but in this case it has a role of Server because the SNMP_sysObjectID doesn?t exist. So we can add this information into the ASN1ObjectAdd stored procedure in the following manner:

EXEC ASN1ObjectAdd '1.3.6.1.4.1.674.10898.10.2','Dell Laser Printer 5100cn',3

In the above procedure the parameters are:

OID = '1.3.6.1.4.1.674.10898.10.2'
Description ="Dell Laser Printer 5100cn"
ObjectRole = 3

The first 2 values came from the .disco file and the 3rd came from a manual identification of the device and a lookup of the correct ID in the DeviceRole table (which ObjectRole maps to)

This will add the SNMP mapping into the database and so once you delete and re-import the ATL0P83C disco file it should recognise the device as a printer not a server. The same applies for any device that is incorrectly identified, all you need to change are the variables which can be found in the disco files.


Additional Information

If the issue still present after modifying the SQL scripts for your environment please contact Technical Support providing details of the scripts you ran for further investigation.

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jun 02, 2018 01:02 PM
Updated by: