From ea98a33a5169344c66654e0bbeb77fcb8dcb2285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20N=C4=9Bmec?= <josef.nemec@cesnet.cz> Date: Mon, 25 Mar 2024 12:47:08 +0100 Subject: [PATCH] Update cephpingmon.sh --- src/metric-generators/cephpingmon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metric-generators/cephpingmon.sh b/src/metric-generators/cephpingmon.sh index 7461ce5..afafc5b 100755 --- a/src/metric-generators/cephpingmon.sh +++ b/src/metric-generators/cephpingmon.sh @@ -18,7 +18,7 @@ function publish_metrics_nofrag { ping_result=$(ping -q -c4 -W 1 -s $MTU_SIZE -M do $ip) loss_percent=$(echo ${ping_result} | sed -n -e 's/^.*, \(.*\)% packet.*/\1/p') success_ratio=$(echo "scale=2 ; 1 - ${loss_percent} / 100" | bc) - LC_NUMERIC=C printf '%s{ip="%s", fragmentation="%s"} %.2f\n' \ + LC_NUMERIC=C printf '%s{endpoint_ip="%s", fragmentation="%s"} %.2f\n' \ "${METRIC_NAME}" $ip $fragmentation "${success_ratio}" done } @@ -33,7 +33,7 @@ function publish_metrics_frag { ip=$(echo $line | cut -d' ' -f1) loss_percent=$(echo $line | cut -d' ' -f5 | cut -d'/' -f3 | tr -d % | tr -d ,) success_ratio=$(echo "scale=2 ; 1 - ${loss_percent} / 100" | bc) - LC_NUMERIC=C printf '%s{ip="%s", fragmentation="%s"} %.2f\n' \ + LC_NUMERIC=C printf '%s{endpoint_ip="%s", fragmentation="%s"} %.2f\n' \ "${METRIC_NAME}" $ip $fragmentation "${success_ratio}" done <<< "$1" } -- GitLab