mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
net/mwan3: add logging on ping success and fail
Add logging information during state change on ping success or fail Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
committed by
Yousong Zhou
parent
b392ae5417
commit
1eae1ae3e7
@@ -117,9 +117,15 @@ main() {
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
let host_up_count++
|
let host_up_count++
|
||||||
echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
||||||
|
if [ $score -le $up ]; then
|
||||||
|
$LOG info "Check ($track_method) success for target \"$track_ip\" on interface $1 ($2)"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
let lost++
|
let lost++
|
||||||
echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
||||||
|
if [ $score -gt $up ]; then
|
||||||
|
$LOG info "Check ($track_method) failed for target \"$track_ip\" on interface $1 ($2)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
||||||
|
|||||||
Reference in New Issue
Block a user