šŸ“” SNMP Extensions — Module 1

SNMP Fundamentals

Tutorial

What 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:

  1. Vendor documentation — Most vendors publish MIB references. Search for "{vendor} MIB reference guide".
  2. 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
  3. 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 .0 when table: true
  • Check each subgroup's table: setting against its OIDs

Hint: Look for DED016 and DED017 errors.

extension.yamlYAML
Loading...