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:
parent
802a5cff19
commit
e9a9c9e31f
@ -69,4 +69,11 @@ else
|
|||||||
TELEMETRY_ARGS+=" -v=2"
|
TELEMETRY_ARGS+=" -v=2"
|
||||||
fi
|
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}
|
exec /usr/sbin/telemetry ${TELEMETRY_ARGS}
|
||||||
|
Reference in New Issue
Block a user