Skip to content

Commit d295a26

Browse files
authored
add btool check for HTTPS on health check (#488)
Not all methods of disabling HTTPS on the API will set the SPLUNKD_SSL_ENABLE flag, which would then cause this health check to fail, and the container to restart. This change checks the effective enableSplunkdSSL value in server.conf, which is set to "false" if defaults.yml has ssl.enable set to 0.
1 parent 569be47 commit d295a26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

splunk/common-files/checkstate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# health results
2424

2525
if [[ "" == "$NO_HEALTHCHECK" ]]; then
26-
if [[ "false" == "$SPLUNKD_SSL_ENABLE" ]]; then
26+
if [[ "false" == "$SPLUNKD_SSL_ENABLE" || "false" == "$(/opt/splunk/bin/splunk btool server list | grep enableSplunkdSSL | cut -d\ -f 3)" ]]; then
2727
SCHEME="http"
2828
else
2929
SCHEME="https"

0 commit comments

Comments
 (0)