A Bash status report can turn a small check count into a clear ready or blocked line without calling external services.

Program

Play the script to choose the failed check count and inspect the service health report.

service_health_report.sh
#!/usr/bin/env bash

failed_checks=
max_allowed=0
if (( failed_checks <= max_allowed )); then
    status="ready"
else
    status="blocked"
fi
echo "service=api failed=$failed_checks status=$status"
#!/usr/bin/env bash

failed_checks=
max_allowed=0
if (( failed_checks <= max_allowed )); then
    status="ready"
else
    status="blocked"
fi
echo "service=api failed=$failed_checks status=$status"
check count The script keeps the service signal as one numeric count.
status branch The threshold branch converts the count into a ready or blocked label.
report line The final echo emits a stable status line that another tool could parse.