This paper will guide you through the basics of SNMP GET commands on a remote SNMP-enabled device. In this example, we are using a TCP/IP power bar from CyberPower.
Before jumping in, the following is required:
- Davicom Cortex unit
- SNMP power bar, CyberPower model PDU41001
- MIB file for the power bar (available from the manufacturer)
- Computer running a free version of iReasoning MIB browser
Connect the Cortex, the power bar, and the computer to a local network, and set their IP parameters so that they can all communicate with each other.
Connect to the power bar and look for its SNMP settings. An example is given below. Under the SNMP settings, enable the SNMP, set the Read Only Community name to public, and set the Read/Write Community name to private. These exact two community names are often the ones used by default in SNMP equipment, but other ones might be used. Always check to make sure what they are.
We will first do an SNMP GET using iReasoning to learn some basic knowledge about the SNMP GET command, and also to make sure everything is working, and then we can move on to the Cortex.
Launch iReasoning. In the top menu, click on Advanced, and fill the screen as shown below, but set the IP address the same as one of your SNMP device. When done, click Ok.
Click on File, then Open MIBs, and browse to the location of the device’s MIB file. Once loaded, it will look like this.
Expand the three and all the available I/O’s will be visible. More than one product may be listed, so you may have to find yours in the list. This is actually the case for this example, where we are using a PDU (Power Distribution Unit), while the file also lists info for a UPS (Uninterruptible Power Supply) and a switch.
Browsing a MIB file allows seeing what I/O’s are available for SNMP control. Always make sure to use the most recent MIB file that matches your device model or type.
Let’s do an actual SNMP GET on the power bar to see the device model name. Search the MIB to find the matching Objet name.
Next, at the top right corner of the iReasoning screen, from the drop-down menu, select Get.
Following the GET request, iReasoning returns the device model name, showing PDU41001.
Before we start with the Cortex unit, two more things are needed by the Cortex: the ID of the Object, or Object IDentifier (OID), and its Value Type. These two are found in the MIB, and can be seen in iReasoning.
At the top of iReasoning, a box displays the OID of the selected Object. This number represents a unique identifier that is attached to the related Object. In this example, the OID is the model name of the power bar.
Copy this OID number as it will later be required.
Value Type or Syntax
The type of value (Value Type), or Synthax, is also found in the MIB, and is visible with iReasoning. At the lower left corner of the screen, a box shows different information about the selected OID. In this example, the Value Type is DISPLAYSTING. The DisplayString Value Type allows to manage alphanumeric content, like serial numbers for example. Another popular Value Type is Integer, which is used to manage numerical values.
The Value Type tells the Cortex what to expect as a value, and how to interpret it.
The information box also contains information on the accessibility (Access) of the OID, like Read Only or Read & Write, where Read means Get and Read & Write means Get & Set. A Description is also given, which provides valuable information or details about the OID.
Cortex SNMP GET Configuration
Let’s now configure the Cortex in order to obtain the same results as with iReasoning.
Connect to the Cortex using a browser, preferably Chrome.
- Go to the top left menu, under Inputs, and select SNMP GETs.
- Click on the Add (+) button, and then click on the Actions tab
- Fill in the menu screen that opens like the one below
SNMP GET Test
Click on the TEST button. The device model name will show up.