ndoutils Mysql Errors

Don Lewis donnell.lewis at icoretechnology.com
Tue Jan 17 22:41:48 CET 2006


Hello All,

Forgive me if this has been addresses already but I didn't see it on the
archives.

Running rc2 here and everything seems to be working great until I
installed the ndoutils mod.  I compiled my Nagios installation with
'--enable-event-broker (not realizing it's by default now) and it
compiled just fine and using an inserter seems to work as well.

My problem comes from when I installed the ndoutils package.  I used the
database schema that came with it and it created all the
tables/structures in my 'nagios' database.

After setting up the configs for ndo2db and starting the dameon and
adding the line into nagios.cfg for the event broker and restarting
nagios it hooked into my database and initialized just fine.  I queried
the database on some tables to see if data was indeed getting fed into
the database and it was.  Upon tailing /var/log/messages however I see
tons of these scrolling by for query's trying to do INSERTS:
---------------------------------------------------------------------------
Jan 17 16:29:46 nagios ndo2db: Error: mysql_query() failed for 'INSERT
INTO ndo_programstatus SET instance_id='1',
status_update_time=FROM_UNIXTIME(1137533385),
program_start_time=FROM_UNIXTIME(1137533378), is_currently_running='1',
process_id='25012', daemon_mode='1',
last_command_check=FROM_UNIXTIME(1137533385),
last_log_rotation=FROM_UNIXTIME(0), notifications_enabled='1',
active_service_checks_enabled='1', passive_service_checks_enabled='1',
active_host_checks_enabled='1', passive_host_checks_enabled='1',
event_handlers_enabled='1', flap_detection_enabled='1',
failure_prediction_enabled='1', process_performance_data='0',
obsess_over_hosts='0', obsess_over_services='1',
modified_host_attributes='0', modified_service_attributes='0',
global_host_event_handler='', global_service_event_handler='' ON
DUPLICATE KEY UPDATE instance_id='1',
status_update_time=FROM_UNIXTIME(1137533385),
program_start_time=FROM_UNIXTIME(1137533378), is_currently_running='1',
process_id='25012', daemon_mode='1', last_command_check=FRO
Jan 17 16:29:55 nagios ndo2db: Error: mysql_query() failed for 'INSERT
INTO ndo_programstatus SET instance_id='1',
status_update_time=FROM_UNIXTIME(1137533395),
program_start_time=FROM_UNIXTIME(1137533378), is_currently_running='1',
process_id='25012', daemon_mode='1',
last_command_check=FROM_UNIXTIME(1137533395),
last_log_rotation=FROM_UNIXTIME(0), notifications_enabled='1',
active_service_checks_enabled='1', passive_service_checks_enabled='1',
active_host_checks_enabled='1', passive_host_checks_enabled='1',
event_handlers_enabled='1', flap_detection_enabled='1',
failure_prediction_enabled='1', process_performance_data='0',
obsess_over_hosts='0', obsess_over_services='1',
modified_host_attributes='0', modified_service_attributes='0',
global_host_event_handler='', global_service_event_handler='' ON
DUPLICATE KEY UPDATE instance_id='1',
status_update_time=FROM_UNIXTIME(1137533395),
program_start_time=FROM_UNIXTIME(1137533378), is_currently_running='1',
process_id='25012', daemon_mode='1', last_command_check=FRO
-------------------------------------------------------------------------

This looks to be because it's trying to insert over what's already in
the database so it considers it's a duplicate and not allowing it to
rewrite since it's not an UPDATE.

Maybe I'm off here bu that's what it looked like to me, but I'm not
really a DBA either...;)

So, is anyone else experiencing this.  My event broker option in
'nagios.cfg' is set to '-1' to broker everything, to get rid of the
messages I set it back to '0' to broker nothing (these are the only two
modes I know of).  When set to '0' I see this wen tailing the syslog:

Jan 17 16:30:30 nagios nagios: ndomod: NDOMOD 1.2 Copyright (c)
2005-2006 Ethan Galstad (nagios at nagios.org)
Jan 17 16:30:30 nagios nagios: ndomod: Successfully connected to data
sink.  0 queued items to flush.
Jan 17 16:30:30 nagios nagios: Event broker module
'/usr/local/nagios/bin/ndomod.o' initialized successfully. 
Jan 17 16:30:30 nagios ndo2db: Successfully connected to MySQL database

But I don't think it would be brokering still and getting the info into
the database with updates if the Broker config='0', any thoughts ?

Regards,

Don Lewis




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list