OcNOS DC : Key Features : Improved Management : Streaming Telemetry
Streaming Telemetry
Overview
Streaming telemetry allows users to monitor network health by efficiently streaming operational data of interest from OcNOS routers. This structured data is transmitted to remote management systems for proactive network monitoring and understanding CPU and memory usage in managed devices for troubleshooting.
A machine learning (ML) database can be created with telemetry data to establish a baseline for normal network operation and predict or mitigate network issues.
Feature Characteristics
OcNOS version 6.4.1 introduces the initial features for Streaming Telemetry, which include support for gNMI-based Dial-in mode Telemetry for the management plane. The initial feature list includes support for the “STREAM” type and “SAMPLING” mode subscription for the Subscribe Remote Procedure Call (RPC). The gNMI-based collector connects to the OcNOS target device and invokes the Subscribe RPC, specifying the set of path(s) of interest. Below are the two key components involved:
gNMI Server (OcNOS Target): The gNMI server operates within the OcNOS device, serving as the source of telemetry data. It supports the gNMI protocol, allowing gNMI-based clients (collectors) to request and receive streaming data. The server streams the requested data to the client according to the specified parameters.
gNMI Client (Collector): The gNMI client, also known as the collector, runs outside the OcNOS target device and is responsible for receiving and gathering telemetry data. In this context, it is the entity that connects to the OcNOS target device to collect data using the gNMI protocol. The collector initiates the Subscribe RPC to specify the data of interest.
Figure 1 illustrates the gNMI client's (Collector) Subscribe request and response (RPC) interaction with the gNMI server (OcNOS Target).
 
Sample Subscribe Request
Dial-in Mode: Dial-in mode is the method used to establish a telemetry connection where the collector initiates the connection to the server. In this mode, the collector sends a Subscribe RPC request to the target device, and the server running on the target device streams the data to the collector.
Example Message Flow: Subscribe Request and Response
Figure 2 illustrates a sample gnmic Subscribe Request and Subscribe Response between the collector and the OcNOS target device.
Step 1: Subscription Request Initiation
The gnmic collector server initiates a Subscribe Request by sending a Subscribe RPC in Stream type.
This subscription request aims explicitly to gather data related to interface state counters and CPU state.
A fixed 30/45-second sampling interval is set for data collection.
Step 2: Data Collection and Processing
The gNMI server, within the OcNOS router, is responsible for data collection.
At regular 30/45-second intervals, it retrieves data from the sensor path, focusing on interface state counters and CPU State.
The received data undergoes a validation process, and the data is transformed into the required encoding type.
Step 3: Continuous Subscription Response Streaming
The gNMI Server responds to the subscription request by continuously streaming Subscribe Response data.
This streaming process maintains the same 30/45-second interval as the data collection.
The collected data is streamed in real-time to the gnmic collector server.
 
Message Flow: Subscribe Request and Response
Scale and Minimum Sample Interval Supported
To limit the impact of telemetry on critical features of the OcNOS target device, certain limits have been implemented. In Stream mode, there is a maximum limit of 100 sensor paths that can be subscribed to at any given point in time. Additionally, the minimum supported sample interval is 10 seconds.
Scale Scenarios
1. New Subscribe RPC Request Makes Total Paths To Not Exceed 100: When these new paths are added to the existing paths already handled by gNMI server, the total number does not exceed the maximum limit of 100 paths. Consequently, the gNMI server accepts this subscribe request and proceeds with the processing.
2. New Subscribe RPC Request Makes Total Paths To Reach 100: With the new Subscribe RPC Request, the total paths handled would be exactly equal to 100. The gNMI server accepts the new subscribe request; however, a warning is logged by the gNMI server, indicating that the maximum number of paths has been reached, and it signifies that no new Subscribe RPC Stream mode requests will be handled until the number of currently handled paths drops below 100.
3. New Subscribe RPC Request Makes Total Paths To Exceed 100: With the new Subscribe RPC Request, the total paths handled exceed 100. The gNMI server returns an error. The RPC request is not closed but will be accepted and responded to when the total number of paths handled drops to a level that can accommodate this RPC request.
Minimum Sample Interval: The minimum supported sample interval is 10 seconds. Any sampling mode request with a sample interval of less than 10 seconds will result in an error. However, if a sample interval is 0, it defaults to the minimum sample interval supported by the gNMI server, which is 10 seconds.
Benefits
Proactive Network Monitoring: Obtain real-time insights into network health and performance, and how to enable quicker response to issues.
Resource Utilization Monitoring: Monitor CPU and memory utilization to optimize resource allocation and performance.
Predictive Troubleshooting: Identify patterns and potential issues before they impact the network, reducing downtime.
Automation and Resilience: Use telemetry data to automate network management tasks and design a more resilient network.
Prerequisites
Before configuring Streaming Telemetry, ensure that:
A supported OcNOS router running a compatible release.
Access to the management interface of the router.
Any gNMI client that complies with gNMI specifications can be used as a client.
Configuration
In this example, streaming telemetry with OcNOS is demonstrated, using 'gnmic' as the gNMI Client.
gNMI Specification can be found at: https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md
The 'gnmic' tool is available at: https://github.com/openconfig/gnmic
 
