Bash
public
Redis PING
Share this script safely, inspect its metadata, and copy the exact command you need.
Ready to run
One-liner
curl -fsSL https://runny.sh/r/TWVWG55D3MHB | bash
Current version: 1.1 · Updated by Godmode · 2026-09-07 02:38:59.319
At a glance
Script metadata
Readable before runnable
Preview
#!/usr/bin/env bash
# Redis ping
# Read-only: redis-cli ping. Does not FLUSH, SET, or write keys.
# Exit 0 on PONG, 1 if redis-cli is missing, 2 if the ping fails.
# Hosted on Runny.sh. Review the script page before you run it.
set -u
note() { printf '%s\n' "$*"; }
note "=== Redis ping ==="
if ! command -v redis-cli >/dev/null 2>&1; then
note "redis-cli not found in PATH"
note "Result: WARNING"
exit 1
fi
note "Client: $(redis-cli --version 2>/dev/null || printf unknown)"
note "Args: ${*:-<defaults>}"
note ""
out=$(redis-cli "$@" ping 2>&1) || true
note "Reply: ${out}"
case "$out" in
PONG)
note " OK"
note "Result: HEALTHY"
exit 0
;;
*)
note " CRITICAL: ping did not return PONG"
note "Result: CRITICAL"
exit 2
;;
esac
Raw endpointhttps://runny.sh/r/TWVWG55D3MHB
See something unsafe?
Report this script
Tell us why it should come down. Anyone can also report a URL at /abuse.