From 06973e1d237e338ec6ca59e50662c7901bd9fc51 Mon Sep 17 00:00:00 2001 From: Anwesha Das Date: Tue, 24 May 2022 12:03:28 +0200 Subject: Updates code to include IPaddr in fail msg --- scripts/monitor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/monitor.sh b/scripts/monitor.sh index bb82877..cd4d417 100755 --- a/scripts/monitor.sh +++ b/scripts/monitor.sh @@ -11,7 +11,7 @@ function check_dns_ping() { ip_addr=$(echo $response | tail -1 | cut -d' ' -f 2) ping -c 1 $ip_addr if [ $? -ne 0 ]; then - msg="$(date +"%y-%m-%d %H:%M:%S %Z") Failure: Can not reach IPv4" + msg="$(date +"%y-%m-%d %H:%M:%S %Z") Failure: Can not reach IPv4 $ip_addr" full_msg="$msg $response" fail "$full_msg" fi @@ -23,7 +23,7 @@ function check_ipv6_dns_ping() { ip_addr=$(echo $response | tail -1 | cut -d' ' -f 2) ping -c 1 $ip_addr if [ $? -ne 0 ]; then - msg="$(date +"%y-%m-%d %H:%M:%S %Z") Failure: Can not reach IPv4" + msg="$(date +"%y-%m-%d %H:%M:%S %Z") Failure: Can not reach IPv6 $ip_addr" full_msg="$msg $response" fail "$full_msg" fi -- cgit v1.2.3