Page 1 of 1

NDOUtils ndo2db service not working

Posted: Wed Feb 08, 2017 10:03 am
by jspence
Hello,
I have MySQL installed, now installing NDOUtils.
So far have done the following:

cd /tmp/ndoutils
./configure
make all
make install
make install-init

Initialize the database:
cd /tmp/ndoutils/db
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios

cp /tmp/ndoutils/config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
chmod 664 /usr/local/nagios/etc/ndo2db.cfg
cp /tmp/ndoutils/config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
chmod 664 /usr/local/nagios/etc/ndomod.cfg

I can't seem to get this daemon working.
ndo2db is located in /usr/local/nagios/bin.
Also, ndo2db-2x,3x, and 4x are in /tmp/ndoutils/src.
I have tried chkconfig --add ndo2db and get No such file or service (ndo2db is not in /etc/init.d).
I tried moving /usr/local/nagios/bin/ndo2db to /etc/init.d, as well as the ndo2db?x to /etc/init.d and I
get the same results.

What could I be doing wrong?

Thank you,
JSpence.

Re: NDOUtils ndo2db service not working

Posted: Wed Feb 08, 2017 1:03 pm
by jspence
The instructions I am using are at:
https://support.nagios.com/kb/article.php?id=406

Where it says to do:
Configure ndo2db service and start it:
chkconfig --add ndo2db
chkconfig ndo2db on
service ndo2db start

Do this instead as a workaround:
/usr/local/nagios/bin/ndo2db -c /etc/local/nagios/etc/ndo2db.cfg

This will start the daemon. You (I) can then continue with the instructions.

Thanks,
Close if you want.
JSpence

Re: NDOUtils ndo2db service not working

Posted: Wed Feb 08, 2017 1:06 pm
by rkennedy
Thanks for sharing - was this the solution that worked for you to get it working? If so, I'll pass it on to my team member who handles our documentation for review.

One part I noticed you didn't mention was configuring the broker module which is why I ask.

Code: Select all

echo '' >> /usr/local/nagios/etc/nagios.cfg
echo ' #NDOUtils Broker Module' >> /usr/local/nagios/etc/nagios.cfg
echo 'broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg' >> /usr/local/nagios/etc/nagios.cfg

Re: NDOUtils ndo2db service not working

Posted: Wed Feb 08, 2017 2:33 pm
by jspence
>> One part I noticed you didn't mention was configuring the broker module which is why I ask.

Yes, after I got the daemon running (not as a service), I continued with the instructions and everything fell into place as stated in the instructions.

Thanks,
JSpence.

Re: NDOUtils ndo2db service not working

Posted: Wed Feb 08, 2017 2:37 pm
by rkennedy
Alright - thanks for sharing the solution. I passed on this thread to my coworker who handles the documentation.

Going to close this one up as it's resolved too! Feel free to create a new thread, if you have questions in the future.