Skip to content

Splunk Operator: Enhancement request - use a command for the liveness probe instead of a URL #1431

Closed

Description

@gjanders

Please select the type of request

Bug

Tell us more

Describe the request
Currently the liveness probe uses port 8089 to check the health status of the splunk process. In a busy indexer running smartstore downloads it may fail to respond within 30 seconds, however, this is normal behaviour so I've made the failure thresholds very large.

However, I believe there is a safer way to check the Splunk process is alive and healthy.

As an example this is a failed indexer:
Liveness probe failed: Mgmt. port is not reachable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 8089: Connection refused

(killed by the OOM killer)

This indexer is busy but will recover:
Liveness probe failed: command "/mnt/probes/livenessProbe.sh" timed out

Expected behavior
I'd suggest using a command:
/opt/splunk/bin/splunk status

I checked inside the pod and if successful you get a 0, if down you get a 3:

$ /opt/splunk/bin/splunk status
splunkd is not running.
[splunk@001 /opt/splunk]
$ echo $?
3

A running splunk instance shows a return code of 0 , the K8s docs https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ mention that non-zero is failure.

Reproduction/Testing steps
Stop the splunk instance inside the pod

K8s environment
K8s 1.28

Proposed changes(optional)
As per expected behaviour, switch the liveness probe to:
/opt/splunk/bin/splunk status

Activity

  1. michal-tatusko-splunk commented on Apr 10, 2025

    @michal-tatusko-splunk

    This issue is connected to #1078 and CSPL-2432 (SOK team internal Jira id).

  2. gjanders commented on Jul 4, 2026

    @gjanders
    ContributorAuthor

    Issue Splunk Operator: Allow custom probes or changes to existing probes
    #1321 and pull request #1549 may have resolved this. I will try to test this next week.

  3. kasiakoziol commented on Aug 12, 2026

    @kasiakoziol
    Collaborator

    Hello @gjanders
    Did you have a chance to test it? If it is working as expected, could we close the issue?
    Thanks,
    Kasia

  4. gjanders commented on Aug 12, 2026

    @gjanders
    ContributorAuthor

    I can confirm this is working. I can now run a simple splunk status command, and based on the output I can return the exit code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions