Skip to content

Commit efd2ab8

Browse files
zbud-msftpull[bot]
authored andcommitted
Update telemetry.sh with threshold config (sonic-net#14615)
#### Why I did it Threshold is a new config field passed to telelemetry.go as parameter #### How I did it Add check for threshold #### How to verify it Modify telemetry.sh, systemctl restart telemetry, telemetry process has threshold of 100
1 parent f19d70f commit efd2ab8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dockers/docker-sonic-telemetry/telemetry.sh

+7
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ else
6969
TELEMETRY_ARGS+=" -v=2"
7070
fi
7171

72+
THRESHOLD_CONNECTIONS=$(echo $GNMI | jq -r '.threshold')
73+
if [[ $THRESHOLD_CONNECTIONS =~ ^[0-9]+$ ]]; then
74+
TELEMETRY_ARGS+=" --threshold $THRESHOLD_CONNECTIONS"
75+
else
76+
TELEMETRY_ARGS+=" --threshold 100"
77+
fi
78+
7279
exec /usr/sbin/telemetry ${TELEMETRY_ARGS}

0 commit comments

Comments
 (0)