ndoutils Mysql Errors
Don Lewis
donnell.lewis at icoretechnology.com
Fri Jan 20 20:52:26 CET 2006
Hey Mike,
Glad to hear that help resolve your issue. The stuff that gets
populated to the database for ndoutils for me is just the host & service
status, alerts, acknowledgements etc. As for getting the nagios config
into the database I wound up just using the NagiosQL package to get the
nagios configs into a seperate database and then I can just use it's
import feature, would be nice if the config was imported into the
ndoutils database as well, maybe a later version will autoload that and
maybe have a cron that updates it, this is what I do now with the
NagiosQL database.
-Don
On Fri, 2006-01-20 at 09:43 -0800, Mike Koponick wrote:
> Don,
>
> Your suggestion also resolved my issue, with one exception. I used a
> different port number than the MySQL server.
>
> I haven't seen the issue that you described later in your response, but
> I will keep an eye out for it.
>
> Also, how does one get the Nagios configuration "inserted" into the
> database? From what I can tell, it would be manual task (this is OK for
> now, at least for me) and no importing can be done.
>
> Thoughts? Suggestions?
>
> Thanks!
>
> Mike
>
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Don Lewis
> Sent: Tuesday, January 17, 2006 1:42 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] ndoutils Mysql Errors
>
> 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
-------------------------------------------------------
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