Port Utilization Telemetry

Port Utilization Telemetry

Introduction

This tutorial provides three use cases on how to create telemetry port utilization subscription, on a MDM node, a classic node (managed by NFM-P) and an SRL node in NSP.

All the use cases will include the following steps:

  1. Get the port filter identifier attribute
  2. Use the port filter identifier as an input to create port telemetry utilization subscription
  3. Verify the subscription from either GUI or Kafka

Prerequisites and Dependencies

This tutorial requires at least one model driven SROS based network element, one classic network element managed by NFM-P and an SRL based network element. All 3 nodes are managed by NSP and they have been properly configured to allow telemetry subscriptions.

Release

This tutorial has been tested with and is supported in NSP 23.4 & 23.8.

Postman

All steps in this tutorial are provided in the Port Utilization Telemetry Collection. Example responses for each request are also included.

Use Cases:

A. MDM Node Port Utilization Telemetry Collection

  1. Using the NSP restconf inventory API, retrieve all ports in the network. The result will return a list of ports in the network. an MDM port is selected among all the ports in the result.

GET
https://{{server}}:8545/restconf/data/nsp-equipment:network/network-element/hardware-component/port

Result:
{
    "nsp-equipment:port": [
        {
            "@": {
                "nsp-model:schema-nodeid": "/nsp-equipment:network/network-element/hardware-component/port",
                "nsp-model:identifier": "/nsp-equipment:network/network-element[ne-id='92.168.96.16']/hardware-component/port[component-id='shelf=1/cardSlot=1/card=1/mdaSlot=1/mda=1/port=1/1/c1']",
                "nsp-model:creation-time": "2023-07-04T17:38:22.017Z",
                "nsp-model:last-modified-time": "2023-07-04T17:38:22.017Z",
                "nsp-model:sources": [
                    "fdn:yang:nsp-network:/nsp-network:network/node[node-id='92.168.96.16']/node-root/nokia-state:state/port[port-id='1/1/c1']",
                    "fdn:yang:nsp-network:/nsp-network:network/node[node-id='92.168.96.16']/node-root/nokia-conf:configure/port[port-id='1/1/c1']",
                    "fdn:app:mdm-ami-cmodel:92.168.96.16:equipment:Equipment:/port[port-id='1/1/c1']"
                ]
            }

Note: if you want to retrieve all ports on a specific network element, use the following request:

GET
https://{{server}}:8545/restconf/data/nsp-equipment:network/network-element=35.121.98.14/hardware-component/port

2. Create telemetry subscription

Use the output of "nsp-model:identifier" attribute value from the above GET API result as an input for filter to create a telemetry for the port utilization subscription.

POST:
https://{{server}}:8545/restconf/data/md-subscription:/subscriptions/subscription

Body:
{
    "subscription": [
        {
            "name": "MDM_NE_portUtilization",
            "description": "MDM Port Utilization",
            "period": 60,
            "sync-time": "00:00",
            "state": "enabled",
            "type": "telemetry:/base/interfaces/utilization",
            "filter": "/nsp-equipment:network/network-element[ne-id='92.168.96.16']/hardware-component/port[component-id='shelf=1/cardSlot=1/card=1/mdaSlot=1/mda=1/port=1/1/c1']",
            "notification": "enabled",
            "db": "enabled"
        }
    ]
}

When the subscription is created successfully, it returns status code 201 Created.

3. Verify the port utilization subscription and view the chart

To see the port utilization subscription is created, go to NSP GUI, Insights Administrator App, in the left top corner, choose Telemetry Subscriptions, Choose Telemetry Type, "telemetry:/base/interfaces/utilization", a list of interface utilization subscriptions are listed.

telemetrySubscription

Data can be viewed in a Insight Viewer Window.

UtilizationChart

Data plotted in the Insight Viewer chart can also be retrieved through kafka messaging. To collect the kafka telemetry messages, first, retrieve the port utilization subscription notification topic by GET subscription API. In the postman collection list, there are two GET subscription APIs, one to retrieve all subscriptions in the network; one to retrieve a specific subscription with filter.

The following is the example to retrieve a specific port utilization subscription with filter is set to "MDM_NE_portUtilization" which was just created in the above step 2.

GET
https://{{server}}:8545/restconf/data/md-subscription:/subscriptions/subscription=MDM_NE_portUtilization

Result:
{
            "name": "MDM_NE_portUtilization",
            "description": "MDM Port Utilization",
            "site-selector": null,
            "filter": "/nsp-equipment:network/network-element[ne-id='92.168.96.16']/hardware-component/port[component-id='shelf=1/cardSlot=1/card=1/mdaSlot=1/mda=1/port=1/1/c1']",
            "type": "telemetry:/base/interfaces/utilization",
            "period": 60,
            "state": "enabled",
            "sync-time": "00:00",
            "db": "enabled",
            "notification": "enabled",
            "rta-notification": "disabled",
            "rta-indicator-notification": "disabled",
            "fields": [],
            "notif-topic": "ns-eg-458b1304-25f1-4f0d-bfdc-63bbfbb4c9eb",
            "client-id": "458b1304-25f1-4f0d-bfdc-63bbfbb4c9eb"
        }

The output lists a lit of subscriptions. The notification topic is the value of attribute "notif-topic".

Use the kafka command to collect the telemetry data from the above retrieved notification topic:

/opt/bitnami/kafka/bin/kafka-console-consumer.sh --bootstrap-server nspos-kafka-0.nspos-kafka-headless.default.svc.cluster.local:9192 --consumer.config /opt/bitnami/kafka/config/consumer.properties --topic ns-eg-458b1304-25f1-4f0d-bfdc-63bbfbb4c9eb

{"data":
 {"ietf-restconf:notification":
   {"eventTime":"2023-07-20T02:59:30Z",
     "nsp-kpi:real_time_kpi-event":
       {"input-utilization":0.0,
        "output-utilization":0.0,
        "received-octets":33983611126,
        "transmitted-octets":2198772905,
        "interface-id":"1/1/c1",
        "system-id":"92.168.96.16",
        "time-captured":1689821970210,
        "output-utilization-periodic":0.0,
        "time-captured-periodic":30000,
        "received-octets-periodic":4061,
        "input-utilization-periodic":0.0,
        "transmitted-octets-periodic":3941,
        "neId":"92.168.96.16",
        "kpiType":"telemetry:/base/interfaces/utilization",
        "objectId":"fdn:app:mdm-ami-cmodel:10.10.10.1:equipment:Equipment:/port[port-id='1/1/c1']",
        "dataType":1
        }
      }
   }
}

For more information about kafka notification service, please refer to NSP YANG Notification Service.

B. Classic Node Port Utilization Telemetry Collection

To create a port utilization telemetry collection for a classic node, the steps are similar to the steps described in use case A.

Ensure the node and ports have the right MIB policies enabled in NFM-P before creating a port utilization telemetry subscription.

  1. Enable port MIB policies:

Go to NFM-P GUI,

Tools->Statistics -> MIB Policies

Choose the MIB policies (default in this test case)

Go to the MIB Entry Policies tab

Choose the NE version and type, MIB Name

  • IF-MIB
  • TIMETRA-PORT-MIB

Select the above two MIB policies, click on the properties and turn the Administrative State to Up. Ensure the ports are supported for these statistics collections.

To create a port utilization subscription for classic nodes, the same steps as the MDM use case apply (use case A).

Get ports from a specific Classic NE in the network using the NSP restconf inventory API. Below is a sample port on a classic node:

GET
https://{{server}}:8545/restconf/data/nsp-equipment:network/network-element=35.121.98.14/hardware-component/port

Output:
            "@": {
                "nsp-model:schema-nodeid": "/nsp-equipment:network/network-element/hardware-component/port",
                "nsp-model:identifier": "/nsp-equipment:network/network-element[ne-id='35.121.98.14']/hardware-component/port[component-id='shelf=1/slot=1/card=1/slot=2/card=2/port=1']",
                "nsp-model:last-modified-time": "2023-07-20T17:14:04.885Z",
                "nsp-model:sources": [
                    "fdn:realm:sam:network:35.121.98.14:shelf-1:cardSlot-1:card:daughterCardSlot-2:daughterCard:port-1"
                ]
            },

The "nsp-model:identifier" attribute value for classic NE port is represented differently from the MDM node because of different models.

Copy the value of "nsp-model:identifier" and use it in the creation of port utilization telemetry subscription.

3. Create a port utilization telemetry subscription.

Use the same API, copy the "nsp-model:identifier" attribute value as an input for the filter. Once it is created successfully, status code 201 Created is returned.

POST
https://{{server}}:8545/restconf/data/md-subscription:/subscriptions/subscription

Body:
{
    "subscription": [
        {
            "name": "Classic NE14 Port2 utilization",
            "description": "Port Utilization",
            "period": 900,
            "sync-time": "00:00",
            "state": "enabled",
            "type": "telemetry:/base/interfaces/utilization",
            "filter": "/nsp-equipment:network/network-element[ne-id='35.121.98.14']/hardware-component/port[component-id='shelf=1/slot=1/card=1/slot=2/card=2/port=1']",
            "notification": "enabled",
            "db": "enabled"
        }
    ]
}

4. Data can be viewed in the Insight Admin Viewer and can be collected from the kafka topic. The procedure is the same as in use case A.

The following is the example to retrieve a specific port utilization subscription with filter is set to "Classic NE14 Port2 utilization" which was just created in the above step.

GET
https://{{server}}:8545/restconf/data/md-subscription:/subscriptions/subscription=Classic NE14 Port2 utilization

For more logging information. see the NFM-P EmsServer.log:

/opt/nsp/nfmp/server/nms/log/server/EmsServer.log:

<2023.07.24 17:42:52 375 -0400><I><vnfmp-api-mdtest-23-4-svr-db><TelemetrySubscriptionManager-processBulkSubscriptions><server.telemetry.TelemetrySubscriptionManager.register> Telemetry subscription received for name [Classic NE14 Port2 utilization], topic [ns-eg-9e201279-4ba8-42dc-b64a-d5fca4a650b2]

...

Here is a sample kafka message of port utilization data for a classic node:

/opt/bitnami/kafka/bin/kafka-console-consumer.sh --bootstrap-server nspos-kafka-0.nspos-kafka-headless.default.svc.cluster.local:9192 --consumer.config /opt/bitnami/kafka/config/consumer.properties --topic ns-eg-9e201279-4ba8-42dc-b64a-d5fca4a650b2


{"data":{"ietf-restconf:notification":
{"eventTime":"2023-07-24T17:00:14Z",
"nsp-kpi:real_time_kpi-event":{
"neId":"35.121.98.14",
"input-utilization-periodic":0.0,
"dataType":1,
"input-utilization":0.0,
"output-utilization":0.0,
"output-utilization-periodic":0.0,
"received-octets":0,
"time-captured-periodic":901158,
"received-octets-periodic":0,
"transmitted-octets":28284802,
"system-id":"35.121.98.14",
"kpiType":"telemetry:/base/interfaces/utilization",
"time-captured":1690218014116,
"interface-id":"Port 1/2/1",
"transmitted-octets-periodic":11310,
"objectId":"fdn:realm:sam:network:35.121.98.14:shelf-1:cardSlot-1:card:daughterCardSlot-2:daughterCard:port-1"
}
}
}
}

C. SRL Node Port Utilization Collection

The same procedure (use case A) is used for SRL node port utilization collection in NSP 23.8 and later. However, NSP release 23.4 and earlier, the filter attribute of the port utilization subscription must be built from different components as described later in this section.

Using the same restconf inventory API, here's a sample SRL port result:

GET
https://{{server}}:8545/restconf/data/nsp-equipment:network/network-element=92.1.153.163/hardware-component/port

Result:
{
    "nsp-equipment:port": [
        {
            "@": {
                "nsp-model:schema-nodeid": "/nsp-equipment:network/network-element/hardware-component/port",
                "nsp-model:identifier": "/nsp-equipment:network/network-element[ne-id='92.1.153.163']/hardware-component/port[component-id='shelf=1/cardSlot=1/card=1/port=ethernet-1/2']",
                "nsp-model:creation-time": "2023-08-25T15:53:13.664Z",
                "nsp-model:last-modified-time": "2023-10-08T09:58:12.132Z",
                "nsp-model:sources": [
                    "fdn:app:mdm-ami-cmodel:92.1.153.163:equipment:Equipment:/interface[name='ethernet-1/2']",
                    "fdn:yang:nsp-network:/nsp-network:network/node[node-id='92.1.153.163']/node-root/srl_nokia-platform:platform/interface[name='ethernet-1/2']"
                ]
            },

With the value of "nsp-model:identifier" as an input filter to create the port utilization subscription. Just follow the exact same procedure as use case A.

For NSP releases, prior to NSP 23.8, the filter for SRL port utilization telemetry subscription must be built using a static prefix and attributes from the port.

Using the sample port below, we can build the filter.

GET
https://{{server}}:8545/restconf/data/nsp-equipment:network/network-element=92.1.153.163/hardware-component/port

Output:
"nsp-equipment:port": [
        {
            "@": {
                "nsp-model:schema-nodeid": "/nsp-equipment:network/network-element/hardware-component/port",
                "nsp-model:identifier": "/nsp-equipment:network/network-element[ne-id='92.1.153.163']/hardware-component/port[component-id='shelf=1/cardSlot=1/card=1/port=ethernet-1/2']",
                "nsp-model:creation-time": "2023-08-25T15:53:13.664Z",
                "nsp-model:last-modified-time": "2023-09-07T00:06:32.187Z",
                "nsp-model:sources": [
                    "fdn:app:mdm-ami-cmodel:92.1.153.163:equipment:Equipment:/interface[name='ethernet-1/2']",
                    "fdn:yang:nsp-network:/nsp-network:network/node[node-id='92.1.153.163']/node-root/srl_nokia-platform:platform/interface[name='ethernet-1/2']"
                ]
            },

The filter is built with the prefix "/network-device-mgr:network-devices/network-device[name='", the IP address of the SRL followed by "/root/srl_nokia_interfaces:" and other port attributes. The following is an example of how to build the filter.

Example:

Prefix:/network-device-mgr:network-devices/network-device[name=
SRL IP address: 92.1.153.163
path:  /root/srl_nokia_interfaces
nsp-model:sources: fdn:app:mdm-ami-cmodel:92.1.153.163:equipment:Equipment:/interface[name='ethernet-1/2']
Extract the last part:  /interface[name='ethernet-1/2']

Construct the Filter:
/network-device-mgr:network-devices/network-device[name='92.1.153.163']/root/srl_nokia-interfaces:interface[name='ethernet-1/2']

Once you constructed the SRL port utilization filter, the procedure is the same as the the MDM use case.

Here's an example of how to create the SRL port utilization subscription:

POST  https://{{server}}:{{port}}/restconf/data/md-subscription:/subscriptions/subscription
Body:
{
    "subscription": [
        {
            "name": "SRL_portUtilization",
            "description": "SRL Utilization with networkDeviceMgr",
            "period": 60,
            "sync-time": "00:00",
            "state": "enabled",
            "type": "telemetry:/base/interfaces/utilization",
            "filter": "/network-device-mgr:network-devices/network-device[name='92.1.153.163']/root/srl_nokia-interfaces:interface[name='ethernet-1/2']",
            "notification": "enabled",
            "db": "enabled"
        }
    ]
}

Once the SRL port utilization filter is constructed, the rest procedure is the same as the the MDM node in use case A.

Note

For backward compatibility, the SRL port utilization filter in NSP 23.4 and earlier also work in NSP 23.8.

On this page