Chapter 19: Model-Driven Telemetry and Webhook Monitoring

Learning Objectives

Section 1: Model-Driven Telemetry Fundamentals

Pre-Check — What do you already know?

1. Which encoding is required when using gRPC transport for IOS XE dial-out MDT subscriptions?

2. An MDT subscription configured with update-policy on-change sends data:

3. Which of the following is NOT one of the five core components of an MDT subscription?

4. The update-policy periodic 3000 CLI setting configures a push interval of:

5. Which YANG module contains the XPath for IOS XE 5-second CPU utilization telemetry?

1.1 Telemetry vs. SNMP: A Paradigm Shift

SNMP's request-response model creates three deep structural problems that MDT solves by reversing the data flow entirely — devices push data to collectors rather than waiting to be polled.

SNMP Polling (Pull)

  • NMS sends GET every 5–10 minutes
  • NMS becomes scaling bottleneck
  • Short spikes invisible between polls
  • Static MIBs — hard to extend
  • UDP transport (v1/v2c), BER encoding

MDT (Push)

  • Device pushes on schedule or on-change
  • Distributed collectors, no bottleneck
  • Sub-second granularity achievable
  • Dynamic YANG models — extensible
  • gRPC / NETCONF, KV-GPB / JSON / XML
flowchart LR subgraph SNMP ["SNMP Polling Model"] direction LR NMS["NMS\n(poller)"] D1["Device 1"] D2["Device 2"] D3["Device N"] NMS -->|"GET every 5 min"| D1 NMS -->|"GET every 5 min"| D2 NMS -->|"GET every 5 min"| D3 D1 -->|"Response"| NMS D2 -->|"Response"| NMS D3 -->|"Response"| NMS end subgraph MDT ["Model-Driven Telemetry"] direction LR C["Collector\n(Telegraf)"] R1["Router 1"] R2["Router 2"] R3["Router N"] R1 -->|"Push every 10 s\ngRPC / KV-GPB"| C R2 -->|"Push every 10 s\ngRPC / KV-GPB"| C R3 -->|"Push every 10 s\ngRPC / KV-GPB"| C end

1.2 The Five Components of an MDT Subscription

ComponentPurposeExample Value
Subscription IDUnique integer; used for management and verification101
StreamData stream type; IOS XE uses yang-push (RFC 8641)yang-push
XPath FilterPath into the YANG data tree specifying which data to stream/process-cpu-ios-xe-oper:cpu-usage/cpu-utilization/five-seconds
Update PolicyPeriodic (every N centiseconds) or on-change (only when value changes)periodic 6000 (= 60 sec)
ReceiverDestination IP, port, and protocol for dial-out subscriptions10.28.35.45 57555 grpc-tcp

1.3 Encoding Options

KV-GPB is the only encoding permitted with gRPC transport. This is a hard constraint on IOS XE — not a recommendation.

EncodingTransportFormatEfficiency
encode-kvgpbgRPC onlyBinary protobuf (Key-Value)Highest
encode-jsonRESTCONF / TCPJSON textMedium
encode-xmlNETCONF / TCPXML textLowest

Key Points — Section 1

Animation: gRPC Dial-Out Telemetry Stream
Router-1
Telegraf
Switch-2
Telegraf
Router-3
Telegraf
Protocol: gRPC-TCP :57000 Encoding: KV-GPB Interval: 30 s (periodic) Stream: yang-push

Section 2: Configuring Telemetry Subscriptions

Pre-Check — What do you already know?

6. In a dial-out MDT subscription, who initiates the connection?

7. A dial-in MDT subscription established via NETCONF will:

8. Which IOS XE command verifies that a subscription is actively delivering data to its receiver?

9. When configuring MDT via RESTCONF, the HTTP method used to create or update a subscription is:

10. A subscription receiver state of Connecting most likely indicates:

2.1 Dial-In vs. Dial-Out

