Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Table of Contents

Required equipment's

...

...

  • Raspberry pi device

  • Ethernet cable

  • SD card

  • Standard USB keyboard

  • TV/Monitor with HDMI input

Telemetry

...

...

Telemetry is the automatic recording and transmission of data from remote or inaccessible sources to an IT system in a different location for monitoring and analysis.

Telemetry Components

...


...

  • Xconf Server
  • Rpi Board with RDK Broadband image
  • Tftp Server

Steps to build

...

code 

...

  • repo init -u https://code.rdkcentral.com/r/manifests -b rdk-next -m rdkb-extsrc.xml
  • repo sync -j4 --no-clone-bundle
  • source meta-cmf-raspberrypi/setup-environment
  • choose option 8: meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband.conf
  • bitbake rdk-generic-broadband-image

Steps to flash image

...


...

  • The image will be available under build-raspberrypi-rdk-broadband/tmp/deploy/images/raspberrypi-rdk-broadband
  • Copy the image rdkb-generic-broadband-image_default_<xx>.rootfs.rpi-sdimg to your server.
  • To flash the image
        dmesg
        mount
        umount <partition-mountpoint>
        sudo dd if=<rpi sdimg> of=/dev/sdb bs=1M
  • Remove the SD card and insert it to the Raspberry Pi SD card slot
  • Bring up the device

Xconf server

...

...

Define Environments   

       

...

         URL : http://35.155.171.121:9093/admin/ux/#/environment/all
                 Flow : Xconf-server -> Common -> Environments

                                             2. 

Define Models 

                              URL : http://35.155.171.121:9093/admin/ux/#/model/all
                            Flow : Xconf-server -> Common -> Models

                           

Define MAC List

                 3.   Define MAC List
                         URL : http://35.155.171.121:9093/admin/ux/#/namespacedlist/MAC_LIST
                         Flow : Xconf-server -> Common -> MAC Lists -> Select the Id -> Add your MAC                            

Configuring Telemetry on Xconf server

...


...

Log upload

  • Change Application to stb in top right corner of the window

         
  • Defining the formula

...

  • As soon as the formula is saved , displays the device settings and Log upload settings options
       
  • Device settings

    Name

    RDKB_telemetry

    CheckOnReboot

    true

    Are active

    true

    Expression

    2 1 2 1 1

      

    Defining the Upload repositories

    URL

    http://35.155.171.121:9093/admin/ux/#/uploadrepository

    Flow

    Xconf-server ->DCM -> Upload repositories

    Name

    RDKB_telemetry

    Description

    RDKB_telemetry

    URL

    tftp    : 35.155.171.121

    HTTP :  http://35.155.171.121/xconf/logupload.php

    Log upload settings

    Name

    <Enter the name given during Log upload formula creation>

    Upload On Reboot

    true

    Number of Days

    1

    Are settings active

    true

    Upload Repository

    RDKB_telemetry

    Cron Expression

    2 1 1 1 1

    Test Page

    URL

    http://35.155.171.121:9093/admin/ux/#/formulas/all

    Path

    Xconf-server-> DCM -> Test Page

          

Telemetry

Defining Telemetry profile

...

           HTTP   
          

Configuring more

...

entries to a profile

...

  • Go to Telemetry -> Permanent Profile
  • Under “Telemetry Profile entries” add your new required markers

...

  • Save
  • In Rpi , make sure that you stopped the rdkbLogMontior service , in order to stop the log rotation process (systemctl stop rdkbLogMonitor)
  • Now restart the dcm-log service using systemctl restart dcm-log
  • With successful response , tar file and JSON file gets uploaded to the xconf-server
  • Open the upload JSON file in the browser
  • We could see the profile entries with the number of times the specified marker has appeared in the file.

    Sample:

    {"searchResult":[{"Firewall":"1"},{"Wifihealth_1":"2"},{"Wifihealth_2":"2"},{"Profile":"RDKB"},{"mac":"B8:27:EB:22:16:36"},{"erouterIpv4":"192.168.30.125"},{"erouterIpv6":"null"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_default_20200224150713"},{"Time":"2020-02-26 12:23:51"}]}


    NOTE : JSON file holds only the number of times the particular marker has appeared in the respective log file. To see the complete log file, need to download the tar file uploaded and extract the files to see the complete logs or value of the parameters

Observations :

  • Pushing script from XConf

Currently pushing the script from xconf to the target device is not possible due to the security issue , as it may lead to downloading the licensed file to the vulnerable device. The pushing may also lead to removal of file from rootfs , so this is not advised to do for now. Whereas , we can initiate the download from device through tftp/curl command either from the script or from console.

  • telemetry target type

 Target type is provided to handle dynamic parameters change . We have 4 target types .

         1.  # 0 if as part of normal execution

         2.  # 1 if initiated due to an XCONF update

        3.  # 2 if forced execution before log upload

        4.  # 3 if modify the cron schedule 

During boot-up or service start , target type update will be initiated .

On each initiation , Whenever it finds the markers in the log files , it provides the search results with marker details , when it doesn't find , it just provides the basic RDKB profile details(without markers). It all depends on the markers availability in the log files.

Currently Type 1 and 2 are supported .

  • Empty JSON message

On having the Schedule type in DCM either as "ActNow" or "CronExpression" , with the expression in schedule under telemetry profile . JSON messages are seen with generic RDKB profile details on every 5 min / 10 mins (Expression : /5 * * * *  or */10 * * * * ) . Once in a day uploads JSON with markers to the server .

This is seen due to the schedule expression . As a workaround , we can give the schedule in numbers (Example : 2 / 5 / 10)

The ticket is in place to implement the cron expression support in RPi. Once it is in place , the empty JSON messages will not be seen .