Dondi Beers
ServiceNow Employee
ServiceNow Employee

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.

find_real_file.png

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 iReasoning to query the device.

 

find_real_file.png

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.

find_real_file.pngYour 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:

  1. Probe and Sensor method:
  • 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.
  1. 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.

find_real_file.png

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!

Comments
cbester
Tera Contributor

I have what is probably a simple question. I am running discovery on a switch, and I know the OID and have imported the appropriate MIB. Do I need to manually create the OID record in ServiceNow, or does it somehow get created when the MIB is loaded?

doug_schulze
ServiceNow Employee
ServiceNow Employee

If the switch doesnt report through our classification that it has switching capabilities, nor a SNMP SysOID directing us to use the switch classification then yes, you would want to add. This is all done in public MIBs, no need for private MIBs to get this level of classification information. Now if your switch is special and has its own questions that only it can answer then you could use extension sections to consume those private MIBs and get the data you need... I talk about it here...

 

https://www.servicenow.com/community/itom-articles/create-a-simple-snmp-classifier-the-patterns-edit...

kuroiwa
Tera Contributor

@doug_schulze 

Hello Doug,
If possible, I would appreciate your response!


I am in charge of Discovery. I was able to add a new OID that is not registered OOTB to the “discovery_snmp_oid” table and register the NW device in the CMDB.

However, I am not sure which MIB information is being used and how much information is being retrieved.

Based on your previous response, my understanding is that if only the OID is newly registered, it retrieves only the information that can be obtained using the standard MIB. Is that correct?


I would be grateful for your response.

doug_schulze
ServiceNow Employee
ServiceNow Employee

That is correct

Version history
Last update:
‎08-18-2022 09:18 AM
Updated by: