Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Creating YANG Files for XML Proxy for Junos Telemetry Interface

    The Junos Telemetry Interface uses OpenConfig paths to map data streamed through gRPC in key-value pairs. For certain resources—namely, those not included in dynamic rendering files that map operational state data—the XML Proxy process, xmlproxyd, is responsible for streaming the state values of such paths. This process has relied on the OpenConfig for Junos OS package, which includes a set of data models written in YANG, to translate the data into these key-value pairs.

    Starting with Junos OS Release 17.3R1 on MX Series and PTX Series routers, you can add configurable, user-defined YANG files that provide these mappings. This feature is useful for streaming statistics where the OpenConfig for Junos OS package either does not yet provide the necessary mappings in YANG or where dynamic rendering files for those statistics are not yet supported.

    Best Practices

    • Juniper Networks recommends that you not use YANG files that map to a extensive or verbose Junos OS operational commands, such as show interfaces or show route. The use of such a file could result in very slow or no streaming of telemetry data or very high CPU usage for various processes.
    • To use the xmldproxyd process to translate telemetry data, create a render.yang file where the dr:command-app is set to xmlproxyd. For more information, see Managing YANG Packages, Modules, and Scripts on Devices Running Junos OS.

    To add, validate, modify, or delete a user-defined YANG file for XML Proxy for the Junos Telemetry Interface, use the request system yang set of commands from the operational mode:

    1. Specify the name of the YANG file and the file path to install. This command creates .json file in the opt/lib/render directory.
      user@host> request system yang add package package-name proxy-xml module file-path-name

      Note: This command can be performed only on the current Routing Engine.

      To add multiple YANG modules with the request system yang add package package-name proxy-xml module command, enclose the file-path-names in brackets: [ file-path-name 1 file-path-name 2 ]

    2. (Optional) Validate a YANG package you have added.
      user@host> request system yang validate proxy-xml module file-path-name
    3. (Optional) Update an existing YANG file that was previously added.
      user@host> request system yang update package-name proxy-xml file-path-name
    4. Delete an existing YANG file.
      user@host> request system yang delete package-name
    5. Verify that the YANG file has been installed by entering the show system yang package command.
      user@host> show system yang package package-name

    Release History Table

    Release
    Description
    Starting with Junos OS Release 17.3R1 on MX Series and PTX Series routers, you can add configurable, user-defined YANG files that provide these mappings.

    Modified: 2017-07-18