From 1eae1ae3e726b11c293266d81985534b3cd552d3 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 21 Mar 2018 14:13:57 +0100 Subject: [PATCH] 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 --- net/mwan3/files/usr/sbin/mwan3track | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index e8080b59c..fb72e99a3 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -117,9 +117,15 @@ main() { if [ $? -eq 0 ]; then let host_up_count++ 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 let lost++ 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 else echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}