flowchart LR subgraph DI ["Dial-In (Dynamic)"] direction LR COL1["Collector\n(ncclient / gNMI)"] DEV1["IOS XE\nDevice"] COL1 -->|"1. Initiates NETCONF session"| DEV1 COL1 -->|"2. establish-subscription RPC"| DEV1 DEV1 -->|"3. Streams data (session-scoped)"| COL1 end subgraph DO ["Dial-Out (Configured)"] direction LR DEV2["IOS XE\nDevice"] COL2["Collector\n(Telegraf :57000)"] DEV2 -->|"1. Reads running-config"| DEV2 DEV2 -->|"2. Initiates gRPC connection"| COL2 DEV2 -->|"3. Streams KV-GPB continuously"| COL2 DEV2 -->|"4. Auto-reconnects on drop"| COL2 end

2.2 CLI Dial-Out Configuration

The CLI writes the subscription to running-config. IOS XE 16.10+ and netconf-yang must be enabled (the DMI subsystem requires it).

! Periodic memory stats, gRPC every 60 seconds
telemetry ietf subscription 101
 encoding encode-kvgpb
 filter xpath /memory-ios-xe-oper:memory-statistics/memory-statistic
 stream yang-push
 update-policy periodic 6000
 source-vrf Mgmt-intf
 receiver ip address 10.28.35.45 57555 protocol grpc-tcp

! On-change: only fires when interface oper-status changes
telemetry ietf subscription 102
 encoding encode-kvgpb
 filter xpath /if:interfaces/interface/oper-status
 stream yang-push
 update-policy on-change
 receiver ip address 10.28.35.45 57555 protocol grpc-tcp

2.3 NETCONF RPC Configuration

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <edit-config>
    <target><running/></target>
    <config>
      <mdt-config-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg">
        <mdt-subscription>
          <subscription-id>201</subscription-id>
          <base>
            <stream>yang-push</stream>
            <encoding>encode-kvgpb</encoding>
            <period>3000</period>  <!-- 30 seconds -->
            <xpath>/if:interfaces-state/interface/statistics</xpath>
          </base>
          <mdt-receivers>
            <address>192.168.1.100</address>
            <port>57000</port>
            <protocol>grpc-tcp</protocol>
          </mdt-receivers>
        </mdt-subscription>
      </mdt-config-data>
    </config>
  </edit-config>
</rpc>

2.4 Common XPath Reference

Use CaseXPath FilterYANG Module
5-sec CPU utilization/process-cpu-ios-xe-oper:cpu-usage/cpu-utilization/five-secondsCisco-IOS-XE-process-cpu-oper
Memory statistics/memory-ios-xe-oper:memory-statistics/memory-statisticCisco-IOS-XE-memory-oper
Interface counters/if:interfaces/interface/statisticsietf-interfaces
Interface oper-status/if:interfaces/interface/oper-statusietf-interfaces
BGP neighbor state/bgp-ios-xe-oper:bgp-state/neighbors/neighborCisco-IOS-XE-bgp-oper
Environmental sensors/environment-ios-xe-oper:environment-sensors/environment-sensorCisco-IOS-XE-environment-oper

2.5 Verification

show telemetry ietf subscription all
show telemetry ietf subscription 101 detail
show telemetry ietf subscription 101 receiver   ! Look for State = Connected
show telemetry internal connection
debug telemetry all                              ! Caution in production
Receiver StateLikely Cause
ConnectedData is flowing normally
ConnectingReceiver not reachable or not listening on configured port
DisconnectedPrevious connection dropped; device is retrying
Not configuredSubscription exists but no receiver has been defined

Key Points — Section 2

Section 3: The TIG Stack — Telemetry Collection and Processing

Pre-Check — What do you already know?

11. In the TIG stack, which component is responsible for receiving and decoding IOS XE gRPC telemetry streams?

12. The Telegraf input plugin used for Cisco IOS XE MDT is named:

