Hi Team,
Recently we had issue that one of the table was marked as corrupted, however our Nagios system was not detecting this.
Reason for this was that Nagios was able connect with database without any problems.
My expectations:
- Provide Nagios plugin (Bash or Perl), which parse log file: /var/log/mysqld and search for lines like below:
141110 21:24:40 [ERROR] /usr/sbin/mysqld: Table './dbname/tablename' is marked as crashed and should be repaired
- Check must remember location of file, we don’t want read full log file every time when check is running (only from last know position)
- Check must allow “reset error” – for example we detected some error, fixed, then we must inform check that this error is no longer valid, so check not detecting this error anymore and continue runs normally.
- Check can write some temporary file in /tmp folder.
Thanks in advance
One of the table was marked as corrupted in Mysql log
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: One of the table was marked as corrupted in Mysql log
If the table had an effect on the XI front-end, you should have seen output there directing you to run the repair script. There may be plugins available which check for crashed tables, this is also done as part of our cronned maintenance script. Alternatively, you could use a log monitoring plugin to detect those issues in your logs and alert you.