3CX, monitor unregistered trunks

This commit is contained in:
CPbN 2019-05-30 13:33:26 +02:00
parent 6c88762bc1
commit 9194fc162a
1 changed files with 6 additions and 0 deletions
centreon-plugins/apps/voip/3cx/restapi/mode

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',