Merge pull request #1529 from CPbN/3cxtrunks

3CX, monitor unregistered trunks
This commit is contained in:
qgarnier 2019-05-30 13:35:23 +02:00 committed by GitHub
commit f3241cbc29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -127,6 +127,12 @@ sub manage_selection {
health => $single->{$item} ? 'true' : 'false',
};
}
# As per 3CX support, $single->{Trunks} does not trigger if TrunksRegistered != TrunksTotal,
# but only if "trunk is unsupported", so let's workaround
$self->{service}->{HasUnregisteredTrunks} = {
display => 'HasUnregisteredTrunks',
health => ($system->{TrunksRegistered} < $system->{TrunksTotal}) ? 'false' : 'true',
};
$self->{service}->{HasNotRunningServices} = {
display => 'HasNotRunningServices',
health => $system->{HasNotRunningServices} ? 'false' : 'true',