Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aw
Created July 8, 2011 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save aw/1071141 to your computer and use it in GitHub Desktop.
Save aw/1071141 to your computer and use it in GitHub Desktop.
xinetd script to check MySQL availability and replication status
#
# /etc/xinetd.d/mysqlchk
#
service mysqlchk_write
{
flags = REUSE
socket_type = stream
port = 9200
wait = no
user = nobody
server = /opt/mysqlchk_status.sh
log_on_failure += USERID
disable = no
only_from = 172.16.0.0/24 # recommended to put the IPs that need
# to connect exclusively (security purposes)
}
service mysqlchk_read
{
flags = REUSE
socket_type = stream
port = 9201
wait = no
user = nobody
server = /opt/mysqlchk_replication.sh
log_on_failure += USERID
disable = no
only_from = 172.16.0.0/24 # recommended to put the IPs that need
# to connect exclusively (security purposes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment