From c3ee8c4f4f5a0086bd245cfcd79f5b681aa6b035 Mon Sep 17 00:00:00 2001 From: UrBnW <40244829+UrBnW@users.noreply.github.com> Date: Mon, 5 Jul 2021 11:41:58 +0200 Subject: [PATCH] enh(3cx): add max sim calls value (#2938) --- apps/voip/3cx/restapi/mode/system.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/voip/3cx/restapi/mode/system.pm b/apps/voip/3cx/restapi/mode/system.pm index 7a2407026..56cc6c763 100644 --- a/apps/voip/3cx/restapi/mode/system.pm +++ b/apps/voip/3cx/restapi/mode/system.pm @@ -47,18 +47,18 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'calls-active', nlabel => 'system.calls.active.current', set => { - key_values => [ { name => 'calls_active' } ], + key_values => [ { name => 'calls_active' }, { name => 'calls_max' } ], output_template => 'calls active: %s', perfdatas => [ - { label => 'calls_active', template => '%s', min => 0 } + { label => 'calls_active', template => '%s', min => 0, max => 'calls_max' } ] } }, { label => 'extensions-registered', nlabel => 'system.extensions.registered.current', set => { - key_values => [ { name => 'extensions_registered' } ], + key_values => [ { name => 'extensions_registered' }, { name => 'extensions_total' } ], output_template => 'extensions registered: %s', perfdatas => [ - { label => 'extensions_registered', template => '%s', min => 0 } + { label => 'extensions_registered', template => '%s', min => 0, max => 'extensions_total' } ] } } @@ -138,7 +138,9 @@ sub manage_selection { $self->{global} = { calls_active => $system->{CallsActive}, + calls_max => $system->{MaxSimCalls}, extensions_registered => $system->{ExtensionsRegistered}, + extensions_total => $system->{ExtensionsTotal} }; }