Page 1 of 2

Starting ndo2db:Support for the specified database - FAILED

Posted: Thu Oct 08, 2015 4:16 am
by bala_bk
Hi,
When i try to start ndo2db server i get the following error.

service ndo2db start
Starting ndo2db:Support for the specified database server is either not yet supported, or was not found on your system.

I tried changing
db_host = 127.0.0.1 and to localhost in ndo2db.cfg, but not successful.

Any pointers is very much appreciated :-)

Here is my system configuration.

---------------------------------------
# uname -a
Linux host-lnx194 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux
---------------------------------------
cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2

---------------------------------------
# nagios -v

Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL

---------------------------------------
mysql -u nagios -p nagios
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.0.95 SUSE MySQL RPM

---------------------------------------
# grep db ndo*
ndo2db.cfg:lock_file=/usr/local/nagios/var/ndo2db.lock
ndo2db.cfg:ndo2db_user=nagios
ndo2db.cfg:ndo2db_group=nagios
ndo2db.cfg:db_servertype=mysql
ndo2db.cfg:db_host=localhost
ndo2db.cfg:db_port=3306
ndo2db.cfg:db_name=nagios
ndo2db.cfg:db_prefix=nagios_
ndo2db.cfg:db_user=nagios
ndo2db.cfg:db_pass=nagios
ndo2db.cfg:debug_file=/usr/local/nagios/var/ndo2db.debug


-Bala.

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Thu Oct 08, 2015 4:30 pm
by tgriep
Could you post your full ndo2db.cfg file and the MYSQL config file (/etc/my.cnf)?

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Thu Oct 08, 2015 10:52 pm
by bala_bk
Hi,
Attached are my config files for ndo and mysql.
-----------------------------------------------------------
# ps -aef|grep mysql
root 2821 1 0 Oct07 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql
mysql 2861 2821 0 Oct07 ? 00:00:20 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-external-locking --port=3306 --socket=/var/lib/mysql/mysql.sock
root 5472 5387 0 10:10 pts/0 00:00:00 grep mysql

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Thu Oct 08, 2015 11:00 pm
by bala_bk
Attached mysql and ndo2db config files.
PS:Renamed my.cnf to my.cnf.cfg for uploading the attachement.

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Fri Oct 09, 2015 1:33 pm
by tgriep
Can you run the following to see if the nagios database exists?

Code: Select all

echo "show databases;" | mysql -u nagios -pnagios
You may need to use the root account to get this to work for you.

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Sun Oct 11, 2015 10:42 pm
by bala_bk
Hi
Yes the database is available and also the tables with prefix "nagios_*"
----------------------------------------------------------------------
# echo "show databases;"|mysql -u nagios -pnagios
Database
information_schema
nagios
test
------------------------------------
# echo "use nagios;show tables"|mysql -u nagios -pnagios
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

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Mon Oct 12, 2015 1:49 pm
by tgriep
Is that the full list of tables from the show tables output?
If that is the full output, you are missing a lot of tables and you should rerun through the install and recreate the database.

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Mon Oct 12, 2015 10:16 pm
by bala_bk
Hi,
No, its just a snapshot of list of tables. Complete list is as below. Also attached my config.log

-----------------------------------------------------------
# echo "use nagios;show tables"|mysql -u nagios -pnagios
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_service_parentservices
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
--------------------------------------------
# gcc --version
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Tue Oct 13, 2015 5:04 pm
by jdalrymple
I don't see a couple of key components:

Code: Select all

grep module /usr/local/nagios/etc/nagios.cfg
grep -v ^$ /usr/local/nagios/etc/ndomod.cfg | grep -v "^#"
If my paths aren't right for your environment, please adjust to suit.

Re: Starting ndo2db:Support for the specified database - FAI

Posted: Tue Oct 13, 2015 11:15 pm
by bala_bk
hi,
------------------------------------
# grep module /etc/nagios/nagios.cfg
# This directive is used to specify an event broker module that should
# to load more than one module. Arguments that should be passed to
# the module at startup are seperated from the module path by a space.
# Do NOT overwrite modules while they are being used by Nagios or Nagios
# The correct/safe way of updating a module is by using one of these methods:
# 1. Shutdown Nagios, replace the module file, restart Nagios
# 2. Delete the original module file, move the new module file into place, restart Nagios
# broker_module=<modulepath> [moduleargs]
#broker_module=/somewhere/module1.o
#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0
broker_module=/usr/local/nagios/bin/ndomod.o config_file="/etc/nagios/ndomod.cfg"
--------------------------------------------------------------------------------

# locate ndomod.cfg
/etc/nagios/ndomod.cfg

# grep -v ^$ /etc/nagios/ndomod.cfg|grep -v "^#"
instance_name=default
output_type=unixsocket
output=/usr/local/nagios/var/ndo.sock
tcp_port=5668
use_ssl=0
output_buffer_items=5000
buffer_file=/usr/local/nagios/var/ndomod.tmp
file_rotation_interval=14400
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=15
data_processing_options=-1
config_output_options=2
acknowledgement_data=1
adaptive_contact_data=1
adaptive_host_data=1
adaptive_program_data=1
adaptive_service_data=1
aggregated_status_data=1
comment_data=1
contact_status_data=1
downtime_data=1
event_handler_data=1
external_command_data=1
flapping_data=1
host_check_data=1
host_status_data=1
log_data=1
main_config_data=1
notification_data=1
object_config_data=1
process_data=1
program_status_data=1
retention_data=1
service_check_data=1
service_status_data=1
statechange_data=1
system_command_data=1
timed_event_data=1