Network Outage Widget Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Network Outage Widget Error

Post 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 
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: Network Outage Widget Error

Post 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]#
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Network Outage Widget Error

Post 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
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: Network Outage Widget Error

Post 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]#
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Network Outage Widget Error

Post 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
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: Network Outage Widget Error

Post 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
You do not have the required permissions to view the files attached to this post.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Network Outage Widget Error

Post 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
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: Network Outage Widget Error

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Network Outage Widget Error

Post 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).
lntinfo
Posts: 136
Joined: Tue Mar 01, 2011 10:17 am

Re: Network Outage Widget Error

Post by lntinfo »

Hi,

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

Sivakumar
You do not have the required permissions to view the files attached to this post.
Locked