Skip to main content

Support of Network Observation Timestamping in YANG Notifications
draft-tgraf-netconf-yang-push-observation-time-01

Document Type Active Internet-Draft (individual)
Authors Thomas Graf , Benoît Claise , Alex Huang Feng
Last updated 2024-04-14
Replaces draft-netconf-tgraf-yang-push-observation-time
RFC stream (None)
Intended RFC status (None)
Formats
Yang Validation 0 errors, 27 warnings
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-tgraf-netconf-yang-push-observation-time-01
Network Working Group                                            T. Graf
Internet-Draft                                                  Swisscom
Intended status: Standards Track                               B. Claise
Expires: 16 October 2024                                          Huawei
                                                           A. Huang Feng
                                                               INSA-Lyon
                                                           14 April 2024

   Support of Network Observation Timestamping in YANG Notifications
           draft-tgraf-netconf-yang-push-observation-time-01

Abstract

   This document extends the YANG Notification header with the YANG
   objects observation timestamping, both for the "push-update" and
   "push-change-update" notifications.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 16 October 2024.

Copyright Notice

   Copyright (c) 2024 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Graf, et al.             Expires 16 October 2024                [Page 1]
Internet-Draft     YANG Notifications Observation Time        April 2024

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminologies . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Extend the Streaming Update Notifications . . . . . . . . . .   3
   4.  The "ietf-yang-push-netobs-timestamping" YANG Module  . . . .   4
     4.1.  Data Model Overview . . . . . . . . . . . . . . . . . . .   4
     4.2.  YANG Module . . . . . . . . . . . . . . . . . . . . . . .   8
   5.  Implementation Status . . . . . . . . . . . . . . . . . . . .  11
     5.1.  6WIND VSR . . . . . . . . . . . . . . . . . . . . . . . .  11
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  11
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  11
     7.1.  URI . . . . . . . . . . . . . . . . . . . . . . . . . . .  11
     7.2.  YANG module name  . . . . . . . . . . . . . . . . . . . .  11
   8.  Operational Considerations  . . . . . . . . . . . . . . . . .  12
     8.1.  On Change Sync On Start . . . . . . . . . . . . . . . . .  12
   9.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  12
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  12
     10.1.  Normative References . . . . . . . . . . . . . . . . . .  12
     10.2.  Informative References . . . . . . . . . . . . . . . . .  12
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  13

1.  Introduction

   To correlate network data among different Network Telemetry planes as
   described in Section 3.1 of [RFC9232] or among different YANG push
   subscription types defined in Section 3.1 of [RFC8641], network
   observation timestamping describes when the state change was observed
   or from when to when the data was accounted.  This is essential for
   understanding the timely relationship among these different planes
   and YANG push subscription types.

   With [I-D.tgraf-netconf-notif-sequencing] the delay between the YANG
   Notification export and the arrival at the downstream system storing
   the data can be measured.  With network observation timestamping
   described in this document, the delay between the network observation
   and the data export of the YANG push publisher process can be
   measured as well, extending the delay measurement scope from the time
   the network observation and storing the data.

Graf, et al.             Expires 16 October 2024                [Page 2]
Internet-Draft     YANG Notifications Observation Time        April 2024

   When the time bucket length in a time series database and the
   periodical YANG push subscription time is identical, the eventTime of
   the netconf notification message header is used for indexing, there
   is variable delay between the observation time and the eventTime, and
   the anchor-time as described in Section 4.2 of [RFC8641] is close to
   the time bucket boundaries, a time bucket is going to have
   periodically 0 or 2 measurements indexed instead of 1.  Leading to
   inconsistent accounting errors in the time series database.  This
   problem is resolved by using the observation-time instead of the
   eventTime for time series database indexing.

   By extending the YANG Notification header with the YANG objects
   observation-time for periodical and state-changed-observation-time
   for on-change subscriptions these use cases can be addressed
   accordingly.

2.  Terminologies

   The following terms are defined in [RFC8639] and are not redefined
   here:

   Publisher

   Receiver

   Subscription

   In addition, this document defines the following terms:

   Observation-time: Describes the measurement observation time for the
   "push-update" notification in a "periodical" subscription.

   State-changed-observation-time: Describes the time when the network
   state change was observed.

