[Telemetry] enable default service config if no config from DB (#16683)
#### Why I did it Fix issue #16533 , telemetry service exit in master and 202305 branches due to no telemetry configs in redis DB. #### How I did it Enable default config if no TELEMETRY configs from redis DB. #### How to verify it After the fix, telemetry service would work with the following two scenarios: 1. With TELEMETRY config in redis DB, load service configs from DB. 2. No TELEMETRY config in redis DB, use default service configs.
This commit is contained in:
parent
fe24c26996
commit
7e6790ab6b
@ -75,7 +75,7 @@ THRESHOLD_CONNECTIONS=$(echo $GNMI | jq -r '.threshold')
|
||||
if [[ $THRESHOLD_CONNECTIONS =~ ^[0-9]+$ ]]; then
|
||||
TELEMETRY_ARGS+=" --threshold $THRESHOLD_CONNECTIONS"
|
||||
else
|
||||
if [[ $THRESHOLD_CONNECTIONS == "null" ]]; then
|
||||
if [ -z $GNMI ] || [[ $THRESHOLD_CONNECTIONS == "null" ]]; then
|
||||
TELEMETRY_ARGS+=" --threshold 100"
|
||||
else
|
||||
echo "Incorrect threshold value, expecting positive integers" >&2
|
||||
@ -88,7 +88,7 @@ IDLE_CONN_DURATION=$(echo $GNMI | jq -r '.idle_conn_duration')
|
||||
if [[ $IDLE_CONN_DURATION =~ ^[0-9]+$ ]]; then
|
||||
TELEMETRY_ARGS+=" --idle_conn_duration $IDLE_CONN_DURATION"
|
||||
else
|
||||
if [[ $IDLE_CONN_DURATION == "null" ]]; then
|
||||
if [ -z $GNMI ] || [[ $IDLE_CONN_DURATION == "null" ]]; then
|
||||
TELEMETRY_ARGS+=" --idle_conn_duration 5"
|
||||
else
|
||||
echo "Incorrect idle_conn_duration value, expecting positive integers" >&2
|
||||
|
Reference in New Issue
Block a user