HTTP REST Api endpoint health - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki

  • /health

    • Available since: Version 9.1.2
    • Liveness probe endpoint. Confirms the bridge process is running and able to serve requests.
    • Intended for use by container orchestration platforms (Kubernetes, OpenShift) as a livenessProbe or readinessProbe, and can also be polled by monitoring tools or load balancers.
    • Does not perform any backend connectivity check (e.g. does not verify that the IBM Storage Scale performance monitoring collector is reachable).
    • No authentication is required, even when basic authentication is globally enabled for the bridge.
    • When the bridge is configured to use HTTPS, the /health endpoint is also served over HTTPS on the same port. Use scheme: HTTPS in the Kubernetes probe definition and disable certificate verification if using a self-signed certificate.
    • Optional query parameter details (default: false). With details=true the response additionally contains process-level and container-level resource usage of the bridge (see Detailed output). Any other value returns the short {"status": "ok"} response.

Example output:

# curl http://10.88.0.178:4242/health
{"status": "ok"}

When HTTPS is enabled:

# curl -k https://10.88.0.178:8443/health
{"status": "ok"}

Detailed output (details=true):

The response contains status plus the following fields. Fields that cannot be determined on the current system are omitted.

Field Description
pid Process ID of the bridge
memory.rss_mb Resident set size of the bridge process in MB (from /proc/<pid>/status)
memory.limit_mb Container memory limit in MB (cgroups v2 memory.max); omitted if there is no limit or not running in a container
memory.used_mb Current container memory usage in MB (cgroups v2 memory.current)
cpu.threads Number of threads of the bridge process (from /proc/<pid>/status)
cpu.quota_cores Container CPU quota in cores (cgroups v2 cpu.max, quota/period); omitted if there is no limit
cpu.raw Raw content of cgroups v2 cpu.max (e.g. max 100000 or 200000 100000)
psutil.cpu_percent CPU utilization of the process, sampled over 0.1 s (only if the psutil Python package is installed)
psutil.memory_percent Share of system memory used by the process in percent (only if psutil is installed)
psutil.open_fds Number of open file descriptors (only if psutil is installed; not available on Windows)

Note: Process and container values are read from /proc and /sys/fs/cgroup and are therefore available on Linux only. The psutil block is optional. Since collecting psutil.cpu_percent takes about 0.1 s, use the plain /health request for liveness/readiness probes and details=true for troubleshooting.

Example output:

# curl "http://10.88.0.178:4242/health?details=true" | jq .
{
  "status": "ok",
  "pid": 1,
  "memory": {
    "rss_mb": 74.3,
    "limit_mb": 512.0,
    "used_mb": 118.6
  },
  "cpu": {
    "threads": 12,
    "quota_cores": 2.0,
    "raw": "200000 100000"
  },
  "psutil": {
    "cpu_percent": 0.5,
    "memory_percent": 0.46,
    "open_fds": 23
  }
}

Kubernetes / OpenShift probe definition example:

When the bridge is running with HTTP (default):

livenessProbe:
  httpGet:
    path: /health
    port: 4242
  initialDelaySeconds: 10
  periodSeconds: 30
  failureThreshold: 3

When the bridge is running with HTTPS:

livenessProbe:
  httpGet:
    path: /health
    port: 8443
    scheme: HTTPS
  initialDelaySeconds: 10
  periodSeconds: 30
  failureThreshold: 3

Note: If the bridge uses a self-signed certificate, the kubelet performing the probe does not verify the certificate by default � the probe will succeed regardless of the certificate's trust chain.

⚠️ **GitHub.com Fallback** ⚠️