Streaming Telemetry Topology
gnmic installation
To install gnmic, use the following command:
bash -c "$(curl -sL https://get-gnmic.openconfig.net)"
To enable streaming telemetry on OcNOS:
OcNOS#configure terminal
OcNOS(config)#feature streaming-telemetry
OcNOS(config)#commit
Telemetry Subscription Request via gnmic Command and YAML Input
Use the gnmic command with a YAML file input to request telemetry subscriptions with multiple paths.
gnmic -a <ipaddress:port> -u <UserName> -p <Password> --insecure --config <path to config file> subscribe
This command establishes a telemetry subscription with the specified paths defined in the YAML file.
Telemetry Subscription Request via gnmic Command with a Single Path Option
Use the gnmic command with a single path option to request a telemetry subscription for a specific data path.
gnmic -a <ipaddress:port> -u <UserName> -p <Password> --encoding json_ietf --insecure --mode STREAM --stream-mode sample --sample-interval sample-interval-value sub --path <path>
This command creates a telemetry subscription for the specified path with the chosen sample interval and encoding format.
Supported gnmic Options
The below table explains the option fields.
gnmic Options details
Option
Description
--encoding
Specifies the encoding format (JSON_IETF).
--mode
Sets the mode of operation (STREAM).
--insecure
Allows insecure connections.
--stream-mode
Sets the stream mode (Sample).
--sample-interval
Sets the sample interval (10s).
Note: Interval should be 10s or more.
--config
Specifies the YAML configuration file path (Example: input_path.yaml).
--path
Sets the path to subscribe to specific data (Example:‘ipi:/interfaces/interface[name=ce51]/state’).
Note: For multiple paths specify each path with --path option.
--prefix
Defines a common prefix for all specified paths (Example:‘ipi:/interfaces’).
Invoking Subscribe RPC with gnmic
Use Case 1: Monitoring Interface State with Single Path Option
In this use case, gnmic subscribes to a specific path using the Subscribe RPC, monitoring the state of an interface with the path 'ipi:/interfaces/interface[name=ce51]/state'.
#gnmic -a 10.12.91.111:11162 -u ocnos -p ocnos --encoding json_ietf --insecure --mode STREAM --stream-mode sample --sample-interval 10s sub --path 'ipi:/interfaces/interface[name=ce51]/state'
 
{
"source": "10.12.91.111:11162",
"subscription-name": "default-1695368813",
"timestamp": 1551956933,
"time": "1970-01-01T05:30:01.551956933+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=ce51]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "23",
"in-octets": "2126",
"in-pkts": "23",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "28",
"out-octets": "2552",
"out-pkts": "28",
"out-unicast-pkts": "0"
},
"ifindex": 10051,
"last-change": 15500,
"logical": false,
"oper-status": "up"
}
}
}
]
}
The output of the Subscribe RPC includes the following information:
Subscribe RPC Output details
Option
Description
source
The source IP address and port of the gNMI server.
subscription-name
The name of the subscription.
timestamp
The timestamp of the response.
time
The timestamp in a human-readable format.
updates
An array of updates, each containing Path and Values.
Path
The path to the subscribed data.
values
The values of the subscribed data.
Validation
The below show command provides details about the subscriptions that have been established, including the client ID, sampling interval, encoding type, and the sensor paths that are being monitored.
OcNOS#show streaming-telemetry dynamic-subscriptions
 
Feature streaming telemetry : Enabled
 
SI: Sampling Interval in seconds
 
Enc-Type: Encoding type
 
Dial-In Subscription Details:
 
ClientIP:Port ID SI Enc-Type Origin:Path
 
------------- ------ ---- -------- ------------
 
10.12.43.165:59304 4148 10 JSON_IETF ipi:interfaces/interface[name=ce51]/state/counters
 
ipi:interfaces/interface[name=ce51]/state
Use Case 2: Monitoring Interface State with Multiple Path Option
In this use case, gnmic subscribes to a specific path using the Subscribe RPC, monitoring the state of an interface with the multiple path 'ipi:/interfaces/interface[name=ce51]/state' and 'ipi:/interfaces/interface[name=ce52]/state'.
#gnmic -a 10.12.91.111:11162 -u ocnos -p ocnos --encoding json_ietf --insecure --mode STREAM --stream-mode sample --sample-interval 11s sub --path 'ipi:/interfaces/interface[name=ce51]/state' --path 'ipi:/interfaces/interface[name=ce52]/state'
 
