Page 1 of 1

monitoring a 32bit linux host

Posted: Tue Jul 01, 2014 8:40 am
by MichielvM
hi all,

I've run into an issue I'm not sure whether or not it should be posted here. But since most of my work up to this point was done on the command line, it rules out Xi IMHO.
The issue is this:

A customer requested 3 new linux servers to be monitored, 2 of them running 64 bit Centos 6.5 and 1 running 32 bit RHEL5. The application on it can not handle 64bit architecture in case anyone asks.
I managed to to get the first 2 running using NRPE.

We could not find any well documented 32bit version of NRPE, so we decided to use SSH (also because one of my colleagues had walked that road before)
To make a long story short: We almost have it working, exchanged rsa keys between nagios and host, copied the plugins to /usr/local/nagios/libexec etc. etc.. But I seem to need a 32bit version of the scripts/plugins.

Code: Select all

[root@nagios01 ~]# /usr/local/nagios/libexec/check_by_ssh -H <ipaddress> -C "/usr/local/nagios/libexec/check_load -w 5,5,5 -c 10,10,10"
output:

Code: Select all

Remote command execution failed: bash: /usr/local/nagios/libexec/check_load: cannot execute binary file
According to google resources that means that I'm trying to run 64 bit scripts on a 32 bit OS.
I'm sure that's correct, but I can't find any....

Thanks in advance.
Michiel

Re: monitoring a 32bit linux host

Posted: Tue Jul 01, 2014 8:43 am
by eloyd
You need to compile the plugins on the 32-bit remote host.

Re: monitoring a 32bit linux host

Posted: Wed Jul 02, 2014 2:18 am
by MichielvM
OK, thanks.
Is there any good documentation on how to do that?
I hail from Microsoft surroundings. Have been scratching the linux surface for some years, but only just began to dive deeper..

Re: monitoring a 32bit linux host

Posted: Wed Jul 02, 2014 2:29 am
by Box293
Here are some instructions for installing NRPE (document is aimed at Nagios XI users but should also work fine for core).
http://assets.nagios.com/downloads/nagi ... _Agent.pdf

Re: monitoring a 32bit linux host

Posted: Mon Jul 07, 2014 8:59 am
by MichielvM
We managed to get it working using snmp.

We we're a bit surprised that things are pretty standard as long as you're using 64bit OS, but not for 32bit.
Is there a reason for that?
I know that 32bit has been passed over by 64. But nagios has been around for a few years.

Re: monitoring a 32bit linux host

Posted: Mon Jul 07, 2014 9:14 am
by scottwilkerson
The plugins work on either but need to be compiled on the machine you are using, not transferred between architectures.

Re: monitoring a 32bit linux host

Posted: Mon Jul 07, 2014 10:10 am
by eloyd
This is the same reason your Windows machine has a "Program Files" and a "Program Files(x86)" directory. Different libraries need to be linked to the final executable based on what length registers (32 versus 64 bit) are used in the code. This is not a Nagios issue, it is a system architecture issue that basically has no solution.

The same problem existed when 8-bit computers became 16 and 16-bit computers became 32.