SNMP Fundamentals
TutorialWhat is SNMP?
Simple Network Management Protocol ā the standard way to monitor network devices. Almost every switch, router, firewall, UPS, and server exposes data via SNMP. Your Dynatrace extension reads this data by asking the device for specific values.
Think of it like a database query: you ask for a specific "address" (called an OID), and the device returns a value.
OIDs ā Object Identifiers
Every piece of data on an SNMP device has a unique address called an OID (Object Identifier). It's a dotted number sequence:
1.3.6.1.2.1.1.5.0 ā sysName (device hostname)
1.3.6.1.2.1.1.3.0 ā sysUpTime (uptime in ticks)
1.3.6.1.2.1.2.2.1.2 ā ifDescr (interface descriptions)
The tree structure:
1 (iso)
āāā 3 (org)
āāā 6 (dod)
āāā 1 (internet)
āāā 2 (mgmt)
ā āāā 1 (mib-2)
ā āāā 1 (system) ā sysName, sysDescr, sysUpTime, sysContact
ā āāā 2 (interfaces) ā ifTable (speed, status, counters)
ā āāā 4 (ip) ā ipAddrTable
ā āāā 47 (entityMIB) ā entPhysicalTable (hardware inventory)
āāā 4 (private)
āāā 1 (enterprises)
āāā 9 (cisco) ā Cisco-specific MIBs
āāā 9 (ciscoMgmt)
āāā 109 (CISCO-PROCESS-MIB) ā CPU/Memory
āāā 117 (CISCO-ENTITY-FRU) ā Power Supply
āāā 91 (CISCO-ENTITY-SENSOR) ā Temperature
OIDs under 1.3.6.1.2.1 are standard (work on any device). OIDs under 1.3.6.1.4.1.{vendor} are vendor-specific (need MIB files bundled with your extension).
Scalar vs Table OIDs
This is the most important concept for building extensions. Get it wrong and you'll hit DED016/DED017 errors.
Scalar OIDs
A single value per device. Always end in .0:
1.3.6.1.2.1.1.5.0 ā sysName = "SWITCH-01" (one value)
1.3.6.1.2.1.1.3.0 ā sysUpTime = 143200000 (one value)
In your extension.yaml, scalar OIDs go in subgroups with table: false (or no table: at all).
Table OIDs
Multiple values ā one per row (interface, CPU core, sensor, etc.). Do NOT end in .0:
1.3.6.1.2.1.2.2.1.2 ā ifDescr
.1 = "GigabitEthernet0/1"
.2 = "GigabitEthernet0/2"
.3 = "Vlan100"
1.3.6.1.2.1.2.2.1.10 ā ifInOctets
.1 = 5839201
.2 = 1293847
.3 = 0
In your extension.yaml, table OIDs go in subgroups with table: true. Dynatrace uses GETBULK to walk the table and collects one metric per row.
The Rules
table: true ā OIDs must NOT end in .0 (GETBULK walk)
table: false ā OIDs MUST end in .0 (scalar GET)
Mixing these = DED016 or DED017 error
MIB Files
A MIB (Management Information Base) is a text file that maps OID numbers to human-readable names and defines the data types. Without MIBs, you're working with raw numbers.
Without MIB: 1.3.6.1.4.1.9.9.109.1.1.1.1.8 = 24
With MIB: cpmCPUTotal5minRev = 24 (gauge, percent)
Standard MIBs (IF-MIB, SNMPv2-MIB, ENTITY-MIB, IP-MIB, HOST-RESOURCES-MIB) ship with ActiveGate ā no bundling needed.
Vendor-specific MIBs must be bundled in your extension's snmp/ directory:
extension.zip/
āāā extension.yaml
āāā snmp/
āāā CISCO-PROCESS-MIB.my ā CPU/Memory OIDs
āāā CISCO-ENTITY-FRU-CONTROL-MIB.my ā Power Supply
āāā CISCO-ENTITY-SENSOR-MIB.my ā Temperature
SNMP Versions
Dynatrace Extensions 2.0 supports:
- SNMPv2c ā Community string authentication (simple password). Most common in enterprise networks.
- SNMPv3 ā Username + auth protocol + privacy protocol. More secure. Supports NoAuthNoPriv, authNoPriv, and authPriv.
The version is configured in the monitoring configuration (JSON), not in extension.yaml. Your extension.yaml is version-agnostic.
How Dynatrace Polls SNMP
1. EEC reads your extension.yaml
2. For each group/subgroup:
- Scalar (table: false): sends GET request for each OID
- Table (table: true): sends GETBULK to walk the table
3. Combines metrics + dimensions into metric lines
4. Sends to Dynatrace via metric ingestion protocol
5. Repeats every {interval} minutes
Default polling: every 1 minute. Each GETBULK walks up to maxRepetitions rows (default 100) per request.
Finding OIDs for Your Device
Three approaches:
- Vendor documentation ā Most vendors publish MIB references. Search for "{vendor} MIB reference guide".
- snmpwalk ā Walk the device from command line:
snmpwalk -v2c -c public 10.0.0.1 1.3.6.1.2.1.1 # System info snmpwalk -v2c -c public 10.0.0.1 1.3.6.1.2.1.2.2 # Interface table snmpwalk -v2c -c public 10.0.0.1 1.3.6.1.4.1.9.9.109 # Cisco CPU - MIB Browser ā GUI tools like iReasoning MIB Browser let you browse the OID tree visually.
Common OID Families
These are the OIDs you'll use in 90% of extensions:
Standard (no MIB bundling needed):
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
SNMPv2-MIB (1.3.6.1.2.1.1.*)
.1.0 sysDescr Device description
.3.0 sysUpTime Uptime in hundredths of seconds
.4.0 sysContact Admin contact
.5.0 sysName Hostname
.6.0 sysLocation Physical location
IF-MIB (1.3.6.1.2.1.2.2.1.* and 1.3.6.1.2.1.31.1.1.1.*)
.2 ifDescr Interface name
.3 ifType Interface type (6=ethernet, 24=loopback)
.5 ifSpeed Speed in bits/sec
.7 ifAdminStatus Admin status (1=up, 2=down)
.8 ifOperStatus Operational status
.10 ifInOctets Bytes received (32-bit counter)
.16 ifOutOctets Bytes sent (32-bit counter)
31.1.1.1.6 ifHCInOctets Bytes received (64-bit)
31.1.1.1.10 ifHCOutOctets Bytes sent (64-bit)
31.1.1.1.15 ifHighSpeed Speed in Mbps
Vendor-specific (need MIB files):
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
CISCO-PROCESS-MIB (1.3.6.1.4.1.9.9.109.1.1.1.1.*)
.8 cpmCPUTotal5minRev CPU % (5 min avg)
.12 cpmCPUMemoryUsed Memory used (bytes)
.13 cpmCPUMemoryFree Memory free (bytes)
ENTITY-MIB (1.3.6.1.2.1.47.1.1.1.1.*)
.2 entPhysicalDescr Hardware description
.7 entPhysicalName Component name
.13 entPhysicalModelName Model number
Key Takeaways
- OIDs ending in
.0= scalar ātable: false - OIDs without
.0= table ātable: true - Standard MIBs ship with ActiveGate, vendor MIBs need bundling
- Never mix OIDs from different SNMP tables in the same subgroup (DED018)
- Use 64-bit counters (ifHCInOctets) over 32-bit (ifInOctets) when available
What's Next
In Module 2, we'll take these OIDs and turn them into actual metrics and dimensions in your extension.yaml. You'll write your first real SNMP polling configuration.
š Hands-On Exercise
Edit the YAML in the editor, then click "Check My Work" to validate.
Scalar vs Table OIDs
This extension has 3 bugs related to scalar vs table OID rules. Find and fix them.
- Scalar OIDs (single value per device) must end in
.0 - Table OIDs (one value per row) must not end in
.0whentable: true - Check each subgroup's
table:setting against its OIDs
Hint: Look for DED016 and DED017 errors.