fix: APC/MGE UPS sensors divisor for load and voltage (#6509)

* fix: APCMGE sensors divisors

* Add missing SNMP SIM file

* Add OS test for snmprec file
This commit is contained in:
FTBZ 2017-04-26 15:35:07 +02:00 committed by Tony Murray
parent 8c1fa92c33
commit 2aa4145a26
3 changed files with 9 additions and 0 deletions

View File

@ -947,6 +947,12 @@ function get_device_divisor($device, $os_version, $sensor_type, $oid)
} elseif ($sensor_type == 'voltage' && !starts_with($oid, '.1.3.6.1.2.1.33.1.2.5.')) {
return 1;
}
} elseif ($device['os'] == 'apc-mgeups') {
if ($sensor_type == 'load') {
return 1;
} elseif ($sensor_type == 'voltage' && !starts_with($oid, '.1.3.6.1.2.1.33.1.2.5.')) {
return 1;
}
}
return 10; //default

View File

@ -206,6 +206,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
public function testApcMgeups()
{
$this->checkOS('apc-mgeups');
$this->checkOS('apc-mgeups', 'mgeups-galaxy');
}

View File

@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|GALAXY 5000 30 kVA
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.705.1.2