JUNOS plugins: Dump response if verbose >= 5.

This commit is contained in:
Sebastian Harl 2012-10-01 09:41:03 +02:00
parent ed573d90a4
commit bc30719a44
3 changed files with 12 additions and 0 deletions

View file

@ -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'";
}

View file

@ -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'";
}

View file

@ -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'";
}