Page 3 of 4

Re: Network Outage Widget Error

Posted: Tue Apr 19, 2011 9:31 am
by mguthrie
Yeah, it does appear that one of your tables is corrupted.

Lets try a force repair on that table.

Code: Select all

# service mysqld stop 
# cd /var/lib/mysql/nagios 
# myisamchk -r -f nagios_servicestatus

After running the above instructions, can you send us the output from the following?

Code: Select all

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

Re: Network Outage Widget Error

Posted: Tue Apr 19, 2011 9:41 am
by lntinfo

Code: Select all

[root@poinmsnagios01 nagios]# /usr/local/nagiosxi/cron/dbmaint.php
CLEANING ndoutils TABLE 'externalcommands'...
SQL: DELETE FROM nagios_externalcommands WHERE entry_time < FROM_UNIXTIME(130261                                              7973)
CLEANING ndoutils TABLE 'logentries'...
SQL: DELETE FROM nagios_logentries WHERE logentry_time < FROM_UNIXTIME(129544677                                              3)
CLEANING ndoutils TABLE 'statehistory'...
SQL: DELETE FROM nagios_statehistory WHERE state_time < FROM_UNIXTIME(1240150773                                              )
CLEANING ndoutils TABLE 'timedevents'...
SQL: DELETE FROM nagios_timedevents WHERE event_time < FROM_UNIXTIME(1303222473)
        SQL:    SQL Error [ndoutils] :</b> Table './nagios/nagios_timedevents' i                                              s marked as crashed and last (automatic?) repair failedCLEANING ndoutils TABLE '                                              systemcommands'...
SQL: DELETE FROM nagios_systemcommands WHERE start_time < FROM_UNIXTIME(13032224                                              73)
CLEANING ndoutils TABLE 'servicechecks'...
SQL: DELETE FROM nagios_servicechecks WHERE start_time < FROM_UNIXTIME(130322247                                              3)
CLEANING ndoutils TABLE 'hostchecks'...
SQL: DELETE FROM nagios_hostchecks WHERE start_time < FROM_UNIXTIME(1303222473)
CLEANING ndoutils TABLE 'eventhandlers'...
SQL: DELETE FROM nagios_eventhandlers WHERE start_time < FROM_UNIXTIME(130322247                                              3)
CLEANING nagiosxi TABLE 'commands'...
SQL: DELETE FROM xi_commands WHERE processing_time < 1303193973::abstime::timest                                              amp without time zone
CLEANING nagiosxi TABLE 'events'...
SQL: DELETE FROM xi_events WHERE processing_time < 1303193973::abstime::timestam                                              p without time zone
SQL1: SELECT xi_meta.meta_id FROM xi_meta LEFT JOIN xi_events ON xi_meta.metaobj                                              _id=xi_events.event_id WHERE metatype_id='1' AND event_id IS NULL
SQL2: DELETE FROM xi_meta WHERE meta_id IN (SELECT xi_meta.meta_id FROM xi_meta                                               LEFT JOIN xi_events ON xi_meta.metaobj_id=xi_events.event_id WHERE metatype_id='                                              1' AND event_id IS NULL)
CLEANING nagiosql TABLE 'logbook'...
SQL: DELETE FROM tbl_logbook WHERE time < FROM_UNIXTIME(1303193973)
[root@poinmsnagios01 nagios]#

Re: Network Outage Widget Error

Posted: Tue Apr 19, 2011 9:58 am
by mguthrie
SQL: DELETE FROM nagios_timedevents WHERE event_time < FROM_UNIXTIME(1303222473)
SQL: SQL Error [ndoutils] :</b> Table './nagios/nagios_timedevents' i s marked as crashed and last (automatic?) repair failedCLEANING ndoutils TABLE ' systemcommands'...
Looks like there's one more that needs to be fixed. Lets repeat the process for that table as well.

Code: Select all

    # service mysqld stop
    # cd /var/lib/mysql/nagios
    # myisamchk -r -f nagios_timedevents
And if you can send the output once more from the following:

Code: Select all

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

Re: Network Outage Widget Error

Posted: Tue Apr 19, 2011 10:02 am
by lntinfo
Done, Check the below results..

Code: Select all

