From 9f4663fefa17d2071c208b0d40034cfb290eee8e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 7 Sep 2012 13:18:34 +0200 Subject: [PATCH] check_junos: Enabled JUNOS tracing if verbose > 3. --- check_junos.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/check_junos.pl b/check_junos.pl index f4ec1b9..633c6de 100755 --- a/check_junos.pl +++ b/check_junos.pl @@ -40,6 +40,7 @@ use warnings; use utf8; use JUNOS::Device; +use JUNOS::Trace; use FindBin qw( $Bin ); use lib "$Bin/perl/lib"; @@ -128,6 +129,11 @@ $plugin->set_default_check('chassis_environment'); # configure removes any options from @ARGV $plugin->configure(); + +if ($plugin->{'conf'}->{'verbose'} > 3) { + JUNOS::Trace::init(1); +} + $plugin->set_checks(@ARGV); $junos = $plugin->connect();