3.  Extend the Streaming Update Notifications

   Besides the Subscription ID as described in Section 3.7 of [RFC8641],
   the following network observation time metadata objects are part of
   "push-update" and "push-change-update" notifications.

   observation-time:  Describes the measurement observation time for the
      "push-update" notification in a "periodical" subscription.  By
      comparing the "observation-time" of two "push-update"
      notifications, the collector can deduce the actual cadence of the
      measurements, and compare it with the configured one.

   state-changed-observation-time:  Describes in the "push-change-

Graf, et al.             Expires 16 October 2024                [Page 3]
Internet-Draft     YANG Notifications Observation Time        April 2024

      update" notification in a "on-change" subscription the time when
      the network state change was observed after the subscription was
      initially established.  In case of an "on-change sync on start"
      subscription it describes the time when the network state change
      was observed before the subscription was established.

   Figure 1 provides an example of a JSON encoded, [RFC8259], "push-
   change-update" notification message over HTTPS-based
   [I-D.ietf-netconf-https-notif] or UDP-based
   [I-D.ietf-netconf-udp-notif] transport for the same subscription.

   {
      "ietf-notification:notification": {
         "eventTime": "2023-02-04T16:30:11.22Z",
         "sysName": "example-router",
         "sequenceNumber": 187653,
         "ietf-yang-push:push-update": {
            "id": 1011,
            "observation-time": "2023-02-04T16:30:09.44Z",
            "datastore-xpath-filter": "ietf-interfaces:interfaces",
            "datastore-contents": {
               "ietf-interfaces:interface": {
                  "name": {
                     "eth0": {
                        "oper-status": "up"
                     }
                  }
               }
            }
         }
      }
   }

          Figure 1: JSON Push Example for a subscription-modified
                            notification message

4.  The "ietf-yang-push-netobs-timestamping" YANG Module

   This YANG module augments the "ietf-yang-push" module with the
   observation-time in the "push-update" and "push-change-update"
   streaming update notifications.

4.1.  Data Model Overview

4.1.1.  Tree View

   The following is the YANG tree diagram [RFC8340] for the ietf-yang-
   push-netobs-timestamping YANG module

Graf, et al.             Expires 16 October 2024                [Page 4]
Internet-Draft     YANG Notifications Observation Time        April 2024

   module: ietf-yang-push-netobs-timestamping

     augment /yp:push-update:
       +--ro observation-time?   yang:date-and-time
     augment /yp:push-change-update:
       +--ro state-changed-observation-time?   yang:date-and-time

4.1.2.  Full Tree View

   The following is the YANG tree diagram [RFC8340] for the ietf-yang-
   push-netobs-timestamping augmentation within the ietf-subscribed-
   notifications, including the RPCs and notifications.

   module: ietf-yang-push

     augment /sn:establish-subscription/sn:input:
       +---w (update-trigger)?
          +--:(periodic)
          |  +---w periodic!
          |     +---w period         centiseconds
          |     +---w anchor-time?   yang:date-and-time
          +--:(on-change) {on-change}?
             +---w on-change!
                +---w dampening-period?   centiseconds
                +---w sync-on-start?      boolean
                +---w excluded-change*    change-type
     augment /sn:establish-subscription/sn:input/sn:target:
       +--:(datastore)
          +-- datastore                               identityref
          +-- (selection-filter)?
             +--:(by-reference)
             |  +-- selection-filter-ref
             |          selection-filter-ref
             +--:(within-subscription)
                +-- (filter-spec)?
                   +--:(datastore-subtree-filter)
                   |  +-- datastore-subtree-filter?   <anydata>
                   |          {sn:subtree}?
                   +--:(datastore-xpath-filter)
                      +-- datastore-xpath-filter?     yang:xpath1.0
                              {sn:xpath}?
     augment /sn:modify-subscription/sn:input:
       +---w (update-trigger)?
          +--:(periodic)
          |  +---w periodic!
          |     +---w period         centiseconds
          |     +---w anchor-time?   yang:date-and-time
          +--:(on-change) {on-change}?

