Guest User

Untitled

a guest
Jun 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. LAG=`/usr/local/bin/mysql_heartbeat_check.sh`
  4.  
  5. if [ $LAG -lt 10 ]
  6. then
  7. echo "HTTP/1.1 200 OK\r\n"
  8. echo "Content-Type: text/plain\r\n"
  9. echo "\r\n"
  10. echo "MySQL replication A-OKAY!\r\n"
  11. else
  12. echo "HTTP/1.1 503 Service Unavailable\r\n"
  13. echo "Content-Type: text/plain\r\n"
  14. echo "\r\n"
  15. echo "Replication lag: $LAG\r\n"
  16. fi
  17.  
  18. exit 0
Add Comment
Please, Sign In to add comment