check_bgp Error

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.
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

check_bgp Error

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_bgp Error

Post 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
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Re: check_bgp Error

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_bgp Error

Post by slansing »

Which version of the check_bgp plugin are you using from that exchange link?
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Re: check_bgp Error

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_bgp Error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Re: check_bgp Error

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_bgp Error

Post by lmiltchev »

Yes, give it a try and see if this is going to fix your issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Re: check_bgp Error

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_bgp Error

Post 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
Former Nagios employee
Locked