module ietf-telemetry-message { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-telemetry-message"; prefix tm; import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; } import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; } import ietf-platform-manifest { prefix p-mf; reference "draft-ietf-opsawg-collected-data-manifest: A Data Manifest for Contextualized Telemetry Data"; } import ietf-yang-structure-ext { prefix sx; reference "RFC 8791: YANG Data Structure Extensions"; } organization "IETF Draft"; contact "Author: Ahmed Elhassany Thomas Graf "; description "This YANG module defines an extensible message schema to be used at data collection to transform Network Telemetry messages towards external systems such as Message Brokers. Copyright (c) 2026 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2026-07-19 { description "Initial revision."; reference "RFC XXXX"; } sx:structure "message" { description "Telemetry message used within the Data Mesh"; container network-node-manifest { if-feature "network-node-manifest"; description "Contains the Data Manifest about the network node that exported Network Telemetry data."; uses p-mf:platform-details; } container telemetry-message-metadata { description "contains the session information about the session between the collector and the network node and the publishing process of the collector."; leaf node-export-timestamp { type yang:date-and-time; description "Timestamp when the Network Telemetry data has been exported from network element. This can be obtained in YANG-Push from event-time defined in draft-ietf-netconf-notif-envelope or in IPFIX from the export time in the message header as defined in RFC 7011 or in BMP from the timestamp in The per-peer header as defined in RFC 7854."; } leaf collection-timestamp { type yang:date-and-time; mandatory true; description "Timestamp when the data collector collected the Network Telemetry data from the network element."; } leaf notification-event { type telemetry-notification-event-type; mandatory true; description "Describes wherever the notification was received and forwarded from the network node or generated or removed from the data collector state cache."; } leaf sequence-number { type yang:counter32; description "Unique unique sequence number for each published telemetry message by the collector. The initial number is 1 and counts up by 1 at every published telemetry message until it reaches 4294967295 and wraps around."; } leaf session-protocol { type telemetry-session-protocol-type; mandatory true; description "Session protocol used to collect the Network Telemetry data from the network node."; } leaf export-address { type inet:host; mandatory true; description "Network node IP address from where the Network Telemetry data was exported from."; } leaf export-port { type inet:port-number; description "Network node transport port number from where the Network Telemetry data was exported."; } leaf collection-address { type inet:host; description "Data collector IP address at which the Network Telemetry data was collected."; } leaf collection-port { type inet:port-number; description "Data collector transport port number at which the Network Telemetry data was collected."; } } container data-collection-manifest { if-feature "data-collection-manifest"; description "Contains the Data Manifest of the data collector which collected the Network Telemetry data."; uses p-mf:platform-details; } container network-operator-metadata { description "Network operator specific metadata added by the Network Telemetry data collection."; list labels { key "name"; description "Abritrary labels assigned by the data collector."; leaf name { type string { length "1..max"; } description "Label name."; } choice value { mandatory true; description "label value"; choice number-choice { description "Number value"; leaf number-value { type uint64; description "Number value"; } } choice string-choice { description "String value"; leaf string-value { type string; description "String value"; } } choice anydata-choice { description "YANG anydata value"; anydata anydata-values { description "anydata yang"; } } } } } anydata payload { description "Message or notification received from network element."; } } feature network-node-manifest { description "This feature indicates the network node manifest support."; } feature data-collection-manifest { description "This feature indicates the data collection manifest support."; } identity session-protocol { description "Base identity to represent session protocols."; } identity yang-push { base session-protocol; description "YANG-Push in RFC 8640 or RFC 8641 or RFC 8650."; reference "RFC 8640, RFC 8641, RFC 8650: YANG-Push Events and Notifications for Datastores."; } identity netconf { base session-protocol; description "NETCONF GET RPC as described in RFC 6241."; reference "RFC 6241: NETCONF GET RPC."; } identity restconf { base session-protocol; description "RESTCONF HTTP GET as described in RFC 8040."; reference "RFC 8040: HTTP GET."; } typedef telemetry-notification-event-type { type enumeration { enum "log" { description "Collector is reporting the event as it arrived from the network element."; } enum "update" { description "Collector has updated an entry inside its local cache. This could be triggered by an event from the network for instance interface operational status changed or an internal event in the collector, such as a timer triggered to referesh old enteries."; } enum "delete" { description "Collector has deleted an entry from its local cache."; } } description "Type of event reported by the collector."; } typedef telemetry-session-protocol-type { type identityref { base session-protocol; } description "Network Telemetry protocol used to deliver the notification between the network node and the data collector."; } }