Asterisk: Various enhancement

This commit is contained in:
David Sabatié 2015-03-19 21:32:42 +01:00
parent a54bd35319
commit 8b9e5e2ed8
2 changed files with 3 additions and 1 deletions

View File

@ -152,6 +152,8 @@ sub run {
{
$self->{output}->output_add(severity => $self->{result}->{activecalls}->{status},
short_msg => $self->{result}->{activecalls}->{value});
$self->{output}->display();
$self->{output}->exit();
}
my $exit_code = $self->{perfdata}->threshold_check(value => $self->{result}->{activecalls}->{value},
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);

View File

@ -93,7 +93,7 @@ sub run {
}
if (!defined($value)) {
$self->{output}->output_add(severity => $self->{option_results}->{state_no_channels},
$self->{output}->output_add(severity => 'Unknown',
short_msg => sprintf("No information available for active channel")
);
$self->{output}->display();