We have 10 or so web servers that share a few MySQL servers. Due to some networking problems, there were too many connection errors and one of the webservers was blocked. I resolved this by flushing the hosts but it took a short while to notice this.
I want to setup a Nagios/Icinga check to fetch a list of blocked hosts - but I can't see how I could do this as MySQL seems to have no option for it (and there's no host_cache table to check from). I could just add a check for every webserver to try and connect, but I'd rather the check be centralised if possible - if not then I'll have to do it that way.
mysql -uUSERNAME -pPASSWORD -e 'SELECT * FROM blocked_list;'
do you mean something like this? – Piddock