Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- LAG=`/usr/local/bin/mysql_heartbeat_check.sh`
- if [ $LAG -lt 10 ]
- then
- echo "HTTP/1.1 200 OK\r\n"
- echo "Content-Type: text/plain\r\n"
- echo "\r\n"
- echo "MySQL replication A-OKAY!\r\n"
- else
- echo "HTTP/1.1 503 Service Unavailable\r\n"
- echo "Content-Type: text/plain\r\n"
- echo "\r\n"
- echo "Replication lag: $LAG\r\n"
- fi
- exit 0
Add Comment
Please, Sign In to add comment