From b847d29dc007ce79ce518bf9fe580329f839c41f Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 28 Apr 2014 17:25:49 +0200 Subject: [PATCH] Refs #5501 Work on another CPU mode (cpu-detailed) From UCD mibs --- centreon-plugins/snmp_standard/mode/cpu.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/centreon-plugins/snmp_standard/mode/cpu.pm b/centreon-plugins/snmp_standard/mode/cpu.pm index e5ef4f84e..3dd38ab68 100644 --- a/centreon-plugins/snmp_standard/mode/cpu.pm +++ b/centreon-plugins/snmp_standard/mode/cpu.pm @@ -84,12 +84,12 @@ sub run { my $cpu_num = $1; $cpu += $result->{$key}; - $i++; $self->{output}->output_add(long_msg => sprintf("CPU $i Usage is %.2f%%", $result->{$key})); - $self->{output}->perfdata_add(label => 'cpu' . $cpu_num, + $self->{output}->perfdata_add(label => 'cpu' . $i, value => sprintf("%.2f", $result->{$key}), min => 0, max => 100); + $i++; } my $avg_cpu = $cpu / $i; @@ -113,7 +113,9 @@ __END__ =head1 MODE -Check system CPUs. +Check system CPUs (HOST-RESOURCES-MIB) +(The average, over the last minute, of the percentage +of time that this processor was not idle) =over 8