Skip to content

Commit

Permalink
Update telemetry.sh with threshold config (sonic-net#14615)
Browse files Browse the repository at this point in the history
#### 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
  • Loading branch information
zbud-msft authored and pull[bot] committed Apr 25, 2024
1 parent f19d70f commit efd2ab8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dockers/docker-sonic-telemetry/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit efd2ab8

Please sign in to comment.