{
"source": "10.12.91.111:11162",
"subscription-name": "default-1695377304",
"timestamp": 1551965423,
"time": "1970-01-01T05:30:01.551965423+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=ce51]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "10",
"in-octets": "1060",
"in-pkts": "10",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "10",
"out-octets": "1020",
"out-pkts": "10",
"out-unicast-pkts": "0"
},
"ifindex": 10051,
"last-change": 22500,
"logical": false,
"oper-status": "up"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "default-1695377304",
"timestamp": 1551965423,
"time": "1970-01-01T05:30:01.551965423+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=ce52]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "13",
"in-octets": "1664",
"in-pkts": "13",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "10",
"out-octets": "1020",
"out-pkts": "10",
"out-unicast-pkts": "0"
},
"ifindex": 10052,
"last-change": 22500,
"logical": false,
"oper-status": "up"
}
}
}
]
}
Validation
The below show command provides details about the subscriptions that have been established, including the client ID, sampling interval, encoding type, and the sensor paths that are being monitored.
OcNOS#show streaming-telemetry dynamic-subscriptions
 
Feature streaming telemetry : Enabled
 
SI: Sampling Interval in seconds
 
Enc-Type: Encoding type
 
Dial-In Subscription Details:
 
ClientIP:Port ID SI Enc-Type Origin:Path
 
------------- ------ ---- -------- ------------
 
10.12.43.145:59334 42000 11 JSON_IETF ipi:interfaces/interface[name=ce52]/state/counters
ipi:interfaces/interface[name=ce52]/state
ipi:interfaces/interface[name=ce51]/state/counters
ipi:interfaces/interface[name=ce51]/state
YAML File Input for Multiple Path Subscription
Use Case 1: Configuring One Subscription Requests with Multiple Path Option
This use case illustrates the configuration of a subscription request with multiple paths using a YAML file input. It streamlines the subscription setup process by specifying the desired paths and subscription parameters directly in the YAML file.
YAML File Content (single_request.yaml)
#cat single_request.yaml
 
gnmic Command
# gnmic -a 10.12.91.111:11162 -u ocnos -p ocnos --insecure --config single_request.yaml subscribe
 
{
"source": "10.12.91.111:11162",
"subscription-name": "interface_stats_hw",
"timestamp": 1551965792,
"time": "1970-01-01T05:30:01.551965792+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=xe1]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "0",
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "2",
"out-octets": "164",
"out-pkts": "2",
"out-unicast-pkts": "0"
},
"ifindex": 10001,
"last-change": 0,
"logical": false,
"oper-status": "down"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "interface_stats_hw",
"timestamp": 1551965792,
"time": "1970-01-01T05:30:01.551965792+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=vlan1.10]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "0",
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "0",
"out-octets": "0",
"out-pkts": "0",
"out-unicast-pkts": "0"
},
"ifindex": 25010,
"last-change": 22500,
"logical": false,
"oper-status": "up"
}
}
}
]
}
 
Validation
The below show command provides details about the subscriptions that have been established, including the client ID, sampling interval, encoding type, and the sensor paths that are being monitored.
OcNOS#show streaming-telemetry dynamic-subscriptions
 
Feature streaming telemetry : Enabled
 
SI: Sampling Interval in seconds
 
Enc-Type: Encoding type
 
Dial-In Subscription Details:
 
ClientIP:Port ID SI Enc-Type Origin:Path
 
------------- ------ ---- -------- ------------
 
10.12.43.135:58208 45333 12 JSON_IETF ipi:interfaces/interface[name=xe1]/state/counters
ipi:interfaces/interface[name=xe1]/state
ipi:interfaces/interface[name=vlan1.10]/state/counters
ipi:interfaces/interface[name=vlan1.10]/state
Use Case 2: Configuring Multiple Subscription Requests with Multiple Path Option
This use case illustrates the configuration of multiple subscription request with multiple paths using a YAML file input. It streamlines the subscription setup process by specifying the desired paths and subscription parameters directly in the YAML file.
YAML File Content (multiple_subs.yaml)
#cat multiple_subs.yaml
 
gnmic Command
# gnmic -a 10.12.91.111:11162 -u ocnos -p ocnos --insecure --config multiple_subs.yaml subscribe
 
