Getting Started with SNMP

This page takes a network device from nothing to a set of OAS tags reading it, and then to traps updating those tags as things happen. It uses a switch with SNMP v2c; a device on SNMPv3 differs only in the credentials entered in Discover device….

Info

SNMP is a licensed option, licensed per driver interface. Open Configure OAS and check that SNMP appears in the licensed drivers list.

Prepare the device

SNMP is configured on the device itself, through its own web page or command line. OAS cannot do these steps for you.

  1. Enable the SNMP agent on the device, with version v2c.

  2. Set the read community to public.

    Important

    192.168.1.10 (the device), 192.168.1.20 (the OAS engine) and the community public are placeholders for this page. Use your own device's address, your engine's address, and the community configured on your device.

  3. Allow the engine's address, 192.168.1.20, to query the agent. Many devices answer only the managers on their access list, and do not answer anyone else at all.

  4. To receive traps, add 192.168.1.20 as a trap destination, on port 162, with version v2c and the community public.

Add the SNMP driver

In the following steps you will create an SNMP driver interface and fill it in from the device.

  1. Select Drivers in the sidebar.

  2. Click + Add, enter a meaningful Driver Interface Name to give this driver interface instance a unique name (for example SNMP_Switch), and click Create. Once created, the driver interface name should appear in the list of drivers.

  3. Set the Driver to SNMP.

  4. Click Discover device… beside IP Address.

  5. Set the scan:

    • Subnet, range or address: 192.168.1.0/24
    • SNMP version: v2c / v1
    • Communities to try (comma-separated, up to 5): public
  6. Click Scan. A /24 takes about 20 seconds. The scan only reads from the devices; it changes nothing.

  7. Select 192.168.1.10 in the list and click Use. IP Address, Port, SNMP Version and Read Community are filled in from the answer. See Discover device if the device does not appear.

  8. Turn on Enable and click on the Apply changes button. The driver interface is not active until it is enabled and the changes are applied.

Create the device's tags

Create tags… reads the device and offers the standard tags it supports. It is available once the driver's changes have been applied.

  1. In the Drivers screen, select the SNMP_Switch driver interface and click Create tags….

  2. Leave Tag group as Switch and Polling rate as 5.

  3. Under Interfaces, click only up, and under For each interface: check Status and Traffic in and Traffic out.

  4. Under System, click all.

  5. Click Create N tags, where N is the number of tags selected.

  6. Select Tags in the sidebar and open the Switch group. Check that the quality status of the new tags is Good and that the values are as expected.

    Tag quality

Read another object

The tags created in the previous section cover the common objects. Any other object the device answers can be read with the OID browser.

  1. Select a tag that will read from the device.

  2. Set the Data Source to SNMP.

  3. Set the Select Driver Interface drop-down to the SNMP_Switch interface created previously.

  4. Click the browse button beside OID. In Browse for SNMP OID, set the Branch to System (description, uptime, name).

  5. Select sysUpTime in the list and click Use this OID. The tag's OID is set to 1.3.6.1.2.1.1.3.0, and its Data Type to Long Integer.

  6. Click on the Apply changes button. The tag reads the time since the device started, in hundredths of a second.

Receive traps

In this step the driver starts listening for the traps the device was set up to send in Prepare the device.

  1. Allow inbound UDP on port 162 in the engine's firewall.

  2. On Windows, check that the SNMP Trap service is stopped. It uses the same port.

  3. In the Drivers screen, select the SNMP_Switch driver interface and turn on Receive Traps. Leave Trap Port as 162.

  4. Click on the Apply changes button.

  5. Unplug a cable from a port on the switch. Its Status tag in the Switch group changes as soon as the trap arrives, without waiting for the next poll.

If no trap arrives, see Traps.

Save the configuration

Apply changes updates the running configuration; it does not write it to disk. Click Save to write the tag configuration file, and set it as the default under Options so that it loads again when the service restarts.

Where next