Upgrade from 3.x to 4.0.8 - maps/trends not working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Hmm, the folder in tmp was already deleted, but I've recompiled and installed it over the current install - still those three files are not updated.
I've tried to pull the three files out of the tar and renamed it from trends.c to trends.cgi and moved it into the /sbin folder, but that didn't worked as well. In apache.log I get the error below:

Code: Select all

apache2/error.log
[Tue Aug 25 10:39:41 2015] [error] [client 10.215.21.152] (8)Exec format error: exec of '/usr/local/nagios/sbin/trends.cgi' failed, referer: http://10.215.10.16/nagios/side.php
[Tue Aug 25 10:39:41 2015] [error] [client 10.215.21.152] Premature end of script headers: trends.cgi, referer: http://10.215.10.16/nagios/side.php

Code: Select all

config.log
69 gcc: error: unrecognized option '-V'
70 gcc: fatal error: no input files
112 conftest.c:8:28: fatal error: ac_nonexistent.h: No such file or directory
128 conftest.c:8:28: fatal error: ac_nonexistent.h: No such file or directory
348 conftest.c:68:20: fatal error: socket.h: No such file or directory
423 conftest.c:35:20: fatal error: socket.h: No such file or directory
587 conftest.c:84:17: fatal error: uio.h: No such file or directory
678 conftest.c:51:17: fatal error: uio.h: No such file or directory
775 conftest.c:92:21: error: expected expression before ')' token
880 conftest.c:92:20: error: expected expression before ')' token
985 conftest.c:92:21: error: expected expression before ')' token
1088 conftest.c:62:1: error: void value not ignored as it ought to be
1716 conftest.c:105:18: fatal error: ltdl.h: No such file or directory
1828 conftest.c:72:18: fatal error: ltdl.h: No such file or directory
Attachments
config.log
config.log
(65.06 KiB) Downloaded 217 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by tgriep »

Copying the .c files over won't work. They need to be compiled.
Try going through the instructions in this link to see if you can recompile Nagios and the 3 cgi scripts are updated.
http://geekpeek.net/install-nagios-core-4-on-ubuntu/
Be sure to check out our Knowledgebase for helpful articles and solutions!
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Re-compiling on another machine didn’t do the trick. I digged around in mail-archive and read something about trying to run the cgi from the console and a more specific error came around.
But libgd2 is installed on that machine :(

Code: Select all

./trends.cgi: error while loading shared libraries: libgd.so.3: cannot open shared object file: No such file or directory
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by ssax »

Please recompile and attach the full output so that we can dig through it.
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Ha.
I've recompiled it Nagios on the Nagios host and now it is working.
The only difference I have made is instead using the nagios account (not in sudoers) I've used our normal Linux account with sudo. Now it's working.

Thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by hsmith »

helloworld304423 wrote:Ha.
I've recompiled it Nagios on the Nagios host and now it is working.
The only difference I have made is instead using the nagios account (not in sudoers) I've used our normal Linux account with sudo. Now it's working.

Thanks!
Glad to hear it worked, and will definitely keep an eye out for this in the future. Am I all right to mark this one resolved and close it?
Former Nagios Employee.
me.
helloworld304423
Posts: 9
Joined: Fri Jul 31, 2015 7:50 am

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Post by helloworld304423 »

Thanks for all your help with this one!
You can mark this one as resolved.
Locked