Trying to setup new to me plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Trying to setup new to me plugin

Post by benningtonr »

junos bgp plugin.JPG
Just installed new MX240 Juniper router. Downloaded plugin from exchange, using the How to manage plugins doc, it fails on first test.

This is the plugin and error:

[root@nagios libexec]# ./check_junos_bgp_state.pl --help
-bash: ./check_junos_bgp_state.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
[root@nagios libexec]#

Another plugin with same extension works fine[root@nagios libexec]# ./check_bgp.pl
Usage:
check_bgp.pl -H <HOSTNAME> [-C <community>] -p <bgppeer>
check_bgp.pl [-h | --help]
check_bgp.pl [-V | --version]


Ideas, thank you
You do not have the required permissions to view the files attached to this post.
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Trying to setup new to me plugin

Post by benningtonr »

Set up a new service using plugin. getting this error

(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_junos_bgp_state.pl, ...) failed. errno is 2: No such file or directory

this is my command:
$USER1$/check_junos_bgp_state.pl -H $HOSTADDRESS$ -C $ARG1$

This is what i get when i test the check:
[[email protected] ~]$ /usr/local/nagios/libexec/check_junos_bgp_state.pl -H 192.168.98.54 -C my-community
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trying to setup new to me plugin

Post by scottwilkerson »

looks like the plugin was uploaded with Windows file endings

Here is an article showing how to fix it
https://support.nagios.com/kb/article/n ... y-474.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Trying to setup new to me plugin

Post by benningtonr »

Okay, there is a convert line ends when uploading plugin, i clicked it and it is supposed to do this:

Convert line endings
Convert plugin's line endings to UNIX line endings. This process will not break already UNIX-formatted files.

. now i am getting this error.

[root@nagios libexec]# ./check_junos_bgp_state.pl -H 192.168.98.54 -C my community
Can't locate Net/IP.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at ./check_junos_bgp_state.pl line 27.
BEGIN failed--compilation aborted at ./check_junos_bgp_state.pl line 27.
You have mail in /var/spool/mail/root
[root@nagios libexec]#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trying to setup new to me plugin

Post by scottwilkerson »

You are missing a required package

Code: Select all

yum install 'perl(Net::IP)' -y
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Trying to setup new to me plugin

Post by benningtonr »

You guys rock, that did it, but i have a question, it says all neighbors are in Established state, but one is not. Is that because it says it is shut down. Which it is, well the interface is down.


All enabled BGP Neighbors are in Established state
Peer: x.x.x.109 Established
Peer: x.x.x.9 Established
Peer: x.x.x.198Shutdown
Peer: x.x.x.46 Established
Peer: x.x.x.50 Established
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trying to setup new to me plugin

Post by scottwilkerson »

This is something you would need to check with the plugin author on.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: Trying to setup new to me plugin

Post by benningtonr »

okay, thank you again
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trying to setup new to me plugin

Post by scottwilkerson »

benningtonr wrote:okay, thank you again
Good Luck!

Being the original problem is resolved I will be locking thread.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked