Page 1 of 1
Web UI SQL errors
Posted: Mon May 21, 2012 2:16 pm
by jweatherell
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'
Re: Web UI SQL errors
Posted: Mon May 21, 2012 2:45 pm
by scottwilkerson
Lets try to repair that database
Code: Select all
cd /usr/local/nagiosxi/scripts
./repairmysql.sh nagios
Re: Web UI SQL errors
Posted: Fri May 25, 2012 9:48 am
by jweatherell
SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus' SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus'
Still seeing this after repair
Re: Web UI SQL errors
Posted: Fri May 25, 2012 10:44 am
by scottwilkerson
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';