enh(3cx): add max sim calls value (#2938)

This commit is contained in:
UrBnW 2021-07-05 11:41:58 +02:00 committed by GitHub
parent e4f9eb3128
commit c3ee8c4f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -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}
};
}