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'
Web UI SQL errors
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Web UI SQL errors
Lets try to repair that database
Code: Select all
cd /usr/local/nagiosxi/scripts
./repairmysql.sh nagios-
jweatherell
- Posts: 4
- Joined: Fri May 18, 2012 1:52 pm
Re: Web UI SQL errors
SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus' SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_programstatus'
Still seeing this after repair
Still seeing this after repair
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Web UI SQL errors
We will need to try the brute force repair. If it's highly damaged it may take more than one run:
If that doesn't work, we will need to drop the nagios_programstatus table and
rebuild it.
Code: Select all
myisamchk -r -f /var/lib/mysql/nagios/nagios_*.MYIIf 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';