Custom Probes Example#

In this example, we show how to change the probes on the main container in a chart. Especially with nappl, it can happen that it takes longer in larger projects, so you may want to adjust the startup delay times or switch entirely to your own or different health checks.

In practice, the probes provided by the vendor are often not suitable for production environments. nplus ships with tested alternatives, but depending on your setup, you may still need to adjust them.

You can override the probes as follows:

For example, in the instance chart:

nappl:
  probes:
    startupProbe:
      httpGet:
        path: /index.html
        port: http
      initialDelaySeconds: 60
      failureThreshold: 10
    livenessProbe:
      httpGet:
        path: /nscalealinst1/rest/configuration/sysinfo.json
        port: http
      initialDelaySeconds: 60
      timeoutSeconds: 3
      failureThreshold: 5
    readinessProbe:
      httpGet:
        path: /jmx/status
        port: http
      failureThreshold: 3

The ports are referenced by name: http, https (in zero trust mode) or tcp, as the component declares them. The example above overrides the shipped nplus probes with the original Ceyoniq probes, as they were (as of February 2026) in GitHub.

Why the shipped liveness probes often use TCP, not HTTP#

Where a component speaks HTTP, the shipped readiness probes ask HTTP — a component that answers is ready to receive traffic. The liveness probes of the Java components (rs, mon, cmis, erpcmis, ilm, webdav) check the port with TCP instead (nplus/nplus#93):

  • a TCP check answers as long as the process exists — which is the question liveness asks,
  • an HTTP check ties the restart decision to the health of a single request: under load, during garbage collection or while an internal cache rebuilds, a slow answer is not an unhealthy process. With a HTTP liveness probe that is exactly what you get: a restart loop that makes a stressed component worse.

If your operating experience shows a component hangs with its port open, switch its liveness to HTTP as above — the values allow it per component.

Files#

Download all files of this sample

build.sh#

#!/bin/bash
#
# This sample script builds the example as described. It is also used to build the test environment in our lab,
# so it should be well tested.
#

# Make sure it fails immediately, if anything goes wrong
set -e

# -- ENVironment variables:
# CHARTS: The path to the source code
# DEST: The path to the build destination
# SAMPLE: The directory of the sample
# NAME: The name of the sample, used as the .Release.Name
# KUBE_CONTEXT: The name of the kube context, used to build this sample depending on where you run it against. You might have different Environments such as lab, dev, qa, prod, demo, local, ...

# Check, if we have the source code available
if [ ! -d "$CHARTS" ]; then
    echo "ERROR Building $SAMPLE example: The Charts Sources folder is not set. Please make sure to run this script with the full Source Code available"
    exit 1
fi
if [ ! -d "$DEST" ]; then
    echo "ERROR Building $SAMPLE example: DEST folder not found."
    exit 1
fi
if [ ! -d "$CHARTS/instance" ]; then
    echo "ERROR Building $SAMPLE example: Chart Sources in $CHARTS/instance not found. Are you running this script as a subscriber?"
    exit 1
fi

# Set the Variables
SAMPLE="probes"
NAME="sample-$SAMPLE"

# Output what is happening
echo "Building $NAME"

# Create the manifest
mkdir -p $DEST/instance
helm template --debug \
     --values $SAMPLES/application/empty.yaml \
     --values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
     --values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
     --values $SAMPLES/$SAMPLE/values.yaml \
     $NAME $CHARTS/instance > $DEST/instance/$SAMPLE.yaml

values.yaml#

nappl:
  probes:
    startupProbe:
      httpGet:
        path: /index.html
        port: 8080
      initialDelaySeconds: 60
      failureThreshold: 10
    livenessProbe:
      httpGet:
        path: /nscalealinst1/rest/configuration/sysinfo.json
        port: 8080
      initialDelaySeconds: 60
      timeoutSeconds: 3
      failureThreshold: 5
    readinessProbe:
      httpGet:
        path: /jmx/status
        port: 8080
      failureThreshold: 3