MAP 4 - Fix element mode

This commit is contained in:
Bertrand Cournaud 2016-09-15 08:49:45 +02:00
parent bcacc0ff20
commit cb7899c68a
1 changed files with 3 additions and 3 deletions

View File

@ -64,17 +64,17 @@ sub run {
my $result = $self->{connector}->get_attributes(request => $self->{request}, nothing_quit => 1);
my $elements = $result->{"com.centreon.studio.map:name=BusinessElements,type=repo"}->{LoadedModelCount};
my $elements = $result->{"com.centreon.studio.map:name=BusinessElement,type=repo"}->{LoadedModelCount};
my $exit = $self->{perfdata}->threshold_check(value => $elements,
threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning'} ]);
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Element loaded : %d",
$result->{"com.centreon.studio.map:name=BusinessElements,type=repo"}->{LoadedModelCount}));
$result->{"com.centreon.studio.map:name=BusinessElement,type=repo"}->{LoadedModelCount}));
$self->{output}->perfdata_add(label => 'elements',
value => $result->{"com.centreon.studio.map:name=BusinessElements,type=repo"}->{LoadedModelCount},
value => $result->{"com.centreon.studio.map:name=BusinessElement,type=repo"}->{LoadedModelCount},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
min => 0);