Page 1 of 1

Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 2:16 pm
by sartecat
So I wanted to have the check_snmp_oid plugin. I downloaded the plugin to my libexec folder, using the following website:
https://exchange.nagios.org/directory/P ... id/details
I also changed the permissions using chmod 755 check_snmp_oid
However, I'm getting the following errors when I test it.

-bash: ./check_snmp_oid: /usr/local/bin/perl: bad interpreter: No such file or directory

Re: Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 2:26 pm
by dwhitfield
It looks like you don't have perl installed, or have it installed in a location where the plugin is not looking.

yum install perl -y might do it, but since I don't know what OS you are running, it's hard to say.

Re: Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 2:29 pm
by sartecat
I have CentOS 7. Running Nagios Core 4.3.2.
I just installed perl by issuing yum install perl -y
I tried to issue ./check_snmp_oid --help again and same error happens.

Re: Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 2:32 pm
by dwhitfield
What's the output of which perl? What user are you when you run the check?

Re: Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 2:34 pm
by sartecat
[root@montest libexec]# which perl
/usr/bin/perl

I'm root

Re: Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 3:57 pm
by dwhitfield
The first line of the script is #! /usr/local/bin/perl -w. You'll need to change that to #! /usr/bin/perl -w. Let us know the presumably new error, if that doesn't work for you.

Re: Help on installing check_snmp_oid plugin

Posted: Fri Jul 21, 2017 4:04 pm
by sartecat
That was it! Thank you!