13. By default, IOS XE devices target which port when sending dial-out gRPC telemetry to a Telegraf receiver?

3.1 The TIG Stack

Telegraf, InfluxDB, and Grafana form the industry-standard open-source pipeline for MDT collection, storage, and visualization.

flowchart LR subgraph Devices ["Network Devices"] direction TB R1["IOS XE Router"] SW1["IOS XE Switch"] end subgraph TIG ["TIG Stack"] direction LR T["Telegraf\ncisco_telemetry_mdt\n:57000 gRPC listener\nDecodes KV-GPB"] I["InfluxDB\nTime-series DB\nMeasurements / Tags / Fields"] G["Grafana\nDashboards\nThreshold Alerts"] T -->|"Line Protocol writes\nHTTP :8086"| I I -->|"Flux / InfluxQL queries"| G end subgraph Notify ["Notification Targets"] SL["Slack"] PD["PagerDuty"] WH["Webhook"] end R1 -->|"gRPC dial-out\nKV-GPB :57000"| T SW1 -->|"gRPC dial-out\nKV-GPB :57000"| T G -->|"Alert"| SL & PD & WH

3.2 Component Roles

ComponentRoleKey Detail
TelegrafCollection agent / gRPC serverStateless; decodes KV-GPB via cisco_telemetry_mdt plugin; writes InfluxDB line protocol
InfluxDBTime-series databaseMeasurements (like tables), tags (indexed metadata), fields (numeric values); supports InfluxQL and Flux
GrafanaVisualization and alertingConnects to InfluxDB as data source; threshold alerts can page PagerDuty, Slack, or downstream webhooks

3.3 Telegraf Configuration Snippet

[[inputs.cisco_telemetry_mdt]]
  transport       = "grpc"
  service_address = ":57000"
  # For TLS: tls_cert / tls_key paths here

[[outputs.influxdb]]
  urls     = ["http://influxdb:8086"]
  database = "mdt_db"
  username = "admin"
  password = "admin"

Telegraf auto-names InfluxDB measurements from the YANG XPath. Interface statistics from /if:interfaces/interface/statistics become the measurement Cisco-IOS-XE-interfaces-oper:interfaces/interface/statistics. YANG leaf names (in-octets, out-octets) become fields; device hostname becomes a tag.

Key Points — Section 3

Section 4: Webhook-Based Monitoring

Pre-Check — What do you already know?

14. Cisco Meraki uses which algorithm to sign webhook payloads for authenticity verification?

15. In a unified Flask webhook receiver handling Catalyst Center, Meraki, and SD-WAN events, the routing logic should distinguish the source by:

4.1 What Is a Webhook?

Webhooks are HTTP POST callbacks. A platform sends a structured JSON body to your registered URL the instant a network event occurs — no polling, no wasted API quota, no latency.

Polling Model

  • Your app sends GET every 30 seconds
  • Fires whether or not anything changed
  • Wastes API quota
  • Polling lag before detection

Webhook Model

  • Platform sends POST when event fires
  • Zero resources consumed at rest
  • Near real-time notification
  • No quota impact between events

4.2 Platform Comparison

PlatformKey Payload FieldAuth / ValidationNotable Feature
Catalyst CentereventIdBasic / Token authEvent Simulator for dev/test
MerakialertTypeHMAC-SHA256 signature headerLiquid payload templates; IoT sensor & camera events
SD-WAN ManagereventnameBasic auth (username/password)Native Slack/Webex routing since 20.15.1

4.3 Catalyst Center Webhook Event Flow

sequenceDiagram participant Net as Network Device participant CC as Catalyst Center participant EM as Event Management participant RX as Webhook Receiver Net->>CC: Device becomes unreachable CC->>EM: Internal event bus publishes NETWORK-DEVICES-3-506 EM->>EM: Match subscriptions (eventId / category / severity) EM->>RX: HTTP POST {eventId, name, severity, details} RX-->>EM: HTTP 200 OK RX->>RX: Parse payload, route to automation Note over RX: Create ticket, trigger Ansible, page engineer

