Page 1 of 1
Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 9:08 am
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
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 10:28 am
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
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 11:51 am
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
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 2:48 pm
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]#
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 2:53 pm
by scottwilkerson
You are missing a required package
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 3:05 pm
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
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 3:08 pm
by scottwilkerson
This is something you would need to check with the plugin author on.
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 3:15 pm
by benningtonr
okay, thank you again
Re: Trying to setup new to me plugin
Posted: Tue Feb 26, 2019 3:17 pm
by scottwilkerson
benningtonr wrote:okay, thank you again
Good Luck!
Being the original problem is resolved I will be locking thread.