check_snmpv3: cannot execute binary file

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.
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

check_snmpv3: cannot execute binary file

Post by pratik.patel »

I have 32-bit linux machine running nagios and I want to use check_snmp3 on it.
I am getting below error:
[root@xxxxx ~]# /usr/lib/nagios/plugins/check_snmpv3 -V
-bash: /usr/lib/nagios/plugins/check_snmpv3: cannot execute binary file

I copied check_snmp3 file from another nagios server that is ruuning on 64 bit linux machine.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmpv3: cannot execute binary file

Post by dwhitfield »

Do you know where check_snmpv3 came from originally? I don't see it on the exchange. It's not one we install by default.

If it's check_snmp with a different file name, then you can just recompile it: http://nagios-plugins.org/doc/man/check_snmp.html

There are other check_snmp plugins out there, so you'll need to use the link above to see if it is ours, if you are unsure.
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: check_snmpv3: cannot execute binary file

Post by pratik.patel »

Its the same check_snmp, I have renamed it to check_snmpv3.
actually nagios server has old plugins and check_snmpv3 is working fine on another server (64-bit Linux server).
I just copied the same on 32-bit nagios Linux machine and getting this error.
How to recompile it to be used on 32-bit mchine ?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmpv3: cannot execute binary file

Post by dwhitfield »

Your other ticket is in Nagios XI. Is this an XI server or a core server? If it's XI, then you can follow the architecture information at https://assets.nagios.com/downloads/nag ... ios-XI.pdf (page 6). Otherwise, you'll need to follow https://support.nagios.com/kb/article.php?id=515 for your operating system.
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: check_snmpv3: cannot execute binary file

Post by pratik.patel »

This issue is with another sever which is nagios core
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmpv3: cannot execute binary file

Post by dwhitfield »

Just find your OS at https://support.nagios.com/kb/article.php?id=515 . If you can't find yours, find the closest thing. If you aren't sure, cat /etc/*-release may be of use.
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: check_snmpv3: cannot execute binary file

Post by pratik.patel »

[xxxxxx ~]# cat /etc/*-release
CentOS release 5.11 (Final)

32-bit
Not working here


[xxxxxx ~]$ cat /etc/*-release
CentOS release 6.8 (Final)

64-bit
working fine here

also find the attched check_snmpv3 file
Attachments
check_snmpv3.zip
(85.16 KiB) Downloaded 131 times
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmpv3: cannot execute binary file

Post by dwhitfield »

You're in luck. CentOS is the very first option at https://support.nagios.com/kb/article.php?id=515. Just make sure you are using the CentOS 5 instructions when it breaks off into different versions.
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: check_snmpv3: cannot execute binary file

Post by pratik.patel »

issue is :
[root@xxxxx ~]# /usr/lib/nagios/plugins/check_snmpv3 -V
-bash: /usr/lib/nagios/plugins/check_snmpv3: cannot execute binary file

I am able to run this " /usr/lib/nagios/plugins/check_snmpv3 -V" on 64-bit machine.
Last edited by pratik.patel on Thu May 11, 2017 3:51 am, edited 1 time in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: check_snmpv3: cannot execute binary file

Post by dwhitfield »

You just needed to scroll down, but here you go:

Code: Select all

yum install -y gcc glibc glibc-common make gettext automake wget openssl-devel net-snmp net-snmp-utils epel-release
yum install -y perl-Net-SNMP
cd /tmp
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
tar xzf autoconf-2.60.tar.gz 
cd /tmp/autoconf-2.60
./configure 
make
make install
cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.0.tar.gz
tar zxf nagios-plugins.tar.gz
cd /tmp/nagios-plugins-release-2.2.0/
./tools/setup
./configure
make
make install
You could, of course, just recompile check_snmp, you are going to have this issue with any plugin copied from a 64-bit system, so you might as well just recompile all the standard ones.
Locked