Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions splunk/common-files/checkstate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@
#NOTE: If you plan on running the splunk container while keeping Splunk
# inactive for long periods of time, this script may give misleading
# health results

if [[ "" == "$NO_HEALTHCHECK" ]]; then
if [[ "false" == "$SPLUNKD_SSL_ENABLE" ]]; then
SCHEME="http"
else
SCHEME="https"
fi
#If NO_HEALTHCHECK is NOT defined, then we want the healthcheck
state="$(< $CONTAINER_ARTIFACT_DIR/splunk-container.state)"

case "$state" in
running|started)
if [[ "false" != "$SPLUNKD_SSL_ENABLE" ]]; then
curl -m 30 -f -k https://localhost:8089/
else
curl -m 30 -f -k http://localhost:8089/
curl -m 30 -f -k $SCHEME://localhost:8089/
exit $?
;;
*)
Expand Down