Graf, et al.             Expires 16 October 2024                [Page 5]
Internet-Draft     YANG Notifications Observation Time        April 2024

             +---w on-change!
                +---w dampening-period?   centiseconds
     augment /sn:modify-subscription/sn:input/sn:target:
       +--:(datastore)
          +-- datastore                               identityref
          +-- (selection-filter)?
             +--:(by-reference)
             |  +-- selection-filter-ref
             |          selection-filter-ref
             +--:(within-subscription)
                +-- (filter-spec)?
                   +--:(datastore-subtree-filter)
                   |  +-- datastore-subtree-filter?   <anydata>
                   |          {sn:subtree}?
                   +--:(datastore-xpath-filter)
                      +-- datastore-xpath-filter?     yang:xpath1.0
                              {sn:xpath}?
     augment /sn:subscription-started:
       +--ro (update-trigger)?
          +--:(periodic)
          |  +--ro periodic!
          |     +--ro period         centiseconds
          |     +--ro anchor-time?   yang:date-and-time
          +--:(on-change) {on-change}?
             +--ro on-change!
                +--ro dampening-period?   centiseconds
                +--ro sync-on-start?      boolean
                +--ro excluded-change*    change-type
     augment /sn:subscription-started/sn:target:
       +--:(datastore)
          +-- datastore                               identityref
          +-- (selection-filter)?
             +--:(by-reference)
             |  +-- selection-filter-ref
             |          selection-filter-ref
             +--:(within-subscription)
                +-- (filter-spec)?
                   +--:(datastore-subtree-filter)
                   |  +-- datastore-subtree-filter?   <anydata>
                   |          {sn:subtree}?
                   +--:(datastore-xpath-filter)
                      +-- datastore-xpath-filter?     yang:xpath1.0
                              {sn:xpath}?
     augment /sn:subscription-modified:
       +--ro (update-trigger)?
          +--:(periodic)
          |  +--ro periodic!
          |     +--ro period         centiseconds

Graf, et al.             Expires 16 October 2024                [Page 6]
Internet-Draft     YANG Notifications Observation Time        April 2024

          |     +--ro anchor-time?   yang:date-and-time
          +--:(on-change) {on-change}?
             +--ro on-change!
                +--ro dampening-period?   centiseconds
                +--ro sync-on-start?      boolean
                +--ro excluded-change*    change-type
     augment /sn:subscription-modified/sn:target:
       +--:(datastore)
          +-- datastore                               identityref
          +-- (selection-filter)?
             +--:(by-reference)
             |  +-- selection-filter-ref
             |          selection-filter-ref
             +--:(within-subscription)
                +-- (filter-spec)?
                   +--:(datastore-subtree-filter)
                   |  +-- datastore-subtree-filter?   <anydata>
                   |          {sn:subtree}?
                   +--:(datastore-xpath-filter)
                      +-- datastore-xpath-filter?     yang:xpath1.0
                              {sn:xpath}?
     augment /sn:filters:
       +--rw selection-filter* [filter-id]
          +--rw filter-id                         string
          +--rw (filter-spec)?
             +--:(datastore-subtree-filter)
             |  +--rw datastore-subtree-filter?   <anydata>
             |          {sn:subtree}?
             +--:(datastore-xpath-filter)
                +--rw datastore-xpath-filter?     yang:xpath1.0
                        {sn:xpath}?
     augment /sn:subscriptions/sn:subscription:
       +--rw (update-trigger)?
          +--:(periodic)
          |  +--rw periodic!
          |     +--rw period         centiseconds
          |     +--rw anchor-time?   yang:date-and-time
          +--:(on-change) {on-change}?
             +--rw on-change!
                +--rw dampening-period?   centiseconds
                +--rw sync-on-start?      boolean
                +--rw excluded-change*    change-type
     augment /sn:subscriptions/sn:subscription/sn:target:
       +--:(datastore)
          +--rw datastore                               identityref
          +--rw (selection-filter)?
             +--:(by-reference)
             |  +--rw selection-filter-ref

Graf, et al.             Expires 16 October 2024                [Page 7]
Internet-Draft     YANG Notifications Observation Time        April 2024

             |          selection-filter-ref
             +--:(within-subscription)
                +--rw (filter-spec)?
                   +--:(datastore-subtree-filter)
                   |  +--rw datastore-subtree-filter?   <anydata>
                   |          {sn:subtree}?
                   +--:(datastore-xpath-filter)
                      +--rw datastore-xpath-filter?
                              yang:xpath1.0 {sn:xpath}?

     rpcs:
       +---x resync-subscription {on-change}?
          +---w input
             +---w id    sn:subscription-id

     notifications:
       +---n push-update
       |  +--ro id?                      sn:subscription-id
       |  +--ro datastore-contents?      <anydata>
       |  +--ro incomplete-update?       empty
       |  +--ro ypnt:observation-time?   yang:date-and-time
       +---n push-change-update {on-change}?
          +--ro id?
          |       sn:subscription-id
          +--ro datastore-changes
          |  +--ro yang-patch
          |     +--ro patch-id    string
          |     +--ro comment?    string
          |     +--ro edit* [edit-id]
          |        +--ro edit-id      string
          |        +--ro operation    enumeration
          |        +--ro target       target-resource-offset
          |        +--ro point?       target-resource-offset
          |        +--ro where?       enumeration
          |        +--ro value?       <anydata>
          +--ro incomplete-update?                     empty
          +--ro ypnt:state-changed-observation-time?
                  yang:date-and-time

