Asterisk: Various enhancement
This commit is contained in:
parent
a54bd35319
commit
8b9e5e2ed8
|
@ -152,6 +152,8 @@ sub run {
|
||||||
{
|
{
|
||||||
$self->{output}->output_add(severity => $self->{result}->{activecalls}->{status},
|
$self->{output}->output_add(severity => $self->{result}->{activecalls}->{status},
|
||||||
short_msg => $self->{result}->{activecalls}->{value});
|
short_msg => $self->{result}->{activecalls}->{value});
|
||||||
|
$self->{output}->display();
|
||||||
|
$self->{output}->exit();
|
||||||
}
|
}
|
||||||
my $exit_code = $self->{perfdata}->threshold_check(value => $self->{result}->{activecalls}->{value},
|
my $exit_code = $self->{perfdata}->threshold_check(value => $self->{result}->{activecalls}->{value},
|
||||||
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
||||||
|
|
|
@ -93,7 +93,7 @@ sub run {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined($value)) {
|
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")
|
short_msg => sprintf("No information available for active channel")
|
||||||
);
|
);
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
|
|
Loading…
Reference in New Issue