Page 1 of 1

5.4.13 -> 5.5.2

Posted: Tue Aug 07, 2018 11:58 am
by jsmelser
I am getting a build error when I upgrade:

/bin/sh ../libtool --tag=CC --mode=link gcc -DNP_VERSION='"2.2.1"' -g -O2 -L. -o check_ide_smart check_ide_smart.o libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a -lpthread -ldl
libtool: link: gcc -DNP_VERSION=\"2.2.1\" -g -O2 -o check_ide_smart check_ide_smart.o -L. libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a -lpthread -ldl
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap -I/usr/include -DNP_VERSION='"2.2.1"' -g -O2 -MT check_uptime.o -MD -MP -MF .deps/check_uptime.Tpo -c -o check_uptime.o check_uptime.c
mv -f .deps/check_uptime.Tpo .deps/check_uptime.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -DNP_VERSION='"2.2.1"' -g -O2 -L. -o check_uptime check_uptime.o libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a -lrt -lpthread -ldl
libtool: link: gcc -DNP_VERSION=\"2.2.1\" -g -O2 -o check_uptime check_uptime.o -L. libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a -lrt -lpthread -ldl
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap -I/usr/include -I/usr/include/mysql -I/usr/include/mysql/mysql -DNP_VERSION='"2.2.1"' -I/usr/include/mysql -I/usr/include/mysql/mysql -g -O2 -MT check_mysql-check_mysql.o -MD -MP -MF .deps/check_mysql-check_mysql.Tpo -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c
check_mysql.c:61:24: error: ‘MYSQL_PORT’ undeclared here (not in a function)
unsigned int db_port = MYSQL_PORT;
^
make[2]: *** [check_mysql-check_mysql.o] Error 1
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagiosplugins/nagios-plugins-2.2.1'
make: *** [all] Error 2

We are using the latest Redhat 7 Enterprise.

Re: 5.4.13 -> 5.5.2

Posted: Tue Aug 07, 2018 2:02 pm
by tgriep
I added the following instructions to your ticket.

When using the newer MariaDB package from Mariadb, they changed some settings in the header files which will cause the
check_mysql
and the
check_mysql_query
plugins to not compile.


To fix this, you can either go back to the default MariaDB packages or manually compile the plugins.

To manually compile the software, you will have to extract the plugins package, edit the c files and then run the XI install/
If the Nagios XI package is in the /tmp/nagiosxi folder, do the following

Code: Select all

cd /tmp/nagiosxi/subcomponents/nagiosplugins
tar xvfz nagios-plugins-2.2.1.tar.gz
cd nagios-plugins-2.2.1/plugins
Edit the check_mysql.c and check_mysql_query.c files and add the following line

Code: Select all

#include <server/private/custom_conf.h>
Below this line

Code: Select all

#include <errmsg.h>

Save the file and install Nagios XI using the fullinstall script.

Re: 5.4.13 -> 5.5.2

Posted: Tue Aug 07, 2018 3:23 pm
by jsmelser
After making the above changes, since I dont want to downgrade, I also had to make comment out these lines:

Code: Select all

# Delete the old directory
#rm -rf "$pkgname"

# Extract archive
#tar -xzf "$pkgname.tar.gz"

# Apply our patches
#./apply-patches "$pkgname"

Re: 5.4.13 -> 5.5.2

Posted: Tue Aug 07, 2018 4:41 pm
by tgriep
Thanks for the feedback and the changes, I'll add it to my notes.

Re: 5.4.13 -> 5.5.2

Posted: Tue Aug 07, 2018 4:43 pm
by lmiltchev
Were you able to recompile the plugins? Is your issue resolved? Let us know if you have any more questions.

Re: 5.4.13 -> 5.5.2

Posted: Wed Aug 08, 2018 9:41 am
by jsmelser
Yes, I was able to upgrade to 5.5.2 once I made the changes. Thanks everyone!