Fix countvm perfdata

This commit is contained in:
Quentin Garnier 2015-02-10 16:57:19 +01:00
parent 992011a060
commit 528c4e8562
1 changed files with 5 additions and 7 deletions

View File

@ -139,13 +139,11 @@ sub run {
$labels->[0]));
}
if ($multiple == 1) {
$self->{manager}->{output}->perfdata_add(label => $labels->[0] . $extra_label,
value => $vm_states{$labels->[0]},
warning => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[1]),
critical => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[2]),
min => 0, max => $vm_states{poweredoff} + $vm_states{suspended} + $vm_states{poweredon});
}
$self->{manager}->{output}->perfdata_add(label => $labels->[0] . $extra_label,
value => $vm_states{$labels->[0]},
warning => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[1]),
critical => $self->{manager}->{perfdata}->get_perfdata_for_output(label => $labels->[2]),
min => 0, max => $vm_states{poweredoff} + $vm_states{suspended} + $vm_states{poweredon});
}
}
}