Problemas con ndoutils-1.4b9-1 insertando en MySQL

Puede ocurrir que nos encontremos con un monton de errores en los logs del estilo de:

Dec 21 20:25:29 hostname ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_hostchecks SET instance_id='1', host_object_id='65', check_type='0', is_raw_check='0', current_check_attempt='1', max_check_attempts='5', state='0', state_type='1', start_time=FROM_UNIXTIME(1292959529), start_time_usec='93880', end_time=FROM_UNIXTIME(0), end_time_usec='0', timeout='30', early_timeout='0', execution_time='0.000000', latency='0.093000', return_code='0', output='', long_output='', perfdata='', command_object_id='1', command_args='', command_line='/usr/lib/nagios/plugins/check_ping -H AA.BBB.CCC.DD -w 3000.0,80% -c 5000.0,100% -p 5' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='65', check_type='0', is_raw_check='0', current_check_attempt='1', max_check_attempts='5', state='0', state_type='1', start_time=FROM_UNIXTIME(1292959529), start_time_usec='93880', end_time=FROM_UNIXTIME(0), end_time_usec='0', timeout='30', early_timeout='0', execution_time='0.000000', latency='0.093000', return_code='0', output='', long_output='', perfdata='''
Dec 21 20:25:29 hostname ndo2db: mysql_error: 'Unknown column 'long_output' in 'field list''

En negrita tenemos el mensaje que nos interesa y que identifica el origen de este error que, para ser sinceros, genera un MONTON de BASURA en los logs.

Para resolverlo, tenemos que crear una nueva columna en la base de datos que usemos en ndoutils. Quien tenga un interface gráfico, genial, el que no, debera ejecutar estas sentencias alter:

alter table nagios_eventhandlers add long_output TEXT NOT NULL after output; 
alter table nagios_hostchecks add long_output TEXT NOT NULL after output; 
alter table nagios_hoststatus add long_output TEXT NOT NULL after output; 
alter table nagios_notifications add long_output TEXT NOT NULL after output; 
alter table nagios_servicechecks add long_output TEXT NOT NULL after output; 
alter table nagios_servicestatus add long_output TEXT NOT NULL after output; 
alter table nagios_statehistory add long_output TEXT NOT NULL after output; 
alter table nagios_systemcommands add long_output TEXT NOT NULL after output;

Cosas a tener en cuenta: En mi base de datos, la cabecera del nombre de las tablas es «nagios_». Tendrás que ajustarlo a tu configuración. Muy probablemente el nombre de la base de datos sea ndoutils, nagios, ndodb o similar.