We often get the error Table marked as crashed and should be repaired
on some of your mysql tables running on a windows 2003 server.
How can I monitor if a table in a mysql db is "crashed"? Is there a file to watch (would be easy to implement) or do I have to place some query on the db (would be more complicated, as the monitoring tool would need a db login for that) or is there some system parameter to read?. There is an eventlog entry, if the table is touched, but parsing the eventlog does take a very long time.
On linux the error that a table is crashed gets sent to the mysql.log log file. We monitor it via nagios and trigger off an automatic repair of the table from there.
The biggest issue is that mysql doesn't always log the crashed table to anyway. You just run queries and they fail. Best way we came up with was to run a short query against the most common tables that crash and act accordingly.