+ Enhance loadaverage snmp mode (can have coma)

This commit is contained in:
garnier-quentin 2015-12-14 11:25:24 +01:00
parent bbdb1bd7cc
commit 7c109b7f9c
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ sub run {
my $result = $self->{snmp}->get_leef(oids => [$oid_CpuLoad1m, $oid_CpuLoad5m, $oid_CpuLoad15m], nothing_quit => 1);
my ($msg, $cpu_load1, $cpu_load5, $cpu_load15);
$result->{$oid_CpuLoad1m} =~ s/,/\./g;
$result->{$oid_CpuLoad5m} =~ s/,/\./g;
$result->{$oid_CpuLoad15m} =~ s/,/\./g;
if (defined($self->{option_results}->{average})) {
my $result2 = $self->{snmp}->get_table(oid => $oid_CountCpu);