diff --git a/check_junos_bgp.pl b/check_junos_bgp.pl index 193e5ba..fdef493 100755 --- a/check_junos_bgp.pl +++ b/check_junos_bgp.pl @@ -39,6 +39,8 @@ use warnings; use utf8; +use Data::Dumper; + use POSIX qw( :termios_h ); use Nagios::Plugin; @@ -284,6 +286,8 @@ sub send_query $res = $device->$query(); } + verbose(5, "Got response: " . Dumper(\$res)); + if (! ref $res) { return "ERROR: Failed to execute query '$query'"; } diff --git a/check_junos_vc.pl b/check_junos_vc.pl index d5a4422..d90bcbb 100755 --- a/check_junos_vc.pl +++ b/check_junos_vc.pl @@ -39,6 +39,8 @@ use warnings; use utf8; +use Data::Dumper; + use POSIX qw( :termios_h ); use Nagios::Plugin; @@ -501,6 +503,8 @@ sub send_query $res = $device->$query(); } + verbose(5, "Got response: " . Dumper(\$res)); + if (! ref $res) { return "ERROR: Failed to execute query '$query'"; } diff --git a/perl/lib/Nagios/Plugin/JUNOS.pm b/perl/lib/Nagios/Plugin/JUNOS.pm index 4ba14ce..7f468a0 100644 --- a/perl/lib/Nagios/Plugin/JUNOS.pm +++ b/perl/lib/Nagios/Plugin/JUNOS.pm @@ -35,6 +35,8 @@ package Nagios::Plugin::JUNOS; use Carp; +use Data::Dumper; + use POSIX qw( :termios_h ); use Nagios::Plugin; @@ -438,6 +440,8 @@ sub send_query } } + $self->verbose(5, "Got response: " . Dumper(\$res)); + if (! ref $res) { return "ERROR: Failed to execute query '$query'"; }