Anomaly Detection (AD) xApp is used to detect the anomalous UEs present in the network.
It works with Traffic Steering xApp.

Here is the RMR communication diagram among the xApps:

Demo Video

Delivery Status

DO NOT EDIT

Only the Integration PTL should edit the delivery status table to track the release validation progress



OTFOAMNONRTRICRICPRICAPPO-DUO-CUTest ResultNotes
Deployment Artifacts

Docker Container







AD container is locally built.

xApp Descriptors








E2E FlowsTS_ANOMALY and TS_ANOMALY_ACK







Onboarding and Deployment of xApps:

The Use case involves two different xApps:
a) Traffic Steering (TS) xApp (AT&T)
b) Anomaly Detection (AD) xApp (HCL)

xApps can be cloned from nexus repository using the following command:
TS xApp:
      git clone "https://gerrit.o-ran-sc.org/r/ric-app/ts"
AD xApp:
      git clone "https://gerrit.o-ran-sc.org/r/ric-app/ad"


Currently, we are building the images locally after cloning it.
Once the Staging and  Release images are available, we can use the below commands.
Build and push the docker image for both AD xApp and TS xApp using the following:

TS xApp:
    docker build -t nexus3.o-ran-sc.org:10002/o-ran-sc/ric-app-ts:1.0.13 .
    docker push  nexus3.o-ran-sc.org:10002/o-ran-sc/ric-app-ts:1.0.13

AD xApp:
    docker build -t nexus3.o-ran-sc.org:10002/o-ran-sc/ric-app-ad:0.0.1 .
    docker push  nexus3.o-ran-sc.org:10002/o-ran-sc/ric-app-ad:0.0.1


Each of these xApps have a descriptor in their gerrit repo under the xapp-descriptor/ directory.
None of them have xapp specific controls and therefore no individual json schema.
Here are the URLs for each which can be included in HTTP POST call to onboard tool.
TS xApp:
https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ts.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD
AD xApp:
https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ad.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD

It is required to deploy TS xApp followed by AD xApp.

Preparing an xApp for onboarding:
Here we are preparing for API calls into the xApp On-Boarder by providing the locations of the xApp descriptors.
echo '{"config-file.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ts.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD" }' > onboard.ts.url
echo '{"config-file.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ad.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD" }' > onboard.ad.url

Onboarding xApps:
Invoke the API calls into the xApp On-boarder, providing it the locations of the xApp descripters.
curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.ts.url"
curl --location --request POST "http://$(hostname):32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.ad.url"

Checking the on-boarded charts:
curl --location --request GET "http://$(hostname):32080/onboard/api/v1/charts"

Deploying xApp:
Deploy the xApps by invoking the xApp Manager's API.
Note that the names of the xApp to be deployed must match with what the on-boarder has.
Once receiving the deploy API call, the xApp Manager will make API call into Helm/Kubernetes to deploy the xApp's Helm chart.
The Routing Manager is also involved if the xApp needs to process RMR messages, – it will complete the routes and send out route updates.
curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "trafficxapp"}'
curl --location --request POST "http://$(hostname):32080/appmgr/ric/v1/xapps" --header 'Content-Type: application/json' --data-raw '{"xappName": "ad"}'


Note: Use the latest Routing Manager supporting the new message types (TS_ANOMALY_UPDATE and TS_ANOMALY_ACK).

  • No labels

