Page 1 of 2

check_bgp Error

Posted: Fri Nov 08, 2013 9:54 am
by and1100
Hi,

I am trying to use the following script to check BGP Neighbors/peering on our switches.

http://exchange.nagios.org/directory/Pl ... gp/details

However, I receive the following errors:

[root@vmnagios libexec]# ./check_bgp -help
Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/lib/nagios/plugins /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_bgp line 77.
BEGIN failed--compilation aborted at ./check_bgp line 77.

The file has correct permissions:


-rwxr-xr-x. 1 nagios nagios 9928 Nov 8 09:48 check_bgp


Does anyone have any ideas, or perhaps a better script for BGP peer checks on Aristas?

Thank you very much.

Re: check_bgp Error

Posted: Fri Nov 08, 2013 10:35 am
by slansing
What does the following output? It does not look like you have net-snmp installed:

Code: Select all

yum list installed | grep net-snmp

Re: check_bgp Error

Posted: Fri Nov 08, 2013 10:52 am
by and1100
Hello, thank you for the response.

Here is the output:


[root@vmnagios libexec]# yum list installed |grep net-snmp
net-snmp.x86_64 1:5.5-44.el6 @base
net-snmp-libs.x86_64 1:5.5-44.el6 @base
net-snmp-utils.x86_64 1:5.5-44.el6 @base

I have snmp working for our port monitoring on switches currently.

Re: check_bgp Error

Posted: Fri Nov 08, 2013 11:38 am
by slansing
Which version of the check_bgp plugin are you using from that exchange link?

Re: check_bgp Error

Posted: Fri Nov 08, 2013 11:40 am
by and1100
Hello,

I tried to use 0.4 and 0.3. I 'installed' it by creating a file check_bgp and pasting the contents into it. I then changed ownership and permissions.

Re: check_bgp Error

Posted: Fri Nov 08, 2013 12:31 pm
by lmiltchev
This is a 3rd party plugin. I am not familiar with it, but I wonder if "/usr/lib/nagios/plugins" is the correct path to your plugins directory... If it's not, you can open the plugin in a text editor, and modify it, by entering the correct paths.

Re: check_bgp Error

Posted: Fri Nov 08, 2013 1:03 pm
by and1100
Hi,

The path of my Nagios plugin directory is /usr/local/nagios/libexec. Should I modify the code to reflect that?

Thank you.

Re: check_bgp Error

Posted: Fri Nov 08, 2013 1:25 pm
by lmiltchev
Yes, give it a try and see if this is going to fix your issue.

Re: check_bgp Error

Posted: Fri Nov 08, 2013 4:05 pm
by and1100
Same error :(


[root@vmnagios libexec]# ./check_bgp -help
Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_bgp line 77.
BEGIN failed--compilation aborted at ./check_bgp line 77.

Re: check_bgp Error

Posted: Mon Nov 11, 2013 11:48 am
by tmcdonald
It's failing on line 77 of the .4 version, which is the line that says to use Net-SNMP. So it's definitely having a hard time finding the module. Can you run the following and provide the output?

Code: Select all

find / -name SNMP.pm