Canon Model OIDs

alan_death
Kilo Expert

When I run an initial Discovery on Canon MFD's, I always get back an Unknown model when it's created. Looking at the OID's, every Canon model is the has the same sysObjectID OID, so I can't create an SNMP classifier to create the correct model. How can I fix this so the correct model is created? Example below from 2 different models.

<system oid="1.3.6.1.2.1.1">

<sysName oid="1.3.6.1.2.1.1.5" type="SnmpOctetString">iR-ADV C5045</sysName>

<sysUpTime oid="1.3.6.1.2.1.1.3" type="SnmpTimeTicks">338528111</sysUpTime>

<sysDescr oid="1.3.6.1.2.1.1.1" type="SnmpOctetString">Canon iR-ADV C5045 /P</sysDescr>

<sysObjectID oid="1.3.6.1.2.1.1.2" type="SnmpObjectId">.1.3.6.1.4.1.1602.4.7</sysObjectID>

</system>

<system oid="1.3.6.1.2.1.1">

<sysName oid="1.3.6.1.2.1.1.5" type="SnmpOctetString">TUL-CAC-142 - RRD17895</sysName>

<sysUpTime oid="1.3.6.1.2.1.1.3" type="SnmpTimeTicks">35295052</sysUpTime>

<sysDescr oid="1.3.6.1.2.1.1.1" type="SnmpOctetString">Canon iR-ADV C5240 /P</sysDescr>

<sysObjectID oid="1.3.6.1.2.1.1.2" type="SnmpObjectId">.1.3.6.1.4.1.1602.4.7</sysObjectID>

</system>

1 REPLY 1

jake_mckenna
ServiceNow Employee
ServiceNow Employee

If this is the case I think you might want to start looking into creating a new SNMP classifier for this OID that allows you to create a probe/sensor during the exploration phase to parse out the sysDecr oid for the model name. Create an SNMP probe that would utilize the sysDesc again and input something like below as the sensor:



new DiscoverySensor( {


    process: function(result) {


          var snmp = new SNMPResponse(result);


     


          var descr = snmp.getOIDText('iso.org.dod.internet.mgmt.mib-2.system.sysDescr');


          var man = descr.substring(0,descr.indexOf(' ')+1);


          var model = descr.substring(descr indexOf(' ')+1);




          var mm = MakeAndModelJS.fromNames(man,model,'hardware');




          current.manufacturer = mm.getManufacturerSysID();


          current.model_id = mm.getModelNameSysID();


         


       


    },


    type: "DiscoverySensor"


});



Now you could also just add this probe to the same classifier these OIDs are under, but add some more conditions to the above script to avoid it overwriting something you might not want. A good example of this might be here for reference on why i say that. Re: Parse sysdescr for SNMP probe (Discovery)