add some verbose output refs #5884
This commit is contained in:
parent
fb78123c07
commit
27ef43a0b9
|
@ -132,6 +132,7 @@ sub run {
|
||||||
my $timing0 = [gettimeofday];
|
my $timing0 = [gettimeofday];
|
||||||
my ($action, $filter, $value);
|
my ($action, $filter, $value);
|
||||||
my $step = $listActionNode->get_nodelist;
|
my $step = $listActionNode->get_nodelist;
|
||||||
|
my $temp_step = 0;
|
||||||
my $stepOk = 0;
|
my $stepOk = 0;
|
||||||
my $exit1 = 'UNKNOWN';
|
my $exit1 = 'UNKNOWN';
|
||||||
foreach my $actionNode ($listActionNode->get_nodelist) {
|
foreach my $actionNode ($listActionNode->get_nodelist) {
|
||||||
|
@ -139,6 +140,7 @@ sub run {
|
||||||
my $trim_action = centreon::plugins::misc::trim($action->string_value);
|
my $trim_action = centreon::plugins::misc::trim($action->string_value);
|
||||||
my $trim_filter = centreon::plugins::misc::trim($filter->string_value);
|
my $trim_filter = centreon::plugins::misc::trim($filter->string_value);
|
||||||
my $trim_value = centreon::plugins::misc::trim($value->string_value);
|
my $trim_value = centreon::plugins::misc::trim($value->string_value);
|
||||||
|
$temp_step++;
|
||||||
if ($trim_action eq 'pause') {
|
if ($trim_action eq 'pause') {
|
||||||
my $sleepTime = 1000;
|
my $sleepTime = 1000;
|
||||||
if ($trim_value =~ /^\d+$/) {
|
if ($trim_value =~ /^\d+$/) {
|
||||||
|
@ -149,9 +151,12 @@ sub run {
|
||||||
}
|
}
|
||||||
sleep($sleepTime / 1000);
|
sleep($sleepTime / 1000);
|
||||||
$stepOk++;
|
$stepOk++;
|
||||||
|
$self->{output}->output_add(long_msg => "Step " . $temp_step . " - Pause : " . $sleepTime . "ms");
|
||||||
|
} elsif ($trim_action eq 'echo'){
|
||||||
|
next;
|
||||||
} else {
|
} else {
|
||||||
my $exit_command = $sel->do_command($trim_action, $trim_filter, $trim_value);
|
my $exit_command = $sel->do_command($trim_action, $trim_filter, $trim_value);
|
||||||
$self->{output}->output_add(long_msg => "Step " . $step
|
$self->{output}->output_add(long_msg => "Step " . $temp_step
|
||||||
. " - Command : '" . $trim_action . "'"
|
. " - Command : '" . $trim_action . "'"
|
||||||
. " , Filter : '" . $trim_filter . "'"
|
. " , Filter : '" . $trim_filter . "'"
|
||||||
. " , Value : '" . $trim_value . "'");
|
. " , Value : '" . $trim_value . "'");
|
||||||
|
|
Loading…
Reference in New Issue