RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Table of Contents |
---|
...
...
Raspberry pi device
Ethernet cable
SD card
Standard USB keyboard
TV/Monitor with HDMI input
...
...
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.
...
...
...
...
...
...
...
...
...
URL : http://35.155.171.121:9093/admin/ux/#/environment/all
Flow : Xconf-server -> Common -> Environments
2.
URL : http://35.155.171.121:9093/admin/ux/#/model/all
Flow : Xconf-server -> Common -> Models
3.
URL : http://35.155.171.121:9093/admin/ux/#/namespacedlist/MAC_LIST
Flow : Xconf-server -> Common -> MAC Lists -> Select the Id -> Add your MAC
...
...
URL | |||
Flow | Xconf-server ->DCM -> Formulas -> Create | ||
Name | <Unique name for log upload > | ||
Description | <Enter a short description> | ||
Percentage | 100 | Priority | 4 |
Build condition | estbMacAddress is <MAC-Address> |
...
Sample
Name | RDKB_telemetry |
CheckOnReboot | true |
Are active | true |
Expression | 2 1 2 1 1 |
URL | |
Flow | Xconf-server ->DCM -> Upload repositories |
Name | RDKB_telemetry |
Description | RDKB_telemetry |
URL | tftp : 35.155.171.121 |
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 |
URL | |
Path | Xconf-server-> DCM -> Test Page |
URL | |
Path | Xconf-server-> Telemetry->Permanent Profiles -> Create |
...
Sample :
URL | |
Path | Xconf-server-> Telemetry->Targeting rule -> Create |
...
Sample
URL | |
Path | Xconf-server-> Telemetry->Test Page |
...
Sample:
...
...
1. CURL
Sample: 1 TFTP root@RaspberryPi-Gateway:~# ifconfig erouter0 root@RaspberryPi-Gateway:~# curl -i 'http://35.155.171.121:9092/loguploader/getSettings?estbMacAddress=B8:27:EB:22:16:36' Date: Fri, 31 Jan 2020 10:59:09 GMT {"urn:settings:GroupName":"RDKB_telemetry","urn:settings:CheckOnReboot":true,"urn:settings:CheckSchedule:cron":"2 1 2 1 1","urn:settings:CheckSchedule:DurationMinutes":0,"urn:settings:LogUploadSettings:Message":null,"urn:settings:LogUploadSettings:Name":"RDKB_telemetry","urn:settings:LogUploadSettings:NumberOfDays":0,"urn:settings:LogUploadSettings:UploadRepositoryName":"RDKB_telemetry","urn:settings:LogUploadSettings:RepositoryURL":"tftp://35.155.171.121","urn:settings:LogUploadSettings:UploadOnReboot":true,"urn:settings:LogUploadSettings:UploadImmediately":false,"urn:settings:LogUploadSettings:upload":true,"urn:settings:LogUploadSettings:UploadSchedule:cron":"2 1 1 1 1","urn:settings:LogUploadSettings:UploadSchedule:levelone:cron":null,"urn:settings:LogUploadSettings:UploadSchedule:leveltwo:cron":null,"urn:settings:LogUploadSettings:UploadSchedule:levelthree:cron":null,"urn:settings:LogUploadSettings:UploadSchedule:DurationMinutes":0,"urn:settings:VODSettings:Name":null,"urn:settings:VODSettings:LocationsURL":null,"urn:settings:VODSettings:SRMIPList":null,"urn:settings:TelemetryProfile":{"id":"72ac2ca9-b248-4a5e-b120-27ff37382564","telemetryProfile":[{"header":"Firewall","content":"starting firewall service","type":"FirewallDebug.txt","pollingFrequency":"1"}],"schedule":"3","expires":0,"telemetryProfile:name":"RDKB_tele","uploadRepository:URL":"35.155.171.121","uploadRepository:uploadProtocol":"TFTP"}} Sample: 2 HTTP root@RaspberryPi-Gateway:~# curl -i 'http://35.155.171.121:9092/loguploader/getSettings?estbMacAddress=B8:27:EB:22:16:36' Date: Fri, 31 Jan 2020 12:15:26 GMT {"urn:settings:GroupName":"RDKB_telemetry","urn:settings:CheckOnReboot":true,"urn:settings:CheckSchedule:cron":"2 1 2 1 1","urn:settings:CheckSchedule:DurationMinutes":0,"urn:settings:LogUploadSettings:Message":null,"urn:settings:LogUploadSettings:Name":"RDKB_telemetry","urn:settings:LogUploadSettings:NumberOfDays":0,"urn:settings:LogUploadSettings:UploadRepositoryName":"RDKB_telemetry","urn:settings:LogUploadSettings:RepositoryURL":"http://35.155.171.121/xconf/logupload.php","urn:settings:LogUploadSettings:UploadOnReboot":true,"urn:settings:LogUploadSettings:UploadImmediately":false,"urn:settings:LogUploadSettings:upload":true,"urn:settings:LogUploadSettings:UploadSchedule:cron":"2 1 1 1 1","urn:settings:LogUploadSettings:UploadSchedule:levelone:cron":null,"urn:settings:LogUploadSettings:UploadSchedule:leveltwo:cron":null,"urn:settings:LogUploadSettings:UploadSchedule:levelthree:cron":null,"urn:settings:LogUploadSettings:UploadSchedule:DurationMinutes":0,"urn:settings:VODSettings:Name":null,"urn:settings:VODSettings:LocationsURL":null,"urn:settings:VODSettings:SRMIPList":null,"urn:settings:TelemetryProfile":{"id":"72ac2ca9-b248-4a5e-b120-27ff37382564","telemetryProfile":[{"header":"Firewall","content":"starting firewall service","type":"FirewallDebug.txt","pollingFrequency":"1"}],"schedule":"3","expires":0,"telemetryProfile:name":"RDKB_tele","uploadRepository:URL":"http://35.155.171.121/xconf/telemetry_upload.php","uploadRepository:uploadProtocol":"HTTP"}} |
2. Configuration file
Sample 1: tftp urn:settings:GroupName=RDKB_telemetry Sample 2: http root@RaspberryPi-Gateway:~# cat /tmp/DCMSettings.conf urn:settings:GroupName=RDKB_telemetry |
3. Logs
4. Xconf-Server
HTTP
...
...
...
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
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.
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 .
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 .