[root@poinmsnagios01 nagios]# rm -f /usr/local/nagiosxi/var/dbmaint.lock
[root@poinmsnagios01 nagios]# /usr/local/nagiosxi/cron/dbmaint.php
CLEANING ndoutils TABLE 'externalcommands'...
SQL: DELETE FROM nagios_externalcommands WHERE entry_time < FROM_UNIXTIME(130261                                              9267)
CLEANING ndoutils TABLE 'logentries'...
SQL: DELETE FROM nagios_logentries WHERE logentry_time < FROM_UNIXTIME(129544806                                              7)
CLEANING ndoutils TABLE 'statehistory'...
SQL: DELETE FROM nagios_statehistory WHERE state_time < FROM_UNIXTIME(1240152067                                              )
CLEANING ndoutils TABLE 'timedevents'...
SQL: DELETE FROM nagios_timedevents WHERE event_time < FROM_UNIXTIME(1303223767)
CLEANING ndoutils TABLE 'systemcommands'...
SQL: DELETE FROM nagios_systemcommands WHERE start_time < FROM_UNIXTIME(13032237                                              67)
CLEANING ndoutils TABLE 'servicechecks'...
SQL: DELETE FROM nagios_servicechecks WHERE start_time < FROM_UNIXTIME(130322376                                              7)
CLEANING ndoutils TABLE 'hostchecks'...
SQL: DELETE FROM nagios_hostchecks WHERE start_time < FROM_UNIXTIME(1303223767)
CLEANING ndoutils TABLE 'eventhandlers'...
SQL: DELETE FROM nagios_eventhandlers WHERE start_time < FROM_UNIXTIME(130322376                                              7)
CLEANING nagiosxi TABLE 'commands'...
SQL: DELETE FROM xi_commands WHERE processing_time < 1303195267::abstime::timest                                              amp without time zone
CLEANING nagiosxi TABLE 'events'...
SQL: DELETE FROM xi_events WHERE processing_time < 1303195267::abstime::timestam                                              p without time zone
SQL1: SELECT xi_meta.meta_id FROM xi_meta LEFT JOIN xi_events ON xi_meta.metaobj                                              _id=xi_events.event_id WHERE metatype_id='1' AND event_id IS NULL
SQL2: DELETE FROM xi_meta WHERE meta_id IN (SELECT xi_meta.meta_id FROM xi_meta                                               LEFT JOIN xi_events ON xi_meta.metaobj_id=xi_events.event_id WHERE metatype_id='                                              1' AND event_id IS NULL)
CLEANING nagiosql TABLE 'logbook'...
SQL: DELETE FROM tbl_logbook WHERE time < FROM_UNIXTIME(1303195267)
[root@poinmsnagios01 nagios]#

Re: Network Outage Widget Error

Posted: Tue Apr 19, 2011 10:09 am
by mguthrie
Ok, that part looks good. How do things look in the web interface? (particularly the system components?)

If you're using R2011, I strongly recommend upgrading to the latest release. (2011R1.2). This release has patches which should prevent future table corruption.

If you're running R2009, make sure you've downloaded and replaced the patched dbmaint.php script which is listed on our wiki:
http://support.nagios.com/wiki/index.ph ... s_Stale.22

Re: Network Outage Widget Error

Posted: Thu Apr 28, 2011 10:02 am
by lntinfo
hi,

Now my monitoring engine is working fine but all my notification giving wrong time. find the attachement. here current time is 28/04/2011 16:31:20.

Pls. give me solutione for changing correct time.

Sivakumar

Re: Network Outage Widget Error

Posted: Thu Apr 28, 2011 10:05 am
by mguthrie
This is common with VM's running on an ESX server, particularly if the machine gets powered off.

Code: Select all

yum install ntp
ntpdate time.nist.gov       ##(or call a local time server for your area)
If it still appears off, you may need to update your system time in your php.ini file:
http://support.nagios.com/wiki/index.ph ... e.22_Error

Re: Network Outage Widget Error

Posted: Thu Apr 28, 2011 10:12 am
by lntinfo
Hi,

My Naigos is running on physical servers and do not have any issues in the time. but I am in notification I am getting wrong time.

Sivakumar

Re: Network Outage Widget Error

Posted: Thu Apr 28, 2011 10:17 am
by mguthrie
My Naigos is running on physical servers and do not have any issues in the time.
Can you clarify on this? Is the XI interface showing the correct time?

When you run the 'date' command from the command-line, is it showing the correct time and UTC offset (we've had a user manually change this to be incorrect in the past).

Re: Network Outage Widget Error

Posted: Thu Apr 28, 2011 10:25 am
by lntinfo
Hi,

Pls. find the attached screen shoots taken from nagios console and command line.

Sivakumar