You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Introduction

As part of Telemetry 2.0 , a marker event system has been added to reduce grepping of log files and to improve telemetry handling performance. Following are major aspects of the marker event system:

Configuration
The XConf/DCM response TelemetryProfile definition has been extended to indicate the source of a marker for report generation is the event system. When the TelemetryProfile "type" field equals "<event>" the T2 component will not include the marker in the log file grep process. If the "type" field is set to "<event>", then the "content" field is set to the name of the component.
When the T2 component converts a TelemetryProfile to a report profile at .BulkData.Profile.{i}. it creates a Parameter.{i}. entry for each marker . The Use field is set for marker event handling by the T2 component.
Example
Existing marker with log file as the source:

"telemetryProfile": [{ 
    "header": "SYS_SH_WIFI_restart", 
     "content": "WIFI_process is not running", 
     "type": "SelfHeal.txt.0", 
     "pollingFrequency": "0" 
 }, 

Updated marker with event feed as the source; "type" and "content" field are changed:

"telemetryProfile": [{ 
  "header": "SYS_SH_WIFI_restart", 
   "content": ""com.cisco.spvtg.ccsp.wifiagent"", 
   "type": "<event>", 
   "pollingFrequency": "0" 
}, 

Processing
A shared library is used by components to send targeted marker occurrences through an event feed to the T2 component.Components using the shared library shall conditionally compile it in via #if defined(ENABLE_FEATURE_TELEMETRY2_0) in order to support platform-specific compilation.When the T2 component receives a marker event it processes the marker name and value according to the Use definition in the report profile. The T2 component will store absolute as received, accumulate, or aggregate values. Marker events are processed per report profile.
When a report is generated markers that were processed from the event feed are included in the report as specified by the report profile.


Architecture Overview

Telemetry 2.0

T2 overview

Overview of Instrumenting RDKB components with T2 shared library (commonlib) APIs:



T2.0 Common Library


•APIs for component metrics and events

t2_event_s(char*eventName, char* value)
t2_event_d(char*eventName, int value)
t2_event_f(char*eventName, double value)

TR-181 DataModel 

S.NODataModel DescriptionDataType
1Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.EnableEnable the T2 ProcessBoolean
2Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.Version

‘2.0’ : Operates only with legacy support
‘2.0.1’ : Operates with T2 report profile and legacy support

String
3Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.ConfigURLhttps://xconf.xcal.tv/loguploader/getT2SettingsString

T2 Report Profile

S.NODataModelDescriptionDataType
1Device.X_RDKCENTRAL-COM_T2.ReportProfilesValue must be a JSON configuration blobString
2Device.X_RDKCENTRAL-COM_T2.ReportProfilesMsgPackValue must be a JSON configuration blob in base 64 encoded msgpack formatString

Types of Markers

The markers are of 3 types .
1.Split based markers. 
2. Count based markers
3. TR-181 based markers.

Marker Type

Sample configuration from xconf

Description with respect to sample configuration

Count based markers 
{"header":"RF_ERROR_IPV4PingFailed","content":"Ping to IPv4 Gateway Address are failed","type":"SelfHeal.txt.0","pollingFrequency":"0"}
Expects the occurrence count of content "Ping to IPv4 Gateway Address are failed"
Split based markers
{"header":"bootuptime_ClientConnectComplete_split","content":"Client_Connect_complete:","type":"LM.txt.log","pollingFrequency":"0"}
Expects the value after content "Client_Connect_complete:"
TR-181 based markers{"header" : "CMMAC_split","content" : "Device.DeviceInfo.X_COMCAST-COM_CM_MAC","type" : "<message_bus>","pollingFrequency":"48"}Markers whose type is configured as "<message_bus>"

In T2.0,  the aim is to instrument possible number of split and count based markers from component side. These are termed as event markers. Can be classified as one more type under the classification of  markers.
Once a marker is instrumented from component side, its configuration on xconf will be changed  from the configured file name to "<event>" in   'type:' section.

Example: 

{"header":"bootuptime_ClientConnectComplete_split","content":"ccsp-lm-lite","type":<event>","pollingFrequency":"0"}

T2 Report Profiles

                        A Telemetry 2.0 Report Profile is a configuration, authored in JSON, that can be sent to any RDK device which supports Telemetry 2.0. A Report Profile contains properties that are interpreted by the CPE in order to generate and upload a telemetry report. These properties define the details of a generated report, including:

  • Scheduling (how often the report should be generated) 
  • Parameters (what key/value pairs should be in the report)   
  • Encoding (the format of the generated report)   
  • Protocol (protocol to use to send generated report)

Profiles Set Properties

Property

Type

Required

profilesarrayRequired

profiles

An array of profile objects that each defines a Telemetry 2.0 Report Profile.

profiles

  • is required
  • Type: an array of profile 

profiles Constraints

maximum number of items: the maximum number of items for this array is: 10

Profile

profile

  • is optional
  • Type: object

Profile Properties

Property

Type

Required

namestringRequired
versionHashstringRequired
valueobjectRequired

name

Name of the Profile. This is value is accessible from within the Report Profile as dataModel parameter "Profile.Name".

name

  • is optional
  • Type: string

versionHash

Unique value that is expected to change when anything within the Report Profile is changed.

versionHash

  • is optional
  • Type: string

value

The JSON representing this Report Profile.

value

  • is optional
  • Type: object (JSON object which is a T2 Report Profile)

Property

Type

Required

DescriptionstringOptional
VersionstringOptional
ProtocolstringRequired
EncodingTypestringRequired
ReportingIntervalintegerOptional
ActivationTimeOutintegerOptional
TimeReferencestringOptional
GenerateNowbooleanOptional
ParameterarrayRequired
HTTPobjectOptional
JSONEncodingobjectOptional

Description

Text describing the purpose of this Report Profile.

Description

  • is optional
  • Type: string

Version

Version of the profile. This value is opaque to the Telemetry 2 component, but can be used by server processing to indicate specifics about data available in the generated report.

Version

  • is optional
  • Type: string

Protocol

The protocol to be used for the upload of report generated by this profile.

Protocol

  • is required
  • Type: string

Protocol Constraints

enum: the value of this property must be equal to one of the following values:

Value

Explanation

"HTTP"When Protocol is equal to HTTP, an HTTP element is expected to occur within the Profile.

EncodingType

The encoding type to be used in the report generated by this profile.

EncodingType

  • is required
  • Type: string

EncodingType Constraints

enum: the value of this property must be equal to one of the following values:

Value

Explanation

"JSON"When EncodingType is equal to JSON, a JSONEncoding element is expected to occur within the Profile.

ReportingInterval

The interval, in seconds, at which this profile shall cause a report to be generated.

ReportingInterval

  • is optional
  • Type: integer

ActivationTimeOut

The amount of time, in seconds, that this profile shall remain active on the device. This is the amount of time from which the profile is received until the CPE will consider the profile to be disabled. After this time, no further reports will be generated for this report.

ActivationTimeOut

  • is optional
  • Type: integer

TimeReference

TBD. Must be value of "0001-01-01T00:00:00Z" for Telemetry 2.0.

TimeReference

  • is optional
  • Type: string

TimeReference Default Value

The default value is:

"0001-01-01T00:00:00Z"

GenerateNow

When true, indicates that the report for this Report Profile should be generated immediately upon receipt of the profile.

GenerateNow

  • is optional
  • Type: boolean

GenerateNow Default Value

The default value is:

false

Parameter

An array of objects which defines the data to be included in the generated report. Each object defines the type of data, the source of the data and an optional name to be used as the name (marker) for this data in the generated report.

Parameter

  • is required
  • Type: object[]

Parameter Type

object (Parameter Definition)

Parameter Constraints

maximum number of items: the maximum number of items for this array is: 800

HTTP

HTTP Protocol details that will be used when Protocol="HTTP".

HTTP

  • is optional
  • Type: object

HTTP Type

object 

JSONEncoding

JSON Encoding details that will be used when EncodingType="JSON".

JSONEncoding

  • is optional
  • Type: object

JSONEncoding Type

object 



  • No labels