Skip to content

Instantly share code, notes, and snippets.

@suer
Created April 19, 2012 07:28
Show Gist options
  • Save suer/2419397 to your computer and use it in GitHub Desktop.
Save suer/2419397 to your computer and use it in GitHub Desktop.
nrpe で使用する Redis 死活監視スクリプト
#!/bin/sh
REDIS_CLI=/usr/local/redis/bin/redis-cli
result="$($REDIS_CLI dbsize 2>&1)"
status=$?
if [ $status -eq 0 ]; then
echo "OK: connection successful. dbsize = $result"
exit 0
fi
echo "NG: cannot connect redis server status = $status"
exit 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment