Operating System - HP-UX
1753797 Members
7534 Online
108805 Solutions
New Discussion юеВ

make of nrpe (nagios) plugin on hp-ux

 
jorge palma
Occasional Advisor

make of nrpe (nagios) plugin on hp-ux


Hi.

I'm trying to instal nrpe (nagios) plugin on a hp-ux B.11.31 U ia64 box.

I was reading previous messages, but anyway:

1) I exec:

./configure --with-ssl-lib=/opt/openssl/lib/hpux64 --with-nagios-user=nagios --with-nagios-group=users

and works fine. If i omit SSL location ./configure i get back the error:

checking for SSL headers... SSL headers found in /usr
checking for SSL libraries... configure: error: Cannot find ssl libraries


2) make all command is:


bash-3.2$ make all
cd ./src/; make ; cd ..
cc -g -I/usr/include/openssl -I/usr/include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/opt/openssl/lib/hpux64 -lssl -lcrypto -lnsl -lwrap ./snprintf.o
(Bundled) cc: warning 922: "-g" is unsupported in the bundled compiler, ignored.
nrpe.c:
"nrpe.c", line 617: error #2020: identifier "LOG_AUTHPRIV" is undefined
log_facility=LOG_AUTHPRIV;
^

"nrpe.c", line 619: error #2020: identifier "LOG_FTP" is undefined
log_facility=LOG_FTP;
^

"nrpe.c", line 852: warning #2167-D: argument of type "socklen_t *" is
incompatible with parameter of type "int *"
rc=getpeername(new_sd,&addr,&addrlen);
^

"nrpe.c", line 865: warning #4232-D: conversion from "struct sockaddr *" to a
more strictly aligned type "struct sockaddr_in *" may cause
misaligned access
nptr=(struct sockaddr_in *)&addr;
^

2 errors detected in the compilation of "nrpe.c".
utils.c:
*** Error exit code 2

Stop.
*** Error exit code 1

Stop.
bash-3.2$

Any idea about what is missing?

Thanks in advance.
6 REPLIES 6
Matti_Kurkela
Honored Contributor

Re: make of nrpe (nagios) plugin on hp-ux

1.) The configure script obviously cannot find the SSL libraries on its own on HP-UX, and needs a little help from the sysadmin (= the --with-ssl-lib option).

So you've already found the correct solution for this.

If you wish, you might send an enhancement request to the author of nrpe: "In HP-UX 11.31, the OpenSSL library is located at /opt/openssl/lib/hpux64. Could you please make configure look for it automatically from there too?"

2.)
> (Bundled) cc: warning 922: "-g" is unsupported in the bundled compiler, ignored.

The beginning of the message "(Bundled) cc:" reveals that you're using the default stripped-down K&R C compiler, which is not very useful in compiling any modern ANSI-compliant C code. It is intended for recompiling the HP-UX kernel only.

In HP-UX, the full-featured HP ANSI C compiler is an extra cost item: if you have license for it, install it and then try again. Or alternatively install & use the free gcc compiler instead.

MK
MK
Olivier Masse
Honored Contributor

Re: make of nrpe (nagios) plugin on hp-ux

I have build instructions here along with a .depot for ia64 if you'd rather not want to build it yourself.
http://www.mayoxide.com/naghpux

Dennis Handly
Acclaimed Contributor

Re: make of nrpe (nagios) plugin on hp-ux

>MK: using the default stripped-down K&R C compiler

On Integrity this isn't K&R since not available.
jorge palma
Occasional Advisor

Re: make of nrpe (nagios) plugin on hp-ux

Hi,

After install gcc, "make all" command results are:

bash-3.2$ gcc
gcc: no input files
bash-3.2$ make all
cd ./src/; make ; cd ..
gcc -g -O2 -I/usr/include/openssl -I/usr/include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/opt/openssl/lib/hpux64 -lssl -lcrypto -lnsl -lwrap ./snprintf.o -liberty
nrpe.c: In function 'get_log_facility':
nrpe.c:617: error: 'LOG_AUTHPRIV' undeclared (first use in this function)
nrpe.c:617: error: (Each undeclared identifier is reported only once
nrpe.c:617: error: for each function it appears in.)
nrpe.c:619: error: 'LOG_FTP' undeclared (first use in this function)
nrpe.c: In function 'wait_for_connections':
nrpe.c:852: warning: passing argument 3 of 'getpeername' from incompatible pointer type
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

I thought syslog.log file had wrong permissions, but chmod 777 did nothing.

├В┬┐Any idea?.

Thanks.
Dennis Handly
Acclaimed Contributor

Re: make of nrpe (nagios) plugin on hp-ux

nrpe.c:617: error: 'LOG_AUTHPRIV' undeclared
nrpe.c:619: error: 'LOG_FTP' undeclared

I assume if these aren't in , you can't use them.
jorge palma
Occasional Advisor

Re: make of nrpe (nagios) plugin on hp-ux

Hi.

I found the solution here:

http://tarique21.wordpress.com/2009/08/21/issues-while-compiling-nrpe-on-sparc-solaris/

You have to change on nrpe.c file (line 619 aprox)

else if(!strcmp(varvalue,"authpriv"))
log_facility=LOG_AUTHPRIV;
else if(!strcmp(varvalue,"ftp"))
log_facility=LOG_FTP;

for

else if(!strcmp(varvalue,"authpriv"))
log_facility=LOG_AUTH;
else if(!strcmp(varvalue,"ftp"))
log_facility=LOG_DAEMON;


Thanks