From ced409e893cbc57a4f41013216105019f2292a09 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Fri, 4 May 2018 10:34:31 -0500 Subject: [PATCH] fix logging --- container_files/bin/sendtierbeacon.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/container_files/bin/sendtierbeacon.sh b/container_files/bin/sendtierbeacon.sh index f00684e..db5781d 100644 --- a/container_files/bin/sendtierbeacon.sh +++ b/container_files/bin/sendtierbeacon.sh @@ -16,10 +16,15 @@ if [ -z "$TIER_BEACON_OPT_OUT" ]; then #send JSON echo $LOGTEXT > msgjson.txt curl -s -XPOST "${LOGHOST}:${LOGPORT}/" -H 'Content-Type: application/json' -T msgjson.txt 1>/dev/null + if [ $? -eq 0 ]; then + echo "tier_beacon;none;$ENV;$USERTOKEN;"`date`"; TIER beacon sent" + else + echo "tier_beacon;none;$ENV;$USERTOKEN;"`date`"; Failed to send TIER beacon" + fi + rm -f msgjson.txt #below is for syslog, F-TICKS style #`logger -n $LOGHOST -P $LOGPORT -t TIERBEACON $LOGTEXT` - echo `date`"; TIER beacon sent." -fi \ No newline at end of file +fi