ytyou / ticktock

TickTockDB is an OpenTSDB-like time series database, with much better performance.
GNU General Public License v3.0
72 stars 8 forks source link

change healthcheck.sh to return a message #59

Closed juggledad closed 9 months ago

juggledad commented 9 months ago

currently healthcheck.sh exits with a 0 or 1. Might I suggest adding an 'echo' to see the result, For example:

#!/bin/bash
#
# ping ticktock server

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. $DIR/common.sh

RESPONSE=`$CURL -XPOST "http://$HOST:$PORT/api/admin?cmd=ping"`

# exit 0 means healthy; exit 1 means unhealthy;
if [[ $RESPONSE == "pong" ]]; then
    echo "ticktock running"
    exit 0
else
    echo "ticktock down"
    exit 1
fi
ylin30 commented 9 months ago

sure thing. PR is up.

thx

juggledad commented 9 months ago

Oh good, I've contributed (grin) and thoughts about my last post in theh other issue?

juggledad commented 9 months ago

closing