Home » Categories » Products » Nagios XI » Troubleshooting » Common Problems

Nagios XI - Event Data Is Stale

Problem Description

There is a known bug relating to event data in versions 2009R1.4B-2011R1.1. This bug has been patched and will be available in releases later than the versions posted above, but if you're experiencing this error, and/or the nagios service is taking an excessively long time to start, you may have a corrupted mysql table that needs repair.

This KB article exists for historic purposes only, you should attempt the steps in the following KB article first to see if it resolves your problem:

Nagios XI - Crashed Database Tables

 

 

Resolving The Problem

Stop the following services:

service nagios stop
service ndo2db stop
service mysqld stop

 

Run the repair script for mysql tables:

/usr/local/nagiosxi/scripts/repairmysql.sh nagios

 

Unzip and copy the the following dbmaint file to /usr/local/nagiosxi/cron/. This will overwrite the previous version.

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/patches/dbmaint.zip
unzip dbmaint.zip
chmod +x dbmaint.php
cp dbmaint.php /usr/local/nagiosxi/cron

 

Run the following commands:

service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
/usr/local/nagiosxi/cron/dbmaint.php

 

After running this script, start these services:

service ndo2db start
service nagios start

 

However, if you see any error output from this script, similar to this one:

SQL: DELETE FROM nagios_logentries WHERE logentry_time < FROM_UNIXTIME(1293570334)
SQL:         SQL Error [ndoutils] :</b> Table './nagios/nagios_logentries' is marked
as crashed and last (automatic?) repair failedCLEANING ndoutils TABLE 'notifications'...

 

You may need to run a force repair on the tables:

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_<corrupted_table>

service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
/usr/local/nagiosxi/cron/dbmaint.php 

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - MK Livestatus Problems With Mod-Gearman
Viewed 583 times since Thu, Feb 25, 2016
Nagios XI - How To Use CA Certificates With check_ldaps Plugin
Viewed 934 times since Tue, Jul 26, 2016
Nagios XI - Last Check Time Not Updating
Viewed 3197 times since Tue, Jan 6, 2015
PHPMailer - Troubleshooting Using Debug Logging
Viewed 1125 times since Tue, Aug 14, 2018
Nagios XI - ICMP and Ping Checks Stopped Graphing
Viewed 1219 times since Mon, Jan 25, 2016
Nagios XI - Uploaded plugin returns "/bin/bash^M: bad interpreter: No such file or directory"
Viewed 807 times since Thu, Feb 25, 2016
Nagios XI - Status Information Cut Off At 256 Characters
Viewed 763 times since Thu, Feb 25, 2016
Nagios XI - Missing localhost Alerts
Viewed 988 times since Sun, Nov 5, 2017
NRPE - Agent and Plugin Explained
Viewed 8115 times since Fri, Jul 14, 2017
Nagios XI - Configuration Applies, No Changes Take Place
Viewed 780 times since Tue, Jan 27, 2015