Is there any tweak for monit or another way to monitor whether one server can access mysql on another server?
I tried it with monit but as you probably know, after 10 attempts, mysql blocks the server.
check host db1.server with address db1.server
if failed port 3306 protocol mysql then alert
.
mysqli: host <host> is blocked because of many connection errors; unblock with mysqladmin flush-hosts
Edit (total new answer)
I have Googled a bit about this issue and found some clue :
Seems that
MySql
does not really like when :So, a workaround could be to perform a real
MySql
connection and run a query.Here is a way to do it. You will need to install
mysql-client
on the monitoring server and grant correct access on MySql server.Monit
check setup :Script
mysql_check.sh
:Script
mysql_check.sh
should also be valid for a customNagios
check.I have tested this successfully (means can run the query remotely), but as far as i cannot reproduce the
blocked host
issue on myMySql 5.5
server i cannot tell if this actually solves the issue.Give it a try and tell me what the result is.
My references :