X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-aux%2Fhelm%2Fmrsub%2Fresources%2Fmrsub.sh;h=9992193ede8c22058cb89b0911cb3e2efadabd20;hb=3fdbdbb3159139ed8dbcca663824486eaf2f216d;hp=27439512c1a34a804133785357f12c06dc17a3d1;hpb=a86df57862bec68eb7a9a01f59ee13501e70b7f8;p=it%2Fdep.git diff --git a/ric-aux/helm/mrsub/resources/mrsub.sh b/ric-aux/helm/mrsub/resources/mrsub.sh index 27439512..9992193e 100644 --- a/ric-aux/helm/mrsub/resources/mrsub.sh +++ b/ric-aux/helm/mrsub/resources/mrsub.sh @@ -4,7 +4,7 @@ MR_HOSTPORT="$_MR_HOSTPORT" MR_TOPIC="$_MR_TOPIC" LOGSTASH_URL="$_LOGSTASH_URL" -if ! jq --version > /dev/null 2&>1 ; then +if ! jq --version > /dev/null 2>&1 ; then apt-get update apt-get install -y jq curl fi @@ -30,8 +30,8 @@ while true; do DATA=$(echo $DATA |jq -r --arg source "$source" '.[] | $source+","+((.event.measurementsForVfScalingFields.additionalFields[1].value) | tostring)+ ","+ ((.event.measurementsForVfScalingFields.additionalFields[2].value) | tostring)') #EVENTS=$(echo $DATA |jq -r '.event.measurementFields.additionalFields.SgNBRequestRate') #for EVENT in $EVENTS; do - elif [ "$source" == "AC xAPP" ] - then + elif [ "$source" == "AC xAPP" ] + then DATA=$(echo $DATA |jq -r --arg source "$source" '.[] | $source+","+((.event.measurementsForVfScalingFields.additionalFields[0].value) | tostring)') else DATA="No supportive reporting entity provided" @@ -40,4 +40,3 @@ while true; do curl -i -XPUT "${LOGSTASH_URL}" -d "${DATA}" #done done -