Page 2 of 2
Re: Can nagios be used to monitor embedded devices?
Posted: Wed Apr 03, 2013 9:16 pm
by speerless
lmiltchev wrote:I would recommend compiling NRPE from source. You will need openssl and openssl devel packages. Give it a try, and let us know of any issues you ran into. We will try to help you out. Here's the official NRPE documentation:
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
i had tried it before,first ,i compiling openssl,i think i should compiling the openssl-devel,but i can't find the source packet for cross compiling like openssl(if the openssl-devel is must,can you help me find it),so i past it .when i compiling NRPE,i have problems,it is: when i './configure',it tell(the openssl directory is where i cross compiling):
Code: Select all
checking for SSL headers... SSL headers found in /share/arm_linux
checking for SSL libraries... SSL libraries found in /share/arm_linux/lib
*** Generating DH Parameters for SSL/TLS ***
./configure: line 6703: /share/arm_linux/bin/openssl: cannot execute binary file
checking for Kerberos include files... could not find include files
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating subst
config.status: creating include/config.h
but the normal situation should be :
Code: Select all
checking for SSL headers... SSL headers found in /usr
checking for SSL libraries... SSL libraries found in /usr/lib
*** Generating DH Parameters for SSL/TLS ***
Generating DH parameters, 512 bit long safe prime, generator 2
This is going to take a long time
.................+.........................................+........................+.+...............+.......................................+...................................+.......+............+..........................................+.........................+..+..........+...........+....................+..+.......+.......+...+..+......+..........+......++*++*++*++*++*++*
checking for Kerberos include files... could not find include files
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating subst
config.status: creating include/config.h
config.status: include/config.h is unchanged
so i don't how to solve it,i hope you can help me ,thank you!
Re: Can nagios be used to monitor embedded devices?
Posted: Thu Apr 04, 2013 10:06 am
by abrist
openssl-devel is the headers package for openssl. If you build openssl from source you essentially have the headers. I myself use gentoo linux for crossdev related tasks, though archlinux is fantastic as well. You may have to create a cross-compile tool-chain to build the dependencies for you target arch. This can be a herculean task with certain distros , target archs, or complex packages.
speerless wrote:./configure: line 6703: /share/arm_linux/bin/openssl: cannot execute binary file
This might be a issue as you cannot run the arm bin on another arch. I assume since you are cross-compiling that you are not actually building from within the environment? Do you have a whole build/compiling environment in the arm chroot? If so, you could use an emulator like
qemu to build the nrpe package natively.
Re: Can nagios be used to monitor embedded devices?
Posted: Tue Apr 09, 2013 12:23 am
by speerless
abrist wrote:openssl-devel is the headers package for openssl. If you build openssl from source you essentially have the headers. I myself use gentoo linux for crossdev related tasks, though archlinux is fantastic as well. You may have to create a cross-compile tool-chain to build the dependencies for you target arch. This can be a herculean task with certain distros , target archs, or complex packages.
speerless wrote:./configure: line 6703: /share/arm_linux/bin/openssl: cannot execute binary file
This might be a issue as you cannot run the arm bin on another arch. I assume since you are cross-compiling that you are not actually building from within the environment? Do you have a whole build/compiling environment in the arm chroot? If so, you could use an emulator like
qemu to build the nrpe package natively.
thanks for your detailed answer,i think i have had a whole build/compiling environment and succussfully cross compiling the nagios-plugin and openssl,so the problem now is at the configure of the nrpe:/share/arm_linux/bin/openssl: cannot execute binary file. i found a similar problem on the internet :
http://stackoverflow.com/questions/6559 ... piling-php
Is it possible that because i missed some parameters during the configure that lead to the error? can i solve this problem in another way instead of use an emulator because i am not good at it.
if the emulator is necessary,when i executed the binary file at the qemu ,what i should do next? i mean how i finish my configure of nrpe,do it at qemu?
i am a Chinese ,so forgive my poor English!
please help me ,thanks you again!
Re: Can nagios be used to monitor embedded devices?
Posted: Tue Apr 09, 2013 11:10 am
by abrist
This is a classic case of cross-compiling circular nastiness. You could try sym-linking your systems openssl bin (for the hardware arch) into the /share/arm_linux/lib (temporarily rename the arm ssl bin) as you need to run the bin to generate a key, but the arm version will not run on your system's arch. Build nrpe and then remove the symlink and rename the arm bin back to what it should be.
The big issue with qemu is that you need a full cross-compiled environment (kernel, base system, build tools and all) in your arm chroot, and then "boot" into it using qemu. Then you could compile "natively". But this option is a lot of work if you are just targeting a few packages for cross-compilation. I would suggest that you check qemu out (or one of the other arm emulators), if not for this project, but for a future one as it really streamlined my cross-compiling process by giving me an easy to access test environment before I pushed the built packages to an actual arm device. You may also find that you have to sometimes statically link libraries in arm-land (especially if you are targeting an android "Bionic C" device).
Re: Can nagios be used to monitor embedded devices?
Posted: Mon Apr 15, 2013 8:40 pm
by speerless
True thanks for your help ,i have worked it out by modify the makefile! thank you again!
Re: Can nagios be used to monitor embedded devices?
Posted: Tue Apr 16, 2013 11:00 am
by slansing
Great thanks for letting us know this was resolved!