4.4 Meraki Signature Validation

Always validate the X-Cisco-Meraki-Signature header before acting on a Meraki webhook payload:

import hmac, hashlib

def validate_meraki_webhook(secret: str, body: bytes, signature: str) -> bool:
    computed = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(computed, signature)

4.5 Unified Webhook Receiver Routing Logic

sequenceDiagram participant CC as Catalyst Center participant MK as Meraki Dashboard participant SD as SD-WAN Manager participant RX as Flask Receiver participant RT as Payload Router participant OUT as Automation CC->>RX: HTTP POST {eventId, name, severity} MK->>RX: HTTP POST {alertType, deviceName} + Meraki-Signature header SD->>RX: HTTP POST {eventname, severity, devices} RX->>RT: Inspect payload keys Note over RT: alertType → Meraki\neventId → Catalyst Center\neventname → SD-WAN RT->>OUT: handle_meraki / handle_catalyst_center / handle_sdwan OUT-->>RX: Action triggered RX-->>CC: HTTP 200 OK RX-->>MK: HTTP 200 OK RX-->>SD: HTTP 200 OK

4.6 MDT vs. Webhooks — Choosing the Right Tool

DimensionModel-Driven TelemetryWebhooks
Data typeContinuous metric streamsDiscrete state-change events
FrequencyEvery few seconds (configurable)On event occurrence only
SourceNetwork devices (IOS XE, XR, NX-OS)Management platforms (Catalyst Center, Meraki, SD-WAN)
Storage needTime-series DB (InfluxDB)Event log or ticketing system
Best forCapacity planning, performance trendingIncident response, automation triggers
ExampleCPU utilization graph over 30 days"Device unreachable — open ticket"

Key Points — Section 4

Animation: Multi-Platform Webhook Event Dispatch
Catalyst Center
eventId: NETWORK-DEVICES-3-506
Flask Receiver
POST /webhook
Meraki Dashboard
alertType: APs went down + HMAC-SHA256
Automation Pipeline
Slack / Jira / Ansible / PagerDuty
SD-WAN Manager
eventname: interface-admin-down
Routing: alertType → Meraki
eventId → Catalyst Center
eventname → SD-WAN

Post-Study Quiz — Test Your Understanding

Post-Check: MDT Fundamentals

1. Which encoding is required when using gRPC transport for IOS XE dial-out MDT subscriptions?

2. An MDT subscription configured with update-policy on-change sends data:

3. Which of the following is NOT one of the five core components of an MDT subscription?

4. The update-policy periodic 3000 CLI setting configures a push interval of:

5. Which YANG module contains the XPath for IOS XE 5-second CPU utilization telemetry?

Post-Check: Configuring Telemetry Subscriptions

6. In a dial-out MDT subscription, who initiates the connection?

7. A dial-in MDT subscription established via NETCONF will:

8. Which IOS XE command verifies that a subscription is actively delivering data to its receiver?

9. When configuring MDT via RESTCONF, the HTTP method used to create or update a subscription is:

10. A subscription receiver state of Connecting most likely indicates:

Post-Check: TIG Stack

11. In the TIG stack, which component is responsible for receiving and decoding IOS XE gRPC telemetry streams?

12. The Telegraf input plugin used for Cisco IOS XE MDT is named:

13. By default, IOS XE devices target which port when sending dial-out gRPC telemetry to a Telegraf receiver?

Post-Check: Webhook Monitoring

14. Cisco Meraki uses which algorithm to sign webhook payloads for authenticity verification?

15. In a unified Flask webhook receiver handling Catalyst Center, Meraki, and SD-WAN events, the routing logic should distinguish the source by:

Your Progress

Answer Explanations