14 Comments

  1. Thanks vaishali. After i deploy the xApp, how can I verify that it i working?

    Do you have a flow diagram? We need to verify that all the flows are working.

  2. Hi Zhe Huang, Thanks for your queries.

    After deploying the traffic steering xApp followed by AD xApp, we will find logs as follows:

    At TS xApp end:

                  payload is [{"UEID": 12371, "MeasTimestampRF": "2020-11-17 16:14:25.140140"}]

    At AD xApp end:

                 TS_ANOMALY_ACK: {'payload': b'[{"UEID": 12371, "Me', 'payload length': 20, 'message type': 30004, 'subscription id': -1, 'transaction id': b'fdf286a628ef11ebaedd5ae437c10754', 'message state': 0, 'message status': 'RMR_OK', 'payload max size': 3136, 'meid': b'', 'message source': 'service-ricxapp-trafficxapp-rmr.ricxapp:4560', 'errno': 0}

    This shows the anomalous UEs send by AD xApp to TS xApp. TS xApp will reply with the ACK to AD xApp for that specific UE ID.

     I will update the flow diagram soon.


    1. I can't complete the flows. Once I deployed TS and AD xApps, AD is sending RMR messages but it doesn't seem that TS is receiving it.

      Can we have a debug session sometime? My schedule is open tomorrow except 3:00pm to 4:00pm EST.


      1. Hi Zhe Huang,

        Pls try with latest routing manager. 

        There is a possibility that routing manager doesn't support the new messages because of which communication is not happening.

        If this also doesn't work, we can plan a meeting.

        1. yeah I double confirmed that I am using the latest rtmgr and it includes the TS message types.

          What's the best time slot that we can meet?

  3. Hey Zhe Huang ,

     Is it only on my end or is the mentioned AD-repo empty ? 

    https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ad.git

    It seems to have only the initial-commits by Jenkins

    1. The codes are currently under review. You can find them here.

      https://gerrit.o-ran-sc.org/r/c/ric-app/ad/+/4972

  4. When will the codes be updated to allow live feeds to be coming from KPIMON to influxDB??


    ric-app-ad/ad/main.py


    def connectdb(thread=False):
    # Create a connection to InfluxDB if thread=True, otherwise it will create a dummy data instance
    global db
    global cp
    global ue_data
    if thread:
    db = DUMMY()
    else:
    ins.populatedb() # temporary method to populate db, it will be removed when data will be coming through KPIMON to influxDB

    db = DATABASE('UEData')
    db.read_data("liveUE")
    ue_data = db.data.values.tolist() # needs to be updated in future when live feed will be coming through KPIMON to influxDB
    cp = CAUSE(db)

  5. Hi


    I can deploy the AD xApp but cannot do for TS Xapp

    node-0:~> git clone "https://gerrit.o-ran-sc.org/r/ric-app/ts"
    Cloning into 'ts'...
    remote: Counting objects: 9, done
    remote: Total 396 (delta 0), reused 396 (delta 0)
    Receiving objects: 100% (396/396), 179.08 KiB | 2.21 MiB/s, done.
    Resolving deltas: 100% (187/187), done.

    node-0:~/ts/xapp-descriptor> curl --location --request POST "http://node-0.leonard-118064.fcp.emulab.net:32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.ts.url"
    {
    "errors": {
    "config-file.json_url": "'config-file.json_url' is a required property"
    },
    "message": "Input payload validation failed"

    1. Looks to me onboard.ts.url file is empty.

      Can you please check the content? 

      It should show:

      {"config-file.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ts.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD" }


      Then just to make sure the config is there:

      curl https:/'/gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ts.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD'


      By the way which ORAN-SC release did you deploy?


  6. I try to change the onboard.ts.url but the result is still the same


    {"config-file.json_url": "https://gerrit.o-ran-sc.org/r/gitweb?p=ric-app/ts.git;a=blob_plain;f=xapp-descriptor/config.json;hb=HEAD" }


    node-0:~/ts/xapp-descriptor> curl --location --request POST "http://node-0.leonard-118064.fcp.emulab.net:32080/onboard/api/v1/onboard/download" --header 'Content-Type: application/json' --data-binary "@./onboard.ts.url"
    {
    "error_source": "config-file.json",
    "error_message": "'__empty_control_section__' is a required property",
    "status": "Input payload validation failed"
    }
    node-0:~/ts/xapp-descriptor>

  7. As you can see this page was last updated last year in February, since Dawn release there is the dms_cli to onboard applications. 

    Point to local or remote helm repository where you can store charts (I use chartmuseum)


    export CHART_REPO_URL=http://0.0.0.0:8879


    Install dms_cli command:


    git clone "https://gerrit.o-ran-sc.org/r/ric-plt/appmgr"

    cd appmgr/xapp_orchestrater/dev/xapp_onboarder/

    pip3 install ./


    At this point you should have the dms_cli command available


    git clone "https://gerrit.o-ran-sc.org/r/ric-app/ts"
    cd ts/xapp-description
    dms_cli onboard --config_file_path config.json --shcema_file_path schema.json
    dms_cli install trafficxapp 1.2.1 ricxapp

    Yes the "shcema_file" typo is intentional, type it like that.


    kubectl get pods -n ricxapp 


    And you should see the TS app been deployed. good luck!

  8. Can I ask what judgment basis is used to determine the anomaly in the last line of valid.csv in the ad xapp program?