Page 1 of 1

Plugin install error

Posted: Wed Jul 11, 2012 8:03 am
by Callahan
Hi,

So, I've installed the latest version of Nagios, set up Apache, locked it down with an SSL and all works in the sense that I can get to my nagios box and see the main page and all the links within it work. The trouble is that the plugins won't install so I am constantly getting told that my server is dead.

OS: Scientific Linux
Nagios version: 3.4.1
Plugins version: 1.4.16

I run ./configure --with-nagios-user=nagios --with-nagios-group=nagios with no issues that I can see.

I then run make and it bails out with the error being the following:

Code: Select all

check_http.c:312: error: 'ssl_version' undeclared.
I have looked at the source code and sure enough, at line 312, it runs the following check:

Code: Select all

311  if (optarg == NULL || c != 'S')
312  ssl_version = 0;
313  else {
314  ssl_version = atoi(optarg);
315  if (ssl_version < 1 || ssl_version > 3)
316  usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)"));
317  }
So what is optarg and why is it being returned as NULL by my OS causing the ssl_version to be set as 0 and then causing the make command to fail? (Obviously I could be reading that wrong).
The trouble is that I'm not really sure what it's complaining about. I have the latest version of OpenSSL installed (openssl-1.0.0-20.el6_2.5.x86_64) so would have though that that would have me covered off with any SSL related issues.

I've looked into this problem as much far as my knowledge of Linux will take me! Can anyone tell me what I'm missing?

Thanks for your help.

Re: Plugin install error

Posted: Wed Jul 11, 2012 10:37 am
by agriffin
Have you tried adding '--with-openssl=<path-to-openssl-installation>' to your configure command?

Re: Plugin install error

Posted: Wed Jul 11, 2012 12:04 pm
by Callahan
Ha! I'd just spent the afternoon figuring that very thing out. :-) The result of the ./configure shows that it's not found the openssl libs so using the switch you recommend will enable me to point it to the openssl library. Thing is now, finding it. I've looked in every lib folder I have an all I can find is the openssl exe in /usr/bin and pointing the --with-openssl= to that (I was getting desperate!), doesn't work (unsurprisingly). So where (on a Scientific Linux box) would the openssl lib be?? Is there a simple command line tool I can use to find it's hiding place?

Thanks again.

Re: Plugin install error

Posted: Wed Jul 11, 2012 12:13 pm
by Callahan
Had a rethink and as it's found perl in the same location (/usr/bin/pearl), should I actually be pointing it at the location (/usr/bin/openssl) enclosed in inverted commas?

Re: Plugin install error

Posted: Wed Jul 11, 2012 12:35 pm
by agriffin
Try /usr/include/openssl. (I found this by running 'rpm -ql openssl-devel', which lists the files belonging to the openssl-devel package.)

Re: Plugin install error

Posted: Wed Jul 11, 2012 5:27 pm
by Callahan
That fixed it! Ok, so here's my last questions, just out of interest. Clearly the libraries weren't installed. So (and forgive the newbie question), the install of openssl doesn't need the libraries to install/run in the first place?
Secondly, what does the l stand for/do in the RPM query (I know what the -q does).
I've generally always steered away from installing devel packages as I've assumed they were only really needed if you were developing apps, etc on your box, hence the "devel" in the name. Clearly not the case then?

Lastly, can I suggest to the authors of the quick start instructions add this to their instructions (http://nagios.sourceforge.net/docs/3_0/ ... edora.html for example). It would have saved me over half a day of head scratching. Considering the instructions recommend securing the install with an SSL (which I did and hence put me in this situation), it would make it a lot easier if they mentioned the requirement to install openssl-devel too.

Thanks for your help with this.

Re: Plugin install error

Posted: Fri Jul 13, 2012 9:26 am
by agriffin
Callahan wrote:That fixed it! Ok, so here's my last questions, just out of interest. Clearly the libraries weren't installed. So (and forgive the newbie question), the install of openssl doesn't need the libraries to install/run in the first place?
I assume you mean nrpe here rather than openssl. You can use nrpe without SSL support, which is why it's optional. However, it isn't recommended and both machines will need to be compiled without SSL support I think.
Callahan wrote:Secondly, what does the l stand for/do in the RPM query (I know what the -q does).
I've generally always steered away from installing devel packages as I've assumed they were only really needed if you were developing apps, etc on your box, hence the "devel" in the name. Clearly not the case then?
It's actually a lowercase L. It stands for 'list', and it just lists the files in the specified package. The devel packages contain library headers, which are needed for compiling programs that link against the library. They're labeled devel because typically compilation is not something end users do.
Callahan wrote:Thanks for your help with this.
You're welcome! Glad you got it working.