{
"source": "10.12.91.111:11162",
"subscription-name": "ram_stats_hw",
"timestamp": 1551967101,
"time": "1970-01-01T05:30:01.551967101+05:30",
"updates": [
{
"Path": "ipi:components/component[name=RAM]/ram/state",
"values": {
"components/component/ram/state": {
"available-high-memory": "0",
"available-memory": "14743",
"buffers": "15",
"current-process-count": 232,
"free-swap": "0",
"shared-memory": "8",
"total-high-memory": "0",
"total-memory": "16012",
"total-swap": "0",
"used-memory": "1269"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "storage_stats_hw",
"timestamp": 1551967102,
"time": "1970-01-01T05:30:01.551967102+05:30",
"updates": [
{
"Path": "ipi:components/component[name=HARD-DISK]/storage/state",
"values": {
"components/component/storage/state": {
"free-memory": "16908",
"total-memory": "30208",
"used-memory": "5020"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "power-supply_stats_hw",
"timestamp": 1551967103,
"time": "1970-01-01T05:30:01.551967103+05:30",
"updates": [
{
"Path": "ipi:components/component[name=PSU-1]/power-supply/state",
"values": {
"components/component/power-supply/state": {
"capacity": "650",
"fan1-rpm": 24288,
"operational-status": "not-present",
"output-current": "8.28",
"output-voltage": "12.07",
"power-consumption": "99",
"temperature-sensor1": "22",
"temperature-sensor2": "28",
"temperature-sensor3": "24"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "power-supply_stats_hw",
"timestamp": 1551967103,
"time": "1970-01-01T05:30:01.551967103+05:30",
"updates": [
{
"Path": "ipi:components/component[name=PSU-2]/power-supply/state",
"values": {
"components/component/power-supply/state": {
"operational-status": "running",
"temperature-sensor1": "0",
"temperature-sensor2": "0",
"temperature-sensor3": "0"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "intf-tray_stats_hw",
"timestamp": 1551967104,
"time": "1970-01-01T05:30:01.551967104+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=xe1]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "0",
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "5",
"out-octets": "410",
"out-pkts": "5",
"out-unicast-pkts": "0"
},
"ifindex": 10001,
"last-change": 0,
"logical": false,
"oper-status": "down"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "intf-tray_stats_hw",
"timestamp": 1551967104,
"time": "1970-01-01T05:30:01.551967104+05:30",
"updates": [
{
"Path": "ipi:interfaces/interface[name=vlan1.8]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "0",
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "0",
"out-octets": "0",
"out-pkts": "0",
"out-unicast-pkts": "0"
},
"ifindex": 25008,
"last-change": 22500,
"logical": false,
"oper-status": "up"
}
}
}
]
}
Validation
The below show command provides details about the subscriptions that have been established, including the client ID, sampling interval, encoding type, and the sensor paths that are being monitored.
OcNOS#show streaming-telemetry dynamic-subscriptions
 
Feature streaming telemetry : Enabled
 
SI: Sampling Interval in seconds
 
Enc-Type: Encoding type
 
Dial-In Subscription Details:
 
ClientIP:Port ID SI Enc-Type Origin:Path
 
------------- ------ ---- -------- ------------
 
10.12.43.155:58267 9453 14 JSON_IETF ipi:interfaces/interface[name=xe1]/state/counters
ipi:interfaces/interface[name=xe1]/state
ipi:interfaces/interface[name=vlan1.8]/state/counters
ipi:interfaces/interface[name=vlan1.8]/state
10.12.43.155:58114 31533 11 JSON_IETF ipi:components/component[name=RAM]/ram/state
10.12.43.155:58345 3374 12 JSON_IETF ipi:components/component[name=HARD-DISK]/storage/state
10.12.43.155:58222 35994 13 JSON_IETF ipi:components/component[name=PSU-1]/power-supply/state
ipi:components/component[name=PSU-2]/power-supply/state
Use Case 3: Configuring Multiple Subscription Requests with Prefix Option
This use case illustrates the configuration of multiple subscription request with prefix option using a YAML file input. It streamlines the subscription setup process by specifying the desired paths and subscription parameters directly in the YAML file.
YAML File Content (prefix_path.yaml)
#cat prefix_path.yaml
 
gnmic Command
# gnmic -a 10.12.91.111:11162 -u ocnos -p ocnos --insecure --config prefix_path.yaml subscribe
{
"source": "10.12.91.111:11162",
"subscription-name": "ram_stats_hw",
"timestamp": 1551968637,
"time": "1970-01-01T05:30:01.551968637+05:30",
"updates": [
{
"Path": "components/component[name=RAM]/ram/state",
"values": {
"components/component/ram/state": {
"available-high-memory": "0",
"available-memory": "14793",
"buffers": "16",
"current-process-count": 231,
"free-swap": "0",
"shared-memory": "8",
"total-high-memory": "0",
"total-memory": "16012",
"total-swap": "0",
"used-memory": "1219"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "intf-tray_stats_hw",
"timestamp": 1551968640,
"time": "1970-01-01T05:30:01.55196864+05:30",
"updates": [
{
"Path": "interfaces/interface[name=xe1]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "0",
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "9",
"out-octets": "738",
"out-pkts": "9",
"out-unicast-pkts": "0"
},
"ifindex": 10001,
"last-change": 0,
"logical": false,
"oper-status": "down"
}
}
}
]
}
 
{
"source": "10.12.91.111:11162",
"subscription-name": "intf-tray_stats_hw",
"timestamp": 1551968640,
"time": "1970-01-01T05:30:01.55196864+05:30",
"updates": [
{
"Path": "interfaces/interface[name=vlan1.8]/state",
"values": {
"interfaces/interface/state": {
"admin-status": "up",
"counters": {
"in-broadcast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-fcs-errors": "0",
"in-multicast-pkts": "0",
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"last-clear": "Never",
"out-broadcast-pkts": "0",
"out-discards": "0",
"out-errors": "0",
"out-multicast-pkts": "0",
"out-octets": "0",
"out-pkts": "0",
"out-unicast-pkts": "0"
},
"ifindex": 25008,
"last-change": 22500,
"logical": false,
"oper-status": "up"
}
}
}
]
}
Validation
The below show command provides details about the subscriptions that have been established, including the client ID, sampling interval, encoding type, and the sensor paths that are being monitored.
OcNOS#show streaming-telemetry dynamic-subscriptions
 
Feature streaming telemetry : Enabled
 
SI: Sampling Interval in seconds
 
Enc-Type: Encoding type
 
Dial-In Subscription Details:
 
ClientIP:Port ID SI Enc-Type Origin:Path
 
------------- ------ ---- -------- ------------
 
10.12.43.154:50167 32137 11 JSON_IETF ipi:components/component[name=RAM]/ram/state
 
10.12.43.154:50614 36412 14 JSON_IETF ipi:interfaces/interface[name=vlan1.8]/state/counters
ipi:interfaces/interface[name=vlan1.8]/state
ipi:interfaces/interface[name=xe1]/state/counters
ipi:interfaces/interface[name=xe1]/state
Supported Datamodel and Sensor Paths
Streaming telemetry incrementally supports all IPI datamodels, with OcNOS version 6.4.1 introducing support for two IPI datamodels listed below. Telemetry supports only operational containers and a subset of leaf attributes. The Pyang tree output below illustrates the supported containers or leaves, along with a list of supported container-level paths.
ipi-platform
+--rw components
+--ro component* [name]
+--ro name -> ../state/name
+--ro state
| +--ro name? string
| +--ro type? ipi-platform-types:cmm_component_type_t
| +--ro location? string
| +--ro mfg-name? string
| +--ro mfg-date? yang:date-and-time
| +--ro description? string
| +--ro hardware-version? string
| +--ro firmware-version? string
| +--ro software-version? string
| +--ro serial-no? string
| +--ro part-no? string
| +--ro removable? boolean
| +--ro oper-status? ipi-platform-types:cmm_component_oper_status_t
| +--ro product-name? string
| +--ro asset-tag? string
| +--ro component-additional-details* string
| +--ro parent? -> /components/component/state/name
| +--ro empty? boolean
| +--ro memory
| | +--ro available? uint64
| | +--ro utilized? uint64
| +--ro board-fru
| | +--ro board-name? string
| | +--ro board-serial-no? string
| | +--ro board-mfg-name? string
| | +--ro board-mfg-date? yang:date-and-time
| +--ro temperature
| +--ro instant? decimal64
| +--ro min? decimal64
| +--ro max? decimal64
| +--ro avg? decimal64
| +--ro interval? uint32
| +--ro sensor-name? string
| +--ro sensor-index? uint8
| +--ro alarm-status? boolean
| +--ro alarm-threshold? decimal64
| +--ro alarm-severity? cml_alarm_severity_t
| +--ro minimum-emergency-temperature? decimal64
| +--ro maximum-emergency-temperature? decimal64
| +--ro minimum-alert-temperature? decimal64
| +--ro maximum-alert-temperature? decimal64
| +--ro minimum-critical-temperature? decimal64
| +--ro maximum-critical-temperature? decimal64
+--ro cpu
| +--ro state
| +--ro cpu-1min-load-percentage? decimal64
| +--ro cpu-5min-load-percentage? decimal64
| +--ro cpu-15min-load-percentage? decimal64
| +--ro cpu-utilization? decimal64
+--ro storage
| +--ro state
| +--ro total-memory? uint64
| +--ro used-memory? uint64
| +--ro free-memory? uint64
+--ro ram
| +--ro state
| +--ro total-memory? uint64
| +--ro used-memory? uint64
| +--ro available-memory? uint64
| +--ro shared-memory? uint64
| +--ro buffers? uint64
| +--ro total-swap? uint64
| +--ro free-swap? uint64
| +--ro current-process-count? uint16
| +--ro total-high-memory? uint64
| +--ro available-high-memory? uint64
+--ro transceiver
| +--ro state
| +--ro grid-spacing? decimal64
| +--ro first-frequency? decimal64
| +--ro last-frequency? decimal64
| +--ro transceiver-temperature? decimal64
| +--ro transceiver-voltage? decimal64
+--ro power-supply
| +--ro state
| +--ro operational-status? cml_cmm_power_supply_operstatus_t
| +--ro capacity? decimal64
| +--ro power-consumption? decimal64
| +--ro input-power? decimal64
| +--ro input-voltage? decimal64
| +--ro output-voltage? decimal64
| +--ro input-current? decimal64
| +--ro output-current? decimal64
| +--ro temperature-sensor1? decimal64
| +--ro temperature-sensor2? decimal64
| +--ro temperature-sensor3? decimal64
| +--ro fan1-rpm? uint32
| +--ro fan2-rpm? uint32
| +--ro fan3-rpm? uint32
| +--ro fan4-rpm? uint32
+--ro fan
| +--ro state
| +--ro rpm? uint32
| +--ro fan-status? cml_cmm_fan_status_t
| +--ro fan-location? cml_cmm_fan_location_t
+--ro fan-tray
+--ro state
+--ro status? cml_cmm_fan_tray_status_t
ipi-interface
+--rw interfaces
+--rw interface* [name]
+--rw name -> ../config/name
+--rw config
| +--rw name? string
+--ro state
+--ro ifindex? uint32
+--ro admin-status? ipi-if-types:if_interface_admin_status_t
+--ro oper-status? ipi-if-types:if_interface_oper_status_t
+--ro last-change? yang:timeticks
+--ro logical? boolean
+--ro counters
+--ro in-octets? yang:counter64
+--ro in-pkts? yang:counter64
+--ro in-unicast-pkts? yang:counter64
+--ro in-broadcast-pkts? yang:counter64
+--ro in-multicast-pkts? yang:counter64
+--ro in-discards? yang:counter64
+--ro in-errors? yang:counter64
+--ro in-fcs-errors? yang:counter64
+--ro out-octets? yang:counter64
+--ro out-pkts? yang:counter64
+--ro out-unicast-pkts? yang:counter64
+--ro out-broadcast-pkts? yang:counter64
+--ro out-multicast-pkts? yang:counter64
+--ro out-discards? yang:counter64
+--ro out-errors? yang:counter64
+--ro last-clear? ipi-if-types:if_last_clear_time_t
Container Level Sensor Paths and Leaf Attributes
The below section lists the container level sensor paths and leaf attributes supported for telemetry.
ipi-interface
Interface State
Sensor Path
ipi:/interfaces/interface[name]/state
 
/interfaces/interface[name]/state/name
/interfaces/interface[name]/state/ifindex
/interfaces/interface[name]/state/admin-status
/interfaces/interface[name]/state/oper-status
/interfaces/interface[name]/state/last-change
/interfaces/interface[name]/state/logical
Interface Counters
Sensor Path
ipi:/interfaces/interface[name]/state/counters
 
/interfaces/interface[name]/state/counters/in-octets
/interfaces/interface[name]/state/counters/in-pkts
/interfaces/interface[name]/state/counters/in-unicast-pkts
/interfaces/interface[name]/state/counters/in-broadcast-pkts
/interfaces/interface[name]/state/counters/in-multicast-pkts
/interfaces/interface[name]/state/counters/in-discards
/interfaces/interface[name]/state/counters/in-errors
/interfaces/interface[name]/state/counters/in-fcs-errors
/interfaces/interface[name]/state/counters/out-octets
/interfaces/interface[name]/state/counters/out-pkts
/interfaces/interface[name]/state/counters/out-unicast-pkts
/interfaces/interface[name]/state/counters/out-broadcast-pkts
/interfaces/interface[name]/state/counters/out-multicast-pkts
/interfaces/interface[name]/state/counters/out-discards
/interfaces/interface[name]/state/counters/out-errors
/interfaces/interface[name]/state/counters/last-clear
ipi-platform
The paths listed below represent telemetry paths for monitoring the state of various components, including CPU, storage, RAM, power supply, fans, fan trays, and transceivers.
CPU
Sensor Path
ipi:/components/component[name]/cpu/state
 
Leaf Attributes
/components/component[name]/cpu/state/cpu-1min-load-percentage
/components/component[name]/cpu/state/cpu-5min-load-percentage
/components/component[name]/cpu/state/cpu-15min-load-percentage
/components/component[name]/cpu/state/cpu-utilization
Storage
Sensor Path
ipi:/components/component[name]/storage/state/
 
Leaf Attributes
/components/component[name]/storage/state/total-memory
/components/component[name]/storage/state/used-memory
/components/component[name]/storage/state/free-memory
RAM
Sensor Path
ipi:/components/component[name]/ram/state/
 
Leaf Attributes
/components/component[name]/ram/state/total-memory
/components/component[name]/ram/state/used-memory
/components/component[name]/ram/state/available-memory
/components/component[name]/ram/state/shared-memory
/components/component[name]/ram/state/buffers
/components/component[name]/ram/state/total-swap
/components/component[name]/ram/state/free-swap
/components/component[name]/ram/state/current-process-count
/components/component[name]/ram/state/total-high-memory
/components/component[name]/ram/state/available-high-memory
Power-Supply
Sensor Path
ipi:/components/component[name]/power-supply/state/
 
Leaf Attributes
/components/component[name]/power-supply/state/capacity
/components/component[name]/power-supply/state/power-consumption
/components/component[name]/power-supply/state/input-power
/components/component[name]/power-supply/state/input-voltage
/components/component[name]/power-supply/state/input-current
/components/component[name]/power-supply/state/output-voltage
/components/component[name]/power-supply/state/output-current
/components/component[name]/power-supply/state/operational-status
/components/component[name]/power-supply/state/fan1-rpm
/components/component[name]/power-supply/state/fan2-rpm
/components/component[name]/power-supply/state/fan3-rpm
/components/component[name]/power-supply/state/fan4-rpm
/components/component[name]/power-supply/state/temperature-sensor1
/components/component[name]/power-supply/state/temperature-sensor2
/components/component[name]/power-supply/state/temperature-sensor3
Fan
Sensor Path
ipi:/components/component[name]/fan/state/
 
Leaf Attributes
/components/component[name]/fan/state/rpm
/components/component[name]/fan/state/fan-status
/components/component[name]/fan/state/fan-location
Fan-Tray
Sensor Path
ipi:/components/component[name]/fan-tray/state/
 
Leaf Attributes
/components/component[name]/fan-tray/state/status
Transceiver
Sensor Path
ipi:/components/component[name]/transceiver/state/
 
Leaf Attributes
/components/component[name]/transceiver/state/grid-spacing
/components/component[name]/transceiver/state/first-frequency
/components/component[name]/transceiver/state/last-frequency
/components/component[name]/transceiver/state/transceiver-temperature
/components/component[name]/transceiver/state/transceiver-voltage
Platform State
Sensor Path
ipi:/components/component[name]/state/
 
Leaf Attributes
/components/component[name]/state/name
/components/component[name]/state/type
/components/component[name]/state/location
/components/component[name]/state/mfg-name
/components/component[name]/state/description
/components/component[name]/state/hardware-version
/components/component[name]/state/firmware-version
/components/component[name]/state/software-version
/components/component[name]/state/serial-no
/components/component[name]/state/part-no
/components/component[name]/state/removable
/components/component[name]/state/oper-status
/components/component[name]/state/product-name
/components/component[name]/state/asset-tag
/components/component[name]/state/component-additional-details
/components/component[name]/state/parent
/components/component[name]/state/empty
 
Sensor Path
ipi:/components/component[name]/state/memory
Leaf Attributes
/components/component[name]/state/memory/available
/components/component[name]/state/memory/utilized
 
Sensor Path
ipi:/components/component[name]/state/board-fru
Leaf Attributes
/components/component[name]/state/board-fru/board-name
/components/component[name]/state/board-fru/board-serial-no
/components/component[name]/state/board-fru/board-mfg-name
/components/component[name]/state/board-fru/board-mfg-date
 
 
Sensor Path
ipi:/components/component[name]/state/temperature
Leaf Attributes
/components/component[name]/state/temperature/instant
/components/component[name]/state/temperature/min
/components/component[name]/state/temperature/max
/components/component[name]/state/temperature/avg
/components/component[name]/state/temperature/interval
/components/component[name]/state/temperature/sensor-name
/components/component[name]/state/temperature/sensor-index
/components/component[name]/state/temperature/alarm-status
/components/component[name]/state/temperature/alarm-threshold
/components/component[name]/state/temperature/alarm-severity
/components/component[name]/state/temperature/minimum-emergency-temperature
/components/component[name]/state/temperature/maximum-emergency-temperature
/components/component[name]/state/temperature/minimum-alert-temperature
/components/component[name]/state/temperature/maximum-alert-temperature
/components/component[name]/state/temperature/minimum-critical-temperature
/components/component[name]/state/temperature/maximum-critical-temperature
Implementation Examples
Typical Use Cases
Enable Streaming Telemetry to monitor interface counters and the health of the OcNOS target device, including memory, CPU usage, fan speed, and temperature.
Use telemetry data to trigger automated network tasks based on specific conditions.
Integration with Existing Features
Streaming Telemetry can be used in conjunction with other network monitoring and management features.
New CLI Commands
The Streaming Telemetry introduces the following configuration commands.
debug cml
Use this command to enable or disable debugging information for CML streaming telemetry.
Command Syntax
debug cml enable telemetry
debug cml disable telemetry
Parameters
None
Default
By default, debugging information is disabled.
Command Mode
Exec Mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
The following example illustrates how to enable and disable the telemetry debugging information.
OcNOS#debug cml enable telemetry
OcNOS#debug cml disable telemetry
debug telemetry gnmi
Use this command to enable or disable gNMI server debugging logs with severity levels.
Command Syntax
debug telemetry gnmi (enable) (severity (debug|info|warning|error|fatal|panic|d-panic)|)
debug telemetry gnmi (disable) (severity (debug|info|warning|error|fatal|panic|d-panic)|)
Parameters
debug
Logs a message at debug level
info
Logs a message at info level
warning
Logs a message at warning level
error
Logs a message at error level
fatal
Logs a message and causes the program to exit with return code 1.
panic
Logs a message and triggers the program to generate a traceback.
d-panic
Logs at the Panic level
Default
By default, this command is disabled, and the gNMI server debugging level in the disabled state is set to the Error level.
Command Mode
Configure Mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
The following example illustrates how to enable and disable the telemetry debug logs and their corresponding show output.
OcNOS(config)#feature streaming-telemetry
OcNOS(config)#debug telemetry gnmi enable severity warning
OcNOS(config)#commit
OcNOS(config)#show running-config streaming-telemetry
!
feature streaming-telemetry
debug telemetry gnmi enable severity warning
!
OcNOS(config)#debug telemetry gnmi disable severity warning
OcNOS(config)#commit
OcNOS(config)#show running-config streaming-telemetry
!
feature streaming-telemetry
!
feature streaming-telemetry
Use this command to enable the streaming telemetry and, upon configuration, to start the gNMI server. The gNMI server initiates listening for incoming gRPC connections on port 11162.
Use the no parameter of this command to disable the streaming telemetry, It will stop the gNMI server.
Command Syntax
feature streaming-telemetry
no feature streaming-telemetry
Parameters
None
Default
By default, the streaming-telemetry feature is disabled.
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
The following example illustrates how to enable the streaming telemetry.
OcNOS#configure terminal
OcNOS(config)#feature streaming-telemetry
OcNOS(config)#commit
show running-config streaming-telemetry
Use this command to display streaming telemetry status in the running configuration.
Command Syntax
show running-config streaming-telemetry
Parameters
None
Command Mode
Exec mode and Configuration Mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
The following example shows the streaming telemetry status in the show running-config output.
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#feature streaming-telemetry
OcNOS(config)#commit
OcNOS(config)#show running-config streaming-telemetry
!
feature streaming-telemetry
!
OcNOS(config)#exit
OcNOS#show running-config streaming-telemetry
!
feature streaming-telemetry
!
show streaming-telemetry dynamic-subscriptions
Use this command to display the streaming telemetry dial-in configurations.
Command syntax
show streaming-telemetry dynamic-subscriptions
Parameters
None
Command Mode
Exec mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
The following example displays the streaming telemetry dial-in configuration output.
OcNOS#show streaming-telemetry dynamic-subscriptions
 
Feature streaming telemetry : Enabled
 
SI: Sampling Interval in seconds
 
Enc-Type: Encoding type
 
Dial-In Subscription Details:
 
ClientIP:Port ID SI Enc-Type Origin:Path
 
------------- ------ ---- -------- ------------
 
10.12.43.175:59108 12396 10 JSON_IETF ipi:interfaces/interface[name=eth0]/state/counters
 
ipi:interfaces/interface[name=eth0]/state
 
10.12.43.175:59114 6001 15 JSON_IETF ipi:components/component[name=CPU]/cpu/state
The below table explains the output fields.
 
show streaming-telemetry dynamic-subscriptions parameters output details
Field
Description
Feature streaming telemetry
Marked as “Enabled” confirms that streaming telemetry is active on the device.
Dial-In Subscription Details
Check the Dial-in subscription details.
ClientIP: Port
Verify that the client IP and port listed matches the client that should be receiving telemetry data.
SI: Sampling-interval
Confirm that the sampling interval matches the desired frequency at which data is collected and sent.
Enc-type: Encoding-type
Ensure that the encoding type (e.g., JSON_IETF) matches the expected format for telemetry data.
Origin:Path
Review the sensor paths to ensure that they correspond to the specific data sources or paths of interest.
Troubleshooting
Follow the below troubleshooting steps, to debug telemetry related issues:
Verify Collector (gnmic) Command Options: Verify the input parameters, such as the sensor path, prefix and origin “ipi:”.
Check the Encoding Method Compatibility: Check that the request conforms to the supported JSON-IETF encoding method.
Ensure Proper Connectivity: Validate the connectivity between the router and the remote management system. This involves verifying network settings, ports, firewalls, and any potential disruptions in communication.
Collector: If gnmic does not receive a response or not receiving expected response, restart the request using the “--log” option. If more verbose debug output is needed, consider adding the “--debug” option as well. The gnmic tool displays the possible cause for any error, which helps in debugging the issue.
gNMI Server: If the issue is on server side, follow the steps below to troubleshoot telemetry issues on the OcNOS target. Enable debug and verify the logs in /var/log/messages file.
1. In configure mode, enable debug with a specific severity level either “info” or “debug” level, using the following command:
debug telemetry gnmi (enable) (severity (debug|info|warning|error|fatal|panic|d-panic)|)
Note: To disable the debug telemetry, configure debug telemetry gnmi (disable) command.
2. In Exec mode, enable telemetry related debugs, using the following command:
debug cml enable telemetry
Note: To disable telemetry related debugs, configure “debug cml disable telemetry” command.
3. Collect the output of the following command to check the state of streaming telemetry:
show streaming-telemetry dynamic dynamic-subscriptions
Note: If telemetry is in “disabled” state, then telemetry feature need to enabled.
4. Collect the output of the following command to gather diagnostic information and the logs in /var/log/messages file, to triage further.
show techsupport all
Abbreviations
The following are some key abbreviations and their meanings relevant to this document:
 
Acronym
Description
JSON
JavaScript Object Notation
RPC
Remote Procedure Call
gNMI
gRPC Network Management Interface
JSON-IETF
JSON-Internet Engineering Task Force
Glossary
The following provides definitions for key terms used throughout this document.
 
Streaming Telemetry
A monitoring approach that efficiently transmits operational data from OcNOS routers to remote management systems in real-time for analysis, troubleshooting, and network monitoring.
Telemetry Data
Structured operational data generated by routers that is transmitted in real-time to external systems for analysis.
JSON-IETF
JSON-IETF is a data interchange format that follows the specifications defined by the IETF. It is a lightweight, text-based format used for representing structured data. JSON-IETF is commonly used for configuration and data exchange in various network and Internet-related protocols.
Remote Management System
An external system responsible for monitoring, managing, and analyzing data received from network devices.
Network Health
The overall condition and performance of a network, including factors like stability, resource utilization, and data flow.
Resilient Network
A network designed to withstand failures or disruptions, maintaining functionality even in challenging conditions.