5.4.13 -> 5.5.2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jsmelser
Posts: 8
Joined: Thu Mar 10, 2016 4:43 pm

5.4.13 -> 5.5.2

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: 5.4.13 -> 5.5.2

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jsmelser
Posts: 8
Joined: Thu Mar 10, 2016 4:43 pm

Re: 5.4.13 -> 5.5.2

Post 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"
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: 5.4.13 -> 5.5.2

Post by tgriep »

Thanks for the feedback and the changes, I'll add it to my notes.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 5.4.13 -> 5.5.2

Post by lmiltchev »

Were you able to recompile the plugins? Is your issue resolved? Let us know if you have any more questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jsmelser
Posts: 8
Joined: Thu Mar 10, 2016 4:43 pm

Re: 5.4.13 -> 5.5.2

Post by jsmelser »

Yes, I was able to upgrade to 5.5.2 once I made the changes. Thanks everyone!
Locked