lausser/check_mysql_health — pull request #5 by lermit (2013-12-18 11:29:09+00:00)
Title: Fix: Qcache hitrate computation after flush status

After a mysql FLUSH STATUS command the qcache hit rate return by the
plugin is no more relevant. The reason is that qcache hitrate
computation use total number of select done on the monitored mysql
server instead of the sum
of qcache_hit, qcache_miss and qcache_insert. The total number of select
done on the monitored mysql server is not reset with flush status mysql
command.

This website explain how qcache is compute :
http://www.dbtuna.com/article/46/query_cache_size_%7C_the_performance_impact_of_the_MySQL_Query_Cache

This commit change qcache_hitrate computation method in order to use qcache_* status variable.