SNMP Custom Data Collection

Dear JDisc friends,

first of all I wish everybody a happy new year 2021!

JDisc Discovery supports since its beginnings the collection of custom attributes via scripts and reading registry keys. The custom attribute data collection is often used by customers to collect information that JDisc Discovery does not collect out-of-the-box.

However, some customers requested to also collect custom attributes using the SNMP protocol. Starting with build 5049, JDisc Discovery can collect custom SNMP variables and even tables.

When you are familiar with SNMP, then you know that the SNMP variables are indexed by a so-called OID (Object ID). The object id consists of numbers separated by a dot. The OIDs also define a hierarchy of SNMP variables. Since the numbers are hard to understand, there are so-called MIB files that describe a value (a readable name, type, etc.).

SNMP distinguishes between scalar variables (simple name/value pairs) and table-based data (where the data consists of multiple rows and columns). Both can be collected via JDisc Discovery.

There are many web pages that you can use to find the definition for the OIDs with the MIBs:

  • http://oid-info.com/
  • http://www.circitor.fr/Mibs/Mibs.php
  • http://www.oidview.com/

 

Collecting SNMP Scalar Values

Let’s illustrate how the data collection works for scalar values. As an example, I have chosen the SNMP system group which provides some basic information about the device.

The variables of the SNMP system group are defined as follows:

  • 1.3.6.1.2.1.1.1 – sysDescr
  • 1.3.6.1.2.1.1.2 – sysObjectID
  • 1.3.6.1.2.1.1.3 – sysUpTime
  • 1.3.6.1.2.1.1.4 – sysContact
  • 1.3.6.1.2.1.1.5 – sysName
  • 1.3.6.1.2.1.1.6 – sysLocation
  • 1.3.6.1.2.1.1.7 – sysServices

So let’s assume we would like to collect this information. As usual, we need to create a custom attribute for the custom data collection. There is a new type called “SNMP Group”. Select this type and then add the SNMP system object IDs that belong to the group.

Note that you need to add a trailing “.0” as this is the default SNMP index for scalar variables. Only in a few exceptional cases, the SNMP agent uses another index!

Adding SNMP scalar Values
Adding SNMP scalar Values

When you start the discovery for an SNMP capable device, then the previously defined SNMP variables get collected and stored within our database as a custom attribute.

The actual result after the scan
The actual result after the scan

Collecting SNMP Tables

The second data type for SNMP is table-oriented information. An SNMP table is defined by the columns that make up the table and the content of the table (the actual rows with their values).

An SNMP table is defined similarly as an SNMP group. The only major difference is that you are not appending the default index “.0” to the SNMP variable since each row has its own identifying index. The index can be just one number, but also a list of numbers separated by a dot.

As an example, we are going to collect (part of) the SNMP interface table. The SNMP interface table contains information about the network interfaces, such as their description or mac address (ifPhysAddress).

Defining the Data Collection for an SNMP Table
Defining the Data Collection for an SNMP Table

Once the collection is defined, the discovery will collect the information during the device scan.

As a result, you get the SNMP table information stored as a custom attribute.

The SNMP interface table with its values
The SNMP interface table with its values.

The new SNMP data collection allows users to collect any SNMP information that we are not collecting yet and store it within their database.

Hope you like this new feature!

Cheers,
Thomas

About The Author

Thomas Trenz
I own and manage JDisc and its network inventory and discovery products. Before I started JDisc, I worked quite a long time for Hewlett-Packard developing software for network assessments and inventory projects. Feel free to contact me on Linked-In or Xing.

Leave A Comment


The reCAPTCHA verification period has expired. Please reload the page.