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:
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:
- 220.127.116.11.18.104.22.168 – sysDescr
- 22.214.171.124.126.96.36.199 – sysObjectID
- 188.8.131.52.184.108.40.206 – sysUpTime
- 220.127.116.11.18.104.22.168 – sysContact
- 22.214.171.124.126.96.36.199 – sysName
- 188.8.131.52.184.108.40.206 – sysLocation
- 220.127.116.11.18.104.22.168 – 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!
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.
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).
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 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!