4.2.  YANG Module

   The YANG module has one leave augmenting the model of Subscription to
   YANG Notifications [RFC8639].

Graf, et al.             Expires 16 October 2024                [Page 8]
Internet-Draft     YANG Notifications Observation Time        April 2024

   <CODE BEGINS>
     file "ietf-yang-push-netobs-timestamping@2023-03-06.yang"
   module ietf-yang-push-netobs-timestamping {
     yang-version 1.1;
     namespace
       "urn:ietf:params:xml:ns:yang:ietf-yang-push-netobs-timestamping";
     prefix ypnt;
     import ietf-yang-types {
       prefix yang;
       reference
         "RFC 6991: Common YANG Data Types";
     }
     import ietf-yang-push {
       prefix yp;
       reference
         "RFC 8641: Subscription to YANG Notifications for Datastore Updates";
     }
     organization "IETF NETCONF (Network Configuration) Working Group";
     contact
       "WG Web:   <http:/tools.ietf.org/wg/netconf/>
        WG List:  <mailto:netconf@ietf.org>

        Authors:  Thomas Graf
                  <mailto:thomas.graf@swisscom.com>
                  Benoit Claise
                  <mailto:benoit.claise@huawei.com>
                  Alex Huang Feng
                  <mailto:alex.huang-feng@insa-lyon.fr>";

     description
       "Defines YANG push event notification header with the observation
       time in push-update and push-change-update notifications.

       Copyright (c) 2023 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 2023-03-06 {
       description
         "First revision";

Graf, et al.             Expires 16 October 2024                [Page 9]
Internet-Draft     YANG Notifications Observation Time        April 2024

       reference
         "RFC XXXX: Support of YANG Notifications Observation Time";
     }

     feature yang-push-change-update-obs-timestamp {
       description
         "This feature indicates the YANG-push Notifications support
         the observation timestamps in the push-change-update notifications.";
     }

     feature yang-push-update-obs-timestamp {
       description
         "This feature indicates the YANG-push Notifications support
         the observation timestamps in the push-update notifications.";
     }

     grouping yang-push-update-obs-timestamp {
       description
         "This grouping adds the start timestamp and the end timestamp of the
         observed metrics.";
       leaf observation-time {
         type yang:date-and-time;
         description
           "This is the time when metrics started counting.";
       }
     }

     grouping yang-push-change-update-obs-timestamp {
       description
         "This grouping adds the timestamp of the recorded event.";
       leaf state-changed-observation-time {
         type yang:date-and-time;
         description
           "This is the time when event happened.";
       }
     }

     // Event notifications
     augment "/yp:push-update" {
       description
         "This augmentation adds the start timestamp of the counted metrics
         in the push-update notification.";
       uses ypnt:yang-push-update-obs-timestamp;
     }

     augment "/yp:push-change-update" {
       description
         "This augmentation adds the timestamp of the event in the push-change-update

Graf, et al.             Expires 16 October 2024               [Page 10]
Internet-Draft     YANG Notifications Observation Time        April 2024

         notification.";
         uses ypnt:yang-push-change-update-obs-timestamp;
     }
   }
   <CODE ENDS>

5.  Implementation Status

   Note to the RFC-Editor: Please remove this section before publishing.

5.1.  6WIND VSR

   6WIND implemented this document for a YANG Push publisher on
   UDP-based Transport for Configured Subscriptions
   [I-D.ietf-netconf-udp-notif] in their VSR platform.

6.  Security Considerations

   The security considerations for the YANG notifications subscription
   mechanism are described in [RFC8641].  This document adds no
   additional security considerations.

7.  IANA Considerations

   This document describes the URI used for the IETF XML Registry and
   registers a new YANG module name.

