Update telemetry.sh with threshold config (#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
This commit is contained in:
Zain Budhwani 2023-04-18 14:29:30 -07:00 committed by GitHub
parent 802a5cff19
commit e9a9c9e31f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,4 +69,11 @@ else
TELEMETRY_ARGS+=" -v=2"
fi
THRESHOLD_CONNECTIONS=$(echo $GNMI | jq -r '.threshold')
if [[ $THRESHOLD_CONNECTIONS =~ ^[0-9]+$ ]]; then
TELEMETRY_ARGS+=" --threshold $THRESHOLD_CONNECTIONS"
else
TELEMETRY_ARGS+=" --threshold 100"
fi
exec /usr/sbin/telemetry ${TELEMETRY_ARGS}