0

I am using ndoutils-2.0.0 for Storing Nagios data directory into MariaDB Database.

For this I am using the below URL :

http://linuxkarthik.blogspot.in/2011/02/how-to-install-ndoutils-on-centos.html

In my case MariaDB database and Nagios in on different Server.

After all installation and configuration when I restart my ndo2db and nagios service

systemctl restart ndo2db.service
systemctl restart nagios.service

I got the following Error on Nagios Logs

[1482310038] ndomod: NDOMOD 2.0.0 (02-28-2014) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1482310038] ndomod: I've been compiled with support for revision 402 of the internal Nagios object structures, but the Nagios daemon is currently using revision 403.  I'm going to unload so I don't cause any problems...
[1482310038] Error: Function nebmodule_init() in module '/usr/local/nagios/bin/ndomod.o' returned an error.  Module will be unloaded.
[1482310038] Event broker module '/usr/local/nagios/bin/ndomod.o' deinitialized successfully.
[1482310038] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1482310038] Error: Module loading failed. Aborting.

I added the following line into /usr/local/nagios/etc/nagios.cfg file

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg

Please help me to fix this issue.

I am using CentOS 7, Nagios Core 4.2.2, NDOUtils v2.0.0 and MariaDB-5.5.50.

user3441151
  • 1,880
  • 6
  • 35
  • 79

1 Answers1

0

All you need to do is upgrade your NDOUtils to version 2.1.0 in order to get it working!

Nagios Support
  • 561
  • 3
  • 11
  • why I need to upgrade? – user3441151 Dec 22 '16 at 06:40
  • Sorry for typo, I am using MariaDB v5.5.50. – user3441151 Dec 22 '16 at 06:53
  • Because the version of NDO you're using is incompatible with the version of Nagios you're using. – Nagios Support Dec 22 '16 at 15:07
  • I am using Nagios Core 4.2.2. So which version of NDOUtils are compatible with Nagios Core 4.2.2. – user3441151 Dec 26 '16 at 07:33
  • Now I am using ndoutils-2.1.2 and when I run make all command it gives the error. "db.c: In function ‘ndo2db_db_init’: db.c:169:29: error: ‘ndo2db_dbconninfo’ has no member named ‘mysql_conn’ if(!mysql_init(&idi->dbinfo.mysql_conn))" – user3441151 Dec 26 '16 at 09:09
  • Straight from the help guide: `If the configure script is unable to locate your MySQL development libraries, you may need to help it out by using the --with-mysql-lib or option. Here's an example: ./configure --with-mysql-lib=/usr/lib/mysql` Make sure to first install the mariadb development package with I believe: `yum install MariaDB-devel` – Nagios Support Dec 26 '16 at 15:25
  • Step 1 : yum install MariaDB-devel Step 2 : ./configure --with-mysql-lib=/usr/lib64/mysql Step 3 : make all. Again it gives the same error. – user3441151 Dec 27 '16 at 06:29
  • if you stopped at `make all` then the new broker module didn't get copied to the proper directory. You also need to `make install`. Once that's done, you also need to run the `./installdb` script as indicated in the make output. If you're following the guide you linked to, then your steps will be similar to those ones. However, I just spun up a cent7 vm and got the environment matched to the description you had, and this all worked perfectly for me. The package is all lowercase: `yum install mariadb-devel` I don't know why I capitalized it the way I did. – Nagios Support Dec 27 '16 at 15:17
  • Also, I just ran a `make clean`, then `yum remove mariadb-devel`, then tried `make install` again and I get the same error you were getting - so I strongly suspect that its lacking that package. Another thing you might also try is just to `./configure --enable-mysql` it should be able to locate the libraries that way. – Nagios Support Dec 27 '16 at 15:19
  • You are right. Step1 : "yum install mariadb-devel" Step2 : "./configure --with-mysql-lib=/usr/lib64/mysql" Step3 : "./configure --enable-mysql" Step4 : "make all" Step5 : "make install" Step6 : "change db connection" Than it works for me. – user3441151 Dec 28 '16 at 07:53