7.1.  URI

   IANA is requested to add this document as a reference in the
   following URI in the IETF XML Registry [RFC3688].

   URI:  urn:ietf:params:xml:ns:yang:ietf-yang-push-netobs-timestamping

   Registrant Contact:  The IESG.

   XML:  N/A; the requested URI is an XML namespace.

   Reference:  RFC5277; RFC-to-be

7.2.  YANG module name

   This document registers the following YANG module in the YANG Module
   Names Registry [RFC6020], within the "YANG Parameters" registry:

   name:  ietf-yang-push-netobs-timestamping

Graf, et al.             Expires 16 October 2024               [Page 11]
Internet-Draft     YANG Notifications Observation Time        April 2024

   namespace:
      urn:ietf:params:xml:ns:yang:ietf-yang-push-netobs-timestamping

   prefix:  ypnt

   Reference:  RFC-to-be

8.  Operational Considerations

8.1.  On Change Sync On Start

   For "on-change sync on start" subscriptions, if the timestamp for the
   network state change was observed before the subscription was
   established and is not recorded in the YANG datastore, then no
   timestamp should be populated to state-changed-observation-time.

9.  Acknowledgements

   The authors would like to thank Rob Wilton, Nick Corran, Pierre
   Francois Ahmed Elhassany and Jean Quilbeuf for their review and
   valuable comments.

10.  References

10.1.  Normative References

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC8639]  Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard,
              E., and A. Tripathy, "Subscription to YANG Notifications",
              RFC 8639, DOI 10.17487/RFC8639, September 2019,
              <https://www.rfc-editor.org/info/rfc8639>.

   [RFC8641]  Clemm, A. and E. Voit, "Subscription to YANG Notifications
              for Datastore Updates", RFC 8641, DOI 10.17487/RFC8641,
              September 2019, <https://www.rfc-editor.org/info/rfc8641>.

10.2.  Informative References

Graf, et al.             Expires 16 October 2024               [Page 12]
Internet-Draft     YANG Notifications Observation Time        April 2024

   [I-D.ietf-netconf-https-notif]
              Jethanandani, M. and K. Watsen, "An HTTPS-based Transport
              for YANG Notifications", Work in Progress, Internet-Draft,
              draft-ietf-netconf-https-notif-15, 1 February 2024,
              <https://datatracker.ietf.org/doc/html/draft-ietf-netconf-
              https-notif-15>.

   [I-D.ietf-netconf-udp-notif]
              Zheng, G., Zhou, T., Graf, T., Francois, P., Feng, A. H.,
              and P. Lucente, "UDP-based Transport for Configured
              Subscriptions", Work in Progress, Internet-Draft, draft-
              ietf-netconf-udp-notif-12, 21 January 2024,
              <https://datatracker.ietf.org/doc/html/draft-ietf-netconf-
              udp-notif-12>.

   [I-D.tgraf-netconf-notif-sequencing]
              Graf, T., Quilbeuf, J., and A. H. Feng, "Support of
              Hostname and Sequencing in YANG Notifications", Work in
              Progress, Internet-Draft, draft-tgraf-netconf-notif-
              sequencing-03, 14 January 2024,
              <https://datatracker.ietf.org/doc/html/draft-tgraf-
              netconf-notif-sequencing-03>.

   [RFC8259]  Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
              Interchange Format", STD 90, RFC 8259,
              DOI 10.17487/RFC8259, December 2017,
              <https://www.rfc-editor.org/info/rfc8259>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [RFC9232]  Song, H., Qin, F., Martinez-Julia, P., Ciavaglia, L., and
              A. Wang, "Network Telemetry Framework", RFC 9232,
              DOI 10.17487/RFC9232, May 2022,
              <https://www.rfc-editor.org/info/rfc9232>.

Authors' Addresses

   Thomas Graf
   Swisscom
   Binzring 17
   CH-8045 Zurich
   Switzerland
   Email: thomas.graf@swisscom.com

Graf, et al.             Expires 16 October 2024               [Page 13]
Internet-Draft     YANG Notifications Observation Time        April 2024

   Benoit Claise
   Huawei
   Email: benoit.claise@huawei.com

   Alex Huang Feng
   INSA-Lyon
   Lyon
   France
   Email: alex.huang-feng@insa-lyon.fr

Graf, et al.             Expires 16 October 2024               [Page 14]