Nagios-db mysql module not working
Mohr James
james.mohr at elaxy.com
Thu Nov 24 20:31:13 CET 2005
Hi All!
I have Nagios 2.0b5, nagios-db 0.91 and MySQL 4.1.15, including
MySQL-MAX 4.1.15. When Nagios starts I see the module is loaded
("nagios-db: inserter locked into db") and the appropriate message when
nagios shuts down. However, nothing is getting loaded into the database,
and I do not see any error messages in /var/log/messages.
I have changed inserted.c to reflect the user/password of the database
(nagios/nagios) and I can log inusing the mysql command and insert data
directly into the tables. I have also tried changing the values (i.e.
nagios2/nagios) in the nebmodule_init function and it reports the error
"nagios-db: inserter failed to connect to db". This convinces be that at
least I am connecting to the database and the username/password are
correct.
The nagios.cfg has this:
event_broker_options=-1
broker_module=/opt/INSTALL/nagios-db-0.91/neb/mysql/inserter.o
And the path is correct.
Near the top of the loadconfig function I added this:
write_to_logs_and_console("Inside of
loadconfig",NSLOG_INFO_MESSAGE,TRUE);
As well as in a couple of other places.
My assumption is that it should write an entry to /var/log/messages when
this function is called. Perhaps the function is being called, but this
line is not writing to where I expect. It seems that other than the
init/deinit functions, nothing else is getting called.
I loaded another NEB module that has this:
snprintf(temp_buffer,sizeof(temp_buffer)-1,"EVENT: %d MESSAGE:
%s",event_type,tmp_service->plugin_output);
write_to_all_logs(temp_buffer,NSLOG_INFO_MESSAGE);
These messages are getting writting to the /var/log/messages.
I am at a loss as to where to look next. Any help is greatly
appreaciated.
Regards,
Jim Mohr
-------------------------------------------------------
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
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