From: shacky <sha...@gm...> - 2010-11-08 11:07:51
|
Hi. I'm succesfully using Nagios 3.2.3 and I installed ndoutils-1.4b9 to have data in a MySQL db. I configured ndomod and ndo2db and I made a lot of tries, but it does not work. I have this in nagios.log: [1289212021] Nagios 3.2.3 starting... (PID=1583) [1289212021] Local time is Mon Nov 08 11:27:01 CET 2010 [1289212021] LOG VERSION: 2.0 [1289212021] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors [1289212021] ndomod: Could not open data sink! I'll keep trying, but some output may get lost... [1289212021] Event broker module '/opt/nagios/bin/ndomod.o' initialized successfully. [1289212021] Finished daemonizing... (New PID=1584) This is my ndomod.cfg file: ##################################################################### # NDOMOD CONFIG FILE # # Last Modified: 09-05-2007 ##################################################################### instance_name=default output_type=unixsocket output=/opt/nagios/var/ndo.sock tcp_port=5668 use_ssl=0 output_buffer_items=5000 buffer_file=/opt/nagios/var/ndomod.tmp file_rotation_interval=14400 #file_rotation_command=rotate_ndo_log file_rotation_timeout=60 reconnect_interval=15 reconnect_warning_interval=15 #reconnect_warning_interval=900 data_processing_options=-1 config_output_options=2 And this is my ndo2db.cfg file: ##################################################################### # NDO2DB DAEMON CONFIG FILE # # Last Modified: 01-02-2009 ##################################################################### lock_file=/opt/nagios/var/ndo2db.lock ndo2db_user=nagios ndo2db_group=nagios socket_type=unix socket_name=/opt/nagios/var/ndo.sock tcp_port=5668 use_ssl=0 db_servertype=mysql db_host=localhost db_port=3306 db_name=nagios db_prefix=nagios_ db_user=nagios db_pass=password max_timedevents_age=1440 max_systemcommands_age=10080 max_servicechecks_age=10080 max_hostchecks_age=10080 max_eventhandlers_age=44640 max_externalcommands_age=44640 debug_level=-1 debug_verbosity=2 debug_file=/tmp/ndo2db.debug max_debug_file_size=1000000 I can succesfully log to the MySQL db with the data specified in ndo2db.cfg file: server:/opt/nagios/etc# mysql -unagios -p nagios Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7649 Server version: 5.0.51a-24+lenny4 (Debian) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show tables; +----------------------------------------+ | Tables_in_nagios | +----------------------------------------+ | nagios_acknowledgements | | nagios_commands | | nagios_commenthistory | | nagios_comments | | nagios_configfiles | | nagios_configfilevariables | | nagios_conninfo | | nagios_contact_addresses | | nagios_contact_notificationcommands | | nagios_contactgroup_members | | nagios_contactgroups | | nagios_contactnotificationmethods | | nagios_contactnotifications | | nagios_contacts | | nagios_contactstatus | | nagios_customvariables | | nagios_customvariablestatus | | nagios_dbversion | | nagios_downtimehistory | | nagios_eventhandlers | | nagios_externalcommands | | nagios_flappinghistory | | nagios_host_contactgroups | | nagios_host_contacts | | nagios_host_parenthosts | | nagios_hostchecks | | nagios_hostdependencies | | nagios_hostescalation_contactgroups | | nagios_hostescalation_contacts | | nagios_hostescalations | | nagios_hostgroup_members | | nagios_hostgroups | | nagios_hosts | | nagios_hoststatus | | nagios_instances | | nagios_logentries | | nagios_notifications | | nagios_objects | | nagios_processevents | | nagios_programstatus | | nagios_runtimevariables | | nagios_scheduleddowntime | | nagios_service_contactgroups | | nagios_service_contacts | | nagios_servicechecks | | nagios_servicedependencies | | nagios_serviceescalation_contactgroups | | nagios_serviceescalation_contacts | | nagios_serviceescalations | | nagios_servicegroup_members | | nagios_servicegroups | | nagios_services | | nagios_servicestatus | | nagios_statehistory | | nagios_systemcommands | | nagios_timedeventqueue | | nagios_timedevents | | nagios_timeperiod_timeranges | | nagios_timeperiods | +----------------------------------------+ 59 rows in set (0.00 sec) mysql> My ndo2db.debug file is empty: server:/opt/nagios/etc# ls -l /tmp/ndo2db.debug -rw-r--r-- 1 nagios nagios 0 Nov 7 16:43 /tmp/ndo2db.debug My ndo.sock file exist and the permissions seem to be correct: server:/opt/nagios/var# ls -l /opt/nagios/var/ndo.sock srwxr-xr-x 1 nagios nagios 0 Nov 8 11:26 /opt/nagios/var/ndo.sock Can you help me please? Thank you very much! Bye. |