Skip to content

1. KPM Indications

1.1 KpmXappIndicationPublisherPubData

The KpmXappIndicationPublisherPubData represents the message that contains Key Performance Metrics (KPM) indications.

These indications provide real-time performance metrics collected from E2 nodes, allowing for analysis and monitoring of network conditions.

This message is typically sent in response to an active E2 KPM subscription, delivering performance data such as throughput, PRB usage, latency, and other network metrics based on the subscription parameters defined in the request.

1.2 Examples

Warning

E2 Subscription Request must be issued first before receiving E2 KPM Indications.

Please check for KPM Subscription Request for more details.

Info

To receive a KPM Indication, the following NATS subject must be used:

e2-t.E2SM-KPIMON-INDICATION
This subject is responsible for receiving the KPM indication message, containing real-time key performance metrics from the E2 nodes.

The following Python example demonstrates how to receive a KPM Indication.

Example

Receive Kpm Indication:

# Add Accelleran xapp library
from xapp_lib import xapp_lib
# Add protobuf definitions
from xapp_lib.proto_pb2.accelleran.e2 import genXappKpm_pb2
# Add function to serialize json dict in protobuf
from google.protobuf.json_format import ParseDict

def e2sm_kpimon_indication(encoded_data):
    data = genKpmXapp_pb2.KpmXappIndicationPublisherPubData()
    data.ParseFromString(encoded_data)
    return data.E2smKpmIndicationData

msgList = [
    ("E2SM-KPIMON-INDICATION", e2sm_kpimon_indication),
]

def get_subject_list(req_id, ins_id):
    subjects = []
    for msg in msgList:
        subjects.append(
            "e2-t."
            + msg[0]
            + ".RIC_REQUESTOR="
            + str(req_id)
            + ".RIC_INSTANCE="
            + str(ins_id)
        )
    return subjects

def decoder(subject, encoded_data):
    item = [item for item in msgList if item[0] == subject and item[1] != None]
    if not item:
        logging.error(f"Subject not supported: {subject}. Cannot decode the message.")
        return None
    return dict(item)[subject](encoded_data)

def extract_subject(input_string):
    components = input_string.split(".")
    for component in components:
        for subject, _ in msgList:
            if subject in component:
                return subject
    return None

def main():

    ### Use xApp Builder to create the xApp
    builder = xapp_lib.XAppBuilder("../..", absolute=False)
    builder.metadata("core/xapp_metadata.json")
    builder.endpoints("config/xapp_endpoints.json")
    builder.config("config/xapp_config.json")
    builder.readme("README.md")
    xapp = builder.build()

    # Get xApp request id
    req_id = xapp.id
    # Get xApp instance id
    node_a_ins_id = xapp.transaction_id_gen.get()

    # E2 Subscription Request must be issued first before receiving E2 Indications
    # Please check E2 KPM Subscription Request section

    # Listen for E2 Indication responses
    e2_node_a_subjects = get_subject_list(req_id, node_a_ins_id)
    xapp.nats(endpoint="NATS_URL_5G").subscribe(e2_node_a_subjects)

    # Reception of E2 KPM Indication
    for _ in range(10):
        data = xapp.nats().recv_data()
        subject = extract_subject(data[0])
        decoded_resp = decoder(subject, data[1])
        logging.info("Received message: {data}".format(data=decoded_resp))

1.3 Schema

This section provides the JSON schema for the E2 KPM Indication, which outlines the expected structure and data types.

E2 KPM Indications schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$ref": "#/definitions/KpmXappIndicationPublisherPubData",
    "definitions": {
        "KpmXappIndicationPublisherPubData": {
            "properties": {
                "E2smKpmIndicationData": {
                    "$ref": "#/definitions/PBXAppKpmData.E2smKpmIndicationData",
                    "additionalProperties": true,
                    "description": "See E2smKpmIndicationData for detailed description of this field"
                },
                "tlpublishTime": {
                    "type": "string",
                    "description": "Contains the time of publishing in EPOCH milliseconds"
                },
                "spanContext": {
                    "type": "string",
                    "description": "Contains an opentracing spancontext",
                    "format": "binary",
                    "binaryEncoding": "base64"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Kpm Xapp Indication Publisher Pub Data",
            "description": "* Publisher : KpmXappIndicationPublisher Topic : E2SM-KPIMON-INDICATION.RIC_REQUESTOR=*.RIC_INSTANCE=* Description : This publisher will publish E2 Subscription Delete Request initiated by the XAPP to the SMKPM"
        },
        "PBE2apMsgData.GlobalE2NodeId": {
            "properties": {
                "GlobalGnbId": {
                    "$ref": "#/definitions/PBE2apMsgData.GlobalGnbId",
                    "additionalProperties": true
                },
                "OptionalGnbCuUpId": {
                    "type": "string"
                },
                "OptionalGnbDuId": {
                    "type": "string"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Global E 2 Node Id",
            "description": "*O-RAN.WG3.E2AP-v02.00 9.2.6 Global E2 Node ID"
        },
        "PBE2apMsgData.GlobalGnbId": {
            "properties": {
                "PlmnIdentity": {
                    "$ref": "#/definitions/PBE2apMsgData.PlmnIdentity",
                    "additionalProperties": true
                },
                "GnbId": {
                    "$ref": "#/definitions/PBE2apMsgData.GnbId",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Global Gnb Id"
        },
        "PBE2apMsgData.GnbId": {
            "properties": {
                "Value": {
                    "type": "integer"
                },
                "Length": {
                    "type": "integer",
                    "description": "Number of bits used in the gnbId. This may vary from 22 to 32"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Gnb Id"
        },
        "PBE2apMsgData.PlmnIdentity": {
            "properties": {
                "Data": {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Plmn Identity",
            "description": "*O-RAN.WG3.E2SM-R003-v03.00 6.2.3.1 PLMN Identity"
        },
        "PBE2apMsgData.SNssai": {
            "properties": {
                "SST": {
                    "type": "integer"
                },
                "SD": {
                    "$ref": "#/definitions/PBE2apMsgData.SNssaiSd",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "S Nssai"
        },
        "PBE2apMsgData.SNssaiSd": {
            "properties": {
                "Data": {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "S Nssai Sd"
        },
        "PBE2smKpmData.E2smKpmIndicationHeader": {
            "properties": {
                "IndicationHeaderFormats": {
                    "$ref": "#/definitions/PBE2smKpmData.IndicationHeaderFormats",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "E 2 Sm Kpm Indication Header"
        },
        "PBE2smKpmData.E2smKpmIndicationMessage": {
            "properties": {
                "IndicationMessageFormats": {
                    "$ref": "#/definitions/PBE2smKpmData.IndicationMessageFormats",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "E 2 Sm Kpm Indication Message"
        },
        "PBE2smKpmData.IndicationHeaderFormat1": {
            "properties": {
                "Timestamp": {
                    "type": "string"
                },
                "FileFormatVersion": {
                    "type": "string"
                },
                "SenderName": {
                    "type": "string"
                },
                "SenderType": {
                    "type": "string"
                },
                "VendorName": {
                    "type": "string"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Indication Header Format 1"
        },
        "PBE2smKpmData.IndicationHeaderFormats": {
            "properties": {
                "IndicationHeaderFormat1": {
                    "$ref": "#/definitions/PBE2smKpmData.IndicationHeaderFormat1",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Indication Header Formats"
        },
        "PBE2smKpmData.IndicationMessageFormat1": {
            "properties": {
                "MeasurementData": {
                    "$ref": "#/definitions/PBE2smKpmData.MeasurementData",
                    "additionalProperties": true
                },
                "MeasInfoList": {
                    "$ref": "#/definitions/PBE2smKpmData.MeasurementInfoList",
                    "additionalProperties": true
                },
                "GranularityPeriod": {
                    "type": "integer"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Indication Message Format 1"
        },
        "PBE2smKpmData.IndicationMessageFormat2": {
            "additionalProperties": true,
            "type": "object",
            "title": "Indication Message Format 2"
        },
        "PBE2smKpmData.IndicationMessageFormats": {
            "properties": {
                "IndicationMessageFormat1": {
                    "$ref": "#/definitions/PBE2smKpmData.IndicationMessageFormat1",
                    "additionalProperties": true
                },
                "IndicationMessageFormat2": {
                    "$ref": "#/definitions/PBE2smKpmData.IndicationMessageFormat2",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Indication Message Formats"
        },
        "PBE2smKpmData.LabelInfoItem": {
            "properties": {
                "MeasLabel": {
                    "$ref": "#/definitions/PBE2smKpmData.MeasurementLabel",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Label Info Item"
        },
        "PBE2smKpmData.LabelInfoList": {
            "properties": {
                "items": {
                    "items": {
                        "$ref": "#/definitions/PBE2smKpmData.LabelInfoItem"
                    },
                    "type": "array",
                    "description": "Carries max MAX_NO_OF_LABEL_INFO elements of type LabelInfoItem"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Label Info List"
        },
        "PBE2smKpmData.MeasurementData": {
            "properties": {
                "items": {
                    "items": {
                        "$ref": "#/definitions/PBE2smKpmData.MeasurementDataItem"
                    },
                    "type": "array",
                    "description": "Carries max MAX_NO_OF_MEASUREMENT_RECORD elements of type MeasurementDataItem"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Data"
        },
        "PBE2smKpmData.MeasurementDataItem": {
            "properties": {
                "MeasurementRecord": {
                    "$ref": "#/definitions/PBE2smKpmData.MeasurementRecord",
                    "additionalProperties": true
                },
                "IncompleteFlag": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Data Item"
        },
        "PBE2smKpmData.MeasurementInfoItem": {
            "properties": {
                "MeasurementType": {
                    "$ref": "#/definitions/PBE2smKpmData.MeasurementType",
                    "additionalProperties": true
                },
                "LabelInfoList": {
                    "$ref": "#/definitions/PBE2smKpmData.LabelInfoList",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Info Item"
        },
        "PBE2smKpmData.MeasurementInfoList": {
            "properties": {
                "items": {
                    "items": {
                        "$ref": "#/definitions/PBE2smKpmData.MeasurementInfoItem"
                    },
                    "type": "array",
                    "description": "Carries max MAX_NO_OF_MEASUREMENT_INFO elements of type MeasurementInfoItem"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Info List"
        },
        "PBE2smKpmData.MeasurementLabel": {
            "properties": {
                "NoLabel": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                },
                "PlmnIdentity": {
                    "$ref": "#/definitions/PBE2apMsgData.PlmnIdentity",
                    "additionalProperties": true
                },
                "SliceId": {
                    "$ref": "#/definitions/PBE2apMsgData.SNssai",
                    "additionalProperties": true
                },
                "FiveQI": {
                    "type": "integer"
                },
                "GFI": {
                    "type": "integer"
                },
                "QCI": {
                    "type": "integer"
                },
                "QciMax": {
                    "type": "integer"
                },
                "QciMin": {
                    "type": "integer"
                },
                "ArpMax": {
                    "type": "integer"
                },
                "ArpMin": {
                    "type": "integer"
                },
                "BitRateRange": {
                    "type": "integer"
                },
                "LayerMuMimo": {
                    "type": "integer"
                },
                "Sum": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                },
                "DistBinX": {
                    "type": "integer"
                },
                "DistBinY": {
                    "type": "integer"
                },
                "DistBinZ": {
                    "type": "integer"
                },
                "PreLabelOverride": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                },
                "StartEndIndication": {
                    "enum": [
                        "start",
                        "end"
                    ],
                    "type": "string",
                    "title": "Measurement Label Start End",
                    "description": "*Enumeration used in Measurement label"
                },
                "Min": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                },
                "Max": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                },
                "Avg": {
                    "enum": [
                        "Label_unknown",
                        "Label_True"
                    ],
                    "type": "string",
                    "title": "Measurement Label True Enum",
                    "description": "*Enumeration used in Measurement label"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Label"
        },
        "PBE2smKpmData.MeasurementRecord": {
            "properties": {
                "items": {
                    "items": {
                        "$ref": "#/definitions/PBE2smKpmData.MeasurementRecordItem"
                    },
                    "type": "array",
                    "description": "Carries max MAX_NO_OF_MEASUREMENT_VALUE elements of type MeasurementRecordItem"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Record"
        },
        "PBE2smKpmData.MeasurementRecordItem": {
            "properties": {
                "Integer": {
                    "type": "integer"
                },
                "Real": {
                    "type": "number"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Record Item"
        },
        "PBE2smKpmData.MeasurementType": {
            "properties": {
                "MeasId": {
                    "type": "integer"
                },
                "MeasName": {
                    "type": "string"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Measurement Type"
        },
        "PBXAppKpmData.E2smKpmIndicationData": {
            "properties": {
                "NodeId": {
                    "$ref": "#/definitions/PBE2apMsgData.GlobalE2NodeId",
                    "additionalProperties": true
                },
                "RanFunctionName": {
                    "type": "string"
                },
                "RanFunctionId": {
                    "type": "integer"
                },
                "IndicationHeader": {
                    "$ref": "#/definitions/PBE2smKpmData.E2smKpmIndicationHeader",
                    "additionalProperties": true
                },
                "IndicationMessage": {
                    "$ref": "#/definitions/PBE2smKpmData.E2smKpmIndicationMessage",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "E 2 Sm Kpm Indication Data"
        }
    }
}