logo

NJP

How to extend discovery content of an SNMP device

Import · Aug 18, 2022 · article

A recent experience with discovering an SNMP enabled device made me realize that I didn’t fully understand the best way to extend out of the box discovery content.

I was able to discover the device and many required attributes by simply configuring credentials, in this case Read Only Community String, and doing a quick discovery.

However, I wanted to add a few attributes that were not discovered out of the box.

I found Vendor MIB files and loaded then, but unfortunately it did not compile correctly and became corrupted, breaking the out of the box discovery. This caused extra work troubleshooting which led to uninstalling the MIB files, which I really didn’t need.

I didn’t take the time to see what was already available in the MIB that was not being populated as an attribute.

In this article I will describe the steps to add additional attributes. This assumes that the device has already been discovered but additional attributes are required.

Ok, so you have created credentials and done a quick discovery of your device. You have validated discovery results and all looks good. If there are issues, use this KB article:

SNMP Discovery Troubleshooting KB Article

Except…… you would like to add an additional attribute that did not appear during your first discovery.

Discovery of SNMP devices uses probes and patterns to interrogate a device for all available information available about it. This information is stored in a database called a management information base (MIB). These MIBs are stored in formatted text files.

A managed object (MIB object or object, or OID) is a unique characteristic of a device. These objects consist of one or multiple object instances (variables). An OID identifies a managed object in the MIB hierarchy.

This output is either processed by sensors or patterns to take the output, format it and update to correct tables in the CMDB.

Your instance already contains the most common MIB definition files. To see what is loaded out of the box, go to Mid Server > SNMP MIBs or look at the ecc_agent_mib table.

image

The next step is to query the device from the mid server and return all available options.

The easiest way to do this is to install an SNMP MIB browser like iReasoningto query the device.

image

Alternately, you could use SNMP get or SNMP walk

Yet another way would be create a Discovery pattern and add a step to query the SNMP OID, then connect to the target device using debug mode and test the step to see what content is returned to see what is available.

imageYour next job is to look at the output to see if there is an OID available that will return the value that you desire.

More on MIBs and OIDs

Once you can query the device and return the value you want to add as a new attribute, here are the steps to get that attribute into the CMDB:

  • Create a new SNMP probe to return the data and associated Sensor to process the data returned and populate the desired CI class and attribute
  • Create a new CI classifier for a new type of device or associate the new probe to an existing Classifier in the trigger probe related list.
  • Probes and Patterns method:
  • Create a Horizontal Discovery Probe and associate it to the pattern you developed.
  • Add a Horizontal Discovery Probe in the Trigger Probes related list of the Target Classifier.
  • In the Horizontal Discovery Probe, add the pattern you developed.

See Doug Schulze's article: "Create a simple SNMP Classifier. The Patterns edition" for details on this.

image

When discovery is triggered, the probe or pattern will fire during exploration and update the CI with the new attribute.

If there is no OID that represents that data you want to retrieve, look for a Vendor Provided MIB that you might need to load. Load a Mib module

Then follow the same steps above to investigate what is available.

Good Luck!

View original source

https://www.servicenow.com/community/itom-articles/how-to-extend-discovery-content-of-an-snmp-device/ta-p/2320172