One of the table was marked as corrupted in Mysql log
Posted: Fri Nov 14, 2014 5:56 am
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
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