Community Alums
Not applicable

Custom Probe and Sensor to get Serial Number for Juniper SRX 100

  • We were not getting Serial Number for this model Juniper SRX 100 Router on CMDB form i.e on CI Record. But we were getting Model Number and Manufacturer for this model.

 Steps to be followed in writing Probe and Sensor for a Router(SNMP) to get Serial Number:

  1. Write a SNMP MIB for this model. Go to SNMP MIB’s and create new MIB for this Router
  2. (SNMP MIB: The SNMP MIB Files component contains the Management Information Base (MIB) files for the Simple Network Management Protocol (SNMP). A MIB is a collection of formally described objects. Each object represents a particular type of information)
  • Get the SNMP MIB File from Internet or from Vendor who is asking us to get the information on CMDB table.
  • Get MIB files for Juniper model from below link

https://apps.juniper.net/mib-explorer/search.jsp#object=jnxBoxAnatomy&product=Junos%20OS&release=17....

find_real_file.png

find_real_file.png

  • Version : Get the details from the MIB File from internet given the link.
  • Source: Give the Link details from where you are downloading the MIB File.
  • Download the file from Internet and save it as .txt on your desktop and Attach the MIB File to the SNMP MIB and don’t save it with any extension.
  1. Define OID for this Router Juniper SRX 100
  2. (Snmp oid: In computer networking, an OID, in the context of the Simple Network Management Protocol (SNMP), consists of the object identifier for an object in a Management Information Base (MIB).)
  • Get the SNMP OID for this particular model Router from Internet. Create a OID for this model in ServiceNow.
  • SNMP OID – New – Give the table name in which the data to be stored – Classifier as what it has to classify.
  • In our case, we are using this Juniper SRX 100 as “Routers” so we gave the table as “IP Router” and Classifier as “Standard Network Router”

find_real_file.png

 

  • After defining MIB and OID, start writing Probe and Sensor for this model to get Serial Number.

 

PROBE:

  1. Class – To which class this belongs to. In our case, we are using Juniper as “Router” so it comes to class SNMP.
  2. ECC Queue topic is SNMP and ECC Queue Name is same name given in Name field.
  3. In SNMP Fields – Give the OID path for the Serial Number for Juniper SRX 100 model.(we can get it from Internet) and Command as “Walk”.

 find_real_file.png

find_real_file.png

SENSOR:

  1. Create a Sensor for the Probe.
  2. Class : Sensor and Sensor type: Java script
  3. In Script: Write the code to get the serial number for this model.

new DiscoverySensor( {

process: function(result) {

var snmp = new SNMPResponse(result);

var oid_serial = snmp.getOIDText('iso.org.dod.internet.private.enterprises.juniperMIB.jnxMibs.jnxBoxAnatomy.jnxBoxSerialNo');

gs.log('oid_serial' +oid_serial); // Can check in System Logs

current.serial_number = oid_serial;

},

 type: 'DiscoverySensor'

});

Comments
bharath10
Mega Expert

Thank You Anusha for article.

i am trying to get discover netbotz with custom snmp prob-sensor. but i am not able to get serial number. from device.

i have uploaded and try with multiple mib and configure snmp oid but no luck.

Can any one of you help here.

 

thanks in advance.

 

bharath10
Mega Expert

Nice Article !

i am trying to discover netbotz devices(ootb not supported).

i have created classifier, probe-sensor. and uploaded mib as well. but struggling to get serial number.

error in mid agent log:- 

03/04/20 06:15:22 (957) MIB Initializer WARNING *** WARNING *** MIB loader errors when loading MIB: NetbotzMib11
---line 4992, column 5: undefined symbol 'device-crawlers-trap-desc'

 

what is meaning of error ? how can i fix it?

And what will be OID path to get serial number from netbotz(exaple- iso.org.dod.internet.private.enterprises.juniperMIB.jnxMibs.jnxBoxAnatomy.jnxBoxSerialNo)

Attached mib file, will it retrieve serial number with uploaded mib files.

Version history
Last update:
‎06-11-2018 12:00 PM
Updated by:
Community Alums