#!/bin/bash

[[ "$(echo ruok | nc "$HOSTNAME" 2181 2>/dev/null)" == "imok" ]] && exit 0 || exit 1

#!/bin/bash

[[ -n "$1" ]] && host=$1 || host=$HOSTNAME

[[ "$(echo ruok | nc "$host" 2181 2>/dev/null)" == "imok" ]] && exit 0 || exit 1

Modify zk checker script to optionally accept host as arg
Modify zk checker script to optionally accept host as arg
