SNMP
The SNMP connection reads values from network equipment and other devices with an SNMP agent: switches, routers, UPS, PDUs, cooling units, servers. A tag address is an OID, either in numbers or as a standard object name with an index. SNMP v1, v2c and v3 (users, authentication and encryption) are supported, with reading by GET, writing by SET, trap reception and MIB browsing.
The implementation is Scadora’s own, with no third-party libraries.
Quick start
Section titled “Quick start”- In the device settings, enable SNMP v2c and note the read community (often
public). - In the editor: Connection → SNMP (network equipment, UPS). Set the device Address and Community (read).
- Create tags, for example
sysUpTime.0(UInt32),ifOperStatus.1(Int16),upsEstimatedChargeRemaining.0(Float32). - Start the project.
Connection settings
Section titled “Connection settings”| Setting | Default | Meaning |
|---|---|---|
| Address, Port | —, 161 | IP address or name of the device and the UDP port of its agent |
| Version | v2c | v2c on most devices; v1 if the device does not answer v2c |
| Community (read) | public | As in the device settings |
| Community (write) | empty | Community for SET; empty — the same as for reading. Usually private |
| Timeout, ms | 2000 | Wait for a reply |
| Retries | 1 | UDP may lose packets: an unanswered request is repeated |
| Variables per request | 20 | How many OIDs one GET reads. Lower it if the device answers tooBig |
Poll cycle. Network devices do not need fast polling: 5–60 s is usually enough, and traffic counters are compared between cycles anyway.
Tag address
Section titled “Tag address”
The address is an OID in numbers, as in the vendor MIB or a MIB browser (1.3.6.1.4.1.318.1.1.1.2.2.1.0, a leading dot is allowed), or a name with an index: .0 for a single object, a number for a table row (a port, a sensor, a UPS output).
| Names | MIB | What it is |
|---|---|---|
sysDescr, sysName, sysLocation, sysContact, sysUpTime, sysObjectID |
MIB-II | Device description, name, location; uptime in hundredths of a second |
ifDescr, ifName, ifAlias, ifType, ifSpeed, ifHighSpeed, ifPhysAddress |
IF-MIB | Port name and description, speed, MAC address |
ifAdminStatus, ifOperStatus, ifLastChange |
IF-MIB | Port state: 1 — up, 2 — down |
ifInOctets, ifOutOctets, ifHCInOctets, ifHCOutOctets, ifInErrors, ifOutErrors |
IF-MIB | Traffic and error counters (ifHC… — 64-bit) |
hrProcessorLoad, hrStorageDescr, hrStorageSize, hrStorageUsed, hrSystemUptime |
HOST-RESOURCES-MIB | Processor load, disks and memory |
upsBatteryStatus, upsEstimatedChargeRemaining, upsEstimatedMinutesRemaining, upsSecondsOnBattery, upsBatteryVoltage, upsBatteryTemperature |
UPS-MIB | UPS battery: 2 — normal, 3 — low; charge in %, minutes left |
upsInputVoltage, upsInputFrequency, upsOutputSource, upsOutputVoltage, upsOutputCurrent, upsOutputPower, upsOutputPercentLoad, upsAlarmsPresent |
UPS-MIB | Input and output of the UPS by phase (.1, .2, .3) |
Many UPS (APC, Eaton, Delta and others) support the standard UPS-MIB as well as their own MIB; vendor objects are addressed by numeric OID.
Values and types
Section titled “Values and types”| SNMP type | Scadora tag type |
|---|---|
| INTEGER | Int16, Int32, Float32 and others; states — integers |
| Counter32, Gauge32, TimeTicks | UInt32, Float64 |
| Counter64 | UInt64, Float64 |
| OCTET STRING, IpAddress, OBJECT IDENTIFIER | String; binary data (MAC addresses) — in hex with colons |
Counters only grow and wrap around at the maximum: to get traffic per second, compute the difference between cycles in a server script.
Writing. A tag is written with SET using the type the device reported when reading. Most objects are read only; writable ones are, for example, sysLocation.0 and vendor control objects.
Testing and troubleshooting
Section titled “Testing and troubleshooting”| Symptom | Cause and what to do |
|---|---|
| “No connection”, “no response” | Wrong address, the agent is off, UDP 161 is blocked, or the community is wrong: agents do not answer a wrong community at all |
| “SNMP port is closed” | The device has no SNMP agent running |
| Tag Bad | The device has no such object or table row: check the index (port numbers often do not start at 1) |
| Some tags Bad on v1 | v1 rejects the whole request because of one missing object; Scadora removes it and repeats the request, the missing tag gets Bad |
Writes fail, notWritable or noAccess |
The object is read only, or the write community is wrong |
SNMPv3
Section titled “SNMPv3”For v3, choose version v3 and fill in the user fields as in the device settings:
| Field | Meaning |
|---|---|
| User (v3) | SNMPv3 user name |
| Authentication (v3) | MD5, SHA-1 or SHA-256; the authentication password must be at least 8 characters |
| Privacy (v3) | AES-128 or DES; an empty privacy password means no encryption |
| Context (v3) | Usually empty |
Without an authentication password the level is noAuthNoPriv, with it authNoPriv, and with a privacy password authPriv. On errors, Scadora reports the reason from the device’s report: unknown user, wrong authentication password, decryption failed.
Turn on Receive traps. Scadora listens on the UDP Trap port (162 by default) and accepts v1 and v2c traps from this connection’s address:
- trap variables go straight into tags with the same OIDs, so the value changes without waiting for the next poll;
- a tag with the address
trap:linkDown(ortrap:and an OID) counts how many such traps arrived, which is handy for an alarm; - a tag with the address
trap(String type) shows the last trap.
Port 162 must not be taken by the Windows “SNMP Trap” service.
MIB browser
Section titled “MIB browser”Project → Browse SNMP agent MIB… walks the agent using the connection settings: the MIB-2 branch and the enterprises branch, up to 5000 variables. Known objects are shown by name (ifInOctets.3), the rest by OID; the tag type follows the value type. Check the ones you need and click Import.
Limitations
Section titled “Limitations”- SNMPv3 traps and informs are not received; traps are accepted only from the connection’s address.
- Vendor MIB files are not loaded: names are known only for standard objects, the rest are OIDs.
- Checked against an in-test agent, not yet on real devices.