sonic-telemetry icon indicating copy to clipboard operation
sonic-telemetry copied to clipboard

Add dataset "device syslog" to non-db client (POC)

Open d-etienne opened this issue 3 years ago • 2 comments

sonic-data-client/non-db client: This PR aims to enable the streaming telemetry container to stream out the system logs from the SONiC Host. This dataset is added into non-database client since syslog messages are generated quite frequently.

  • Added syslog dataset path device/syslog
  • Added syslog data gathering function getDeviceSyslog()
  • Added On-Change functionality for the syslog data set

Need To Do:

  • Add the ability to identify whether the query that is being made by the client is actually a syslog query. Currently if the on-stream function is being used then the port will be opened

  • Add ability to identify how many subscribers are currently subscribed to the syslog data set. Currently the functionality is that when the subscriber cancels the subscription the port will close (This enables multiple clients to subscribe to this data set)

  • Add ability to compare the messages in a way that does not cause a massive delay when having two large messages. Currently, the messages are not being compared but rather all messages received through the port are placed within the linked list.

  • Adjust the functionality of polling and sampling queries for the syslog data set. As they no longer work with the changes that have been made to support on-change streaming mode

doc: Added design document for the SONiC telemetry syslog pipeline describing implementation

How To Test: We can use the command ./gnmi_cli -client_types=gnmi -a <DuT_IP>:8080 -t OTHERS -logtostderr -insecure -qt s -streaming_type ON_CHANGE -q device/syslog

Unit Tests will be added in a future iteration.

Signed-off-by: Daijah Etienne [email protected]

d-etienne avatar Jul 26 '21 23:07 d-etienne

CLA assistant check
All CLA requirements met.

ghost avatar Jul 26 '21 23:07 ghost

Please post test result. And also need to setup test case with constant syslog flow to test the timing in the pubsub to the storagebuffer.

hui-ma avatar Aug 19 '21 23:08 hui-ma