SNMP Driver
The OAS SNMP driver reads and writes the objects of an SNMP agent - the management interface built into network switches, routers, UPS and PDU cards, printers and many other devices. Each tag reads one object, such as an interface's traffic counter or a UPS battery's charge, and the driver polls them in batches. The driver can also listen for the traps a device sends, so a change such as an interface going down reaches OAS without waiting for the next poll.
| Property | Description |
|---|---|
| Direction | Read and write. Tags poll objects on the agent; writes are SNMP SETs, read back once the device accepts them. |
| Transport | SNMP over UDP to one agent per driver interface, on port 161. Traps and informs are received on UDP port 162. |
| Security | v1 and v2c communities, or SNMPv3 users with MD5 or SHA authentication and DES or AES privacy |
| Delivery | Polled, one request at a time. Traps update the tags they carry between polls, and informs are acknowledged. |
| Failover | A second agent address the driver moves to when the primary stops answering |
| Licensing | Requires the SNMP licensed option, licensed per driver interface |
Getting Started
Find a device on the network, create its standard tags, then receive its traps.
Config Reference
Every parameter on the SNMP driver and what it does.
Polling a device
An SNMP agent holds its values in a tree of numbered objects, each named by an OID such as 1.3.6.1.2.1.1.3.0, the time since the device started. A tag whose Data Source is SNMP names one OID, and the driver reads all the tags of a driver interface in as few requests as the agent will accept.
Most devices answer slowly compared with a PLC, and some take more than a second per request. The request size, the timeout and the retries are set on the driver; they are listed in the Config Reference.
Finding the device and its tags
You do not need to know a device's OIDs to start. Discover device… scans a subnet for agents and fills in the driver's address, version and credentials from the device you pick. Create tags… then reads the device and offers the standard tags it supports - interface status and traffic, system information, CPU, UPS and printer values - and creates the ones you choose.
For anything else, the OID browser walks the agent and lists what it answers, named from the standard MIBs built into the driver and from any vendor MIB files you add. See Discover device, Create tags and Browse for an OID.
Versions and security
The driver speaks SNMP v1, v2c and v3. Use v2c or v3 wherever the device supports them: v1 has no 64-bit counters, so traffic counters on a fast link wrap within seconds, and one missing object fails a whole request.
v1 and v2c identify the driver with a community string, sent in clear text. v3 identifies it with a user, and can authenticate and encrypt every request. An agent does not answer a wrong community or credential at all, so a credential mistake looks the same as a device that is offline. See Communities and SNMPv3 security.
Traps
With Receive Traps on, the driver listens for the traps a device sends when something happens. A trap updates any tag whose OID it carries, and the driver then polls every tag again so that the rest of the values catch up.
A trap is accepted only from the driver's own device address, with the driver's community or v3 user. The engine's firewall must allow the trap port. See Traps.
Writes
A tag on a writable object can be written like any other tag. The driver sends the value as an SNMP SET with the driver's write credentials and the type the agent expects, and reads it back once the device accepts it. When the device refuses, the reason is shown in the Write dialog and recorded in System Errors. See Writes.
Failover
With failover enabled the driver is given a second agent address, using the same version and credentials, and moves to it when the primary stops answering. See Failover.
Related How-To guides
- Getting Started with SNMP - from a device on the network to tags and traps.
- SNMP Config Reference - every parameter on the driver.
- Device Connectors - the rest of the device connectors.
