30 views

Description

  • Serial Number coming up in the "Short Description" but not in the "Serial Number" field for the Firewall devices.

Release or Environment

  • All

Resolution

  • From the Discovery Classification payload it can be observed that the "Serial Number" of the device is being returned.
     
     
     <sysName oid="1.3.6.1.2.1.1.5" type="SnmpOctetString">BMWallet-mach1-fw1s</sysName>

     <sysDescr oid="1.3.6.1.2.1.1.1" type="SnmpOctetString">SSG-550 version 6.3.0r21.0 (SN: JN11EA966ADB, Firewall+VPN)</sysDescr>

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


  • On the CI, serial number can be observed in the "Short Description" field but not in the "Serial Number" field.
  • The below piece of code can be added in the script include "SnmpIdentityInfoParser" to capture the serial number from the short description.


     /** Bailing out physObjs is not returned from device. In some cases Serial Number is present in short description field itself**/

     if (!gs.nil(this.ciData) && !gs.nil(this.ciData.data) && !gs.nil(this.ciData.short_description)) {

     var short_descr = this.ciData.data.short_description;

     if (!gs.nil(short_descr) && short_descr.contains('SN:')) {

     var strings = short_descr.split('SN:');

     var serialNumber = strings[1].split(',')[0];

     this.addSerial('physical', serialNumber);

     }

     }




  • Save these changes on the script and execute a discovery, which should be good.


Article Information

Last Updated:2020-08-31 02:29:50
Published:2020-08-24
Screen Shot 2020-06-22 at 7.52.28 PM.png[View]