Web UI SQL errors

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Web UI SQL errors

Postby jweatherell » Mon May 21, 2012 2:16 pm

New problem sprung up today was wondering if anyone has any advice.

SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus' SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus'
jweatherell
 
Posts: 4
Joined: Fri May 18, 2012 1:52 pm

Re: Web UI SQL errors

Postby scottwilkerson » Mon May 21, 2012 2:45 pm

Lets try to repair that database

Code: Select all
cd /usr/local/nagiosxi/scripts
./repairmysql.sh nagios
User avatar
scottwilkerson
 
Posts: 4818
Joined: Tue Nov 15, 2011 3:11 pm

Re: Web UI SQL errors

Postby jweatherell » Fri May 25, 2012 9:48 am

SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus' SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus'

Still seeing this after repair
jweatherell
 
Posts: 4
Joined: Fri May 18, 2012 1:52 pm

Re: Web UI SQL errors

Postby scottwilkerson » Fri May 25, 2012 10:44 am

We will need to try the brute force repair. If it's highly damaged it may take more than one run:
Code: Select all
myisamchk -r -f /var/lib/mysql/nagios/nagios_*.MYI




If that doesn't work, we will need to drop the nagios_programstatus table and
rebuild it.


Code: Select all
mysql -pnagiosxi nagios
DROP TABLE nagios_programstatus;

CREATE TABLE IF NOT EXISTS `nagios_programstatus` (
  `programstatus_id` int(11) NOT NULL auto_increment,
  `instance_id` smallint(6) NOT NULL default '0',
  `status_update_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `program_start_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `program_end_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `is_currently_running` smallint(6) NOT NULL default '0',
  `process_id` int(11) NOT NULL default '0',
  `daemon_mode` smallint(6) NOT NULL default '0',
  `last_command_check` datetime NOT NULL default '0000-00-00 00:00:00',
  `last_log_rotation` datetime NOT NULL default '0000-00-00 00:00:00',
  `notifications_enabled` smallint(6) NOT NULL default '0',
  `active_service_checks_enabled` smallint(6) NOT NULL default '0',
  `passive_service_checks_enabled` smallint(6) NOT NULL default '0',
  `active_host_checks_enabled` smallint(6) NOT NULL default '0',
  `passive_host_checks_enabled` smallint(6) NOT NULL default '0',
  `event_handlers_enabled` smallint(6) NOT NULL default '0',
  `flap_detection_enabled` smallint(6) NOT NULL default '0',
  `failure_prediction_enabled` smallint(6) NOT NULL default '0',
  `process_performance_data` smallint(6) NOT NULL default '0',
  `obsess_over_hosts` smallint(6) NOT NULL default '0',
  `obsess_over_services` smallint(6) NOT NULL default '0',
  `modified_host_attributes` int(11) NOT NULL default '0',
  `modified_service_attributes` int(11) NOT NULL default '0',
  `global_host_event_handler` varchar(255) character set latin1 NOT NULL
default '',
  `global_service_event_handler` varchar(255) character set latin1 NOT NULL
default '',
  PRIMARY KEY  (`programstatus_id`),
  UNIQUE KEY `instance_id` (`instance_id`)
) ENGINE=MyISAM  COMMENT='Current program status information';
User avatar
scottwilkerson
 
Posts: 4818
Joined: Tue Nov 15, 2011 3:11 pm


Return to Nagios XI

Who is online

Users browsing this forum: ewilliams, siriideepak and 2 guests

cron