Help on installing check_snmp_oid plugin

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.
Locked
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

Help on installing check_snmp_oid plugin

Post 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
Last edited by sartecat on Fri Jul 21, 2017 4:04 pm, edited 2 times in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Help on installing check_snmp_oid plugin

Post 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.
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

Re: Help on installing check_snmp_oid plugin

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Help on installing check_snmp_oid plugin

Post by dwhitfield »

What's the output of which perl? What user are you when you run the check?
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

Re: Help on installing check_snmp_oid plugin

Post by sartecat »

[root@montest libexec]# which perl
/usr/bin/perl

I'm root
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Help on installing check_snmp_oid plugin

Post 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.
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

Re: Help on installing check_snmp_oid plugin

Post by sartecat »

That was it! Thank you!
Locked