fix watchguard cpu usage calcul (#1106)

This commit is contained in:
Colin Gagnaire 2018-08-22 09:58:56 +00:00 committed by Simon Bomm
parent fe2911fbe3
commit 6087f3b115
1 changed files with 5 additions and 3 deletions

View File

@ -53,9 +53,9 @@ sub set_counters {
}, },
{ label => '15min', set => { { label => '15min', set => {
key_values => [ { name => '15min' } ], key_values => [ { name => '15min' } ],
output_template => '5 minutes : %.2f %%', output_template => '15 minutes : %.2f %%',
perfdatas => [ perfdatas => [
{ label => 'cpu_5min', value => '15min_absolute', template => '%.2f', { label => 'cpu_15min', value => '15min_absolute', template => '%.2f',
min => 0, max => 100, unit => '%' }, min => 0, max => 100, unit => '%' },
], ],
} }
@ -97,7 +97,9 @@ sub manage_selection {
$oid_wgSystemCpuUtil1, $oid_wgSystemCpuUtil5, $oid_wgSystemCpuUtil15 $oid_wgSystemCpuUtil1, $oid_wgSystemCpuUtil5, $oid_wgSystemCpuUtil15
], nothing_quit => 1); ], nothing_quit => 1);
$self->{global} = { '1min' => $snmp_result->{$oid_wgSystemCpuUtil1}, '5min' => $snmp_result->{$oid_wgSystemCpuUtil5}, '15min' => $snmp_result->{$oid_wgSystemCpuUtil15} }; $self->{global} = { '1min' => $snmp_result->{$oid_wgSystemCpuUtil1} / 100,
'5min' => $snmp_result->{$oid_wgSystemCpuUtil5} / 100,
'15min' => $snmp_result->{$oid_wgSystemCpuUtil15} / 100 };
} }
1; 1;