Added MGE Comet detection (#4606)

newdevice: Added MGE detection
This commit is contained in:
kate66
2016-09-27 06:49:58 -07:00
committed by Neil Lathwood
parent 665864e604
commit 3784f65abb
4 changed files with 6 additions and 3 deletions

View File

@@ -4,6 +4,6 @@ if (str_contains($sysDescr, array('Pulsar M', 'MGE UPS SYSTEMS - Network Managem
$os = 'mgeups'; $os = 'mgeups';
} }
if (starts_with($sysDescr, array('Galaxy ', 'Evolution '))) { if (starts_with($sysDescr, array('Galaxy ', 'Evolution ', 'Comet'))) {
$os = 'mgeups'; $os = 'mgeups';
} }

View File

@@ -3,7 +3,7 @@
// MGE UPS // MGE UPS
if ($device['os'] == 'mgeups') { if ($device['os'] == 'mgeups') {
echo 'MGE '; echo 'MGE ';
$oids = trim(snmp_walk($device, '1.3.6.1.4.1.705.1.7.1', '-OsqnU')); $oids = trim(snmp_walk($device, '1.3.6.1.4.1.705.1.7.2.1.5', '-OsqnU')); // OID: mgoutputCurrent
d_echo($oids."\n"); d_echo($oids."\n");
$numPhase = count(explode("\n", $oids)); $numPhase = count(explode("\n", $oids));
@@ -33,7 +33,7 @@ if ($device['os'] == 'mgeups') {
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, $lowwarnlimit, $warnlimit, $limit, $current); discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, $lowwarnlimit, $warnlimit, $limit, $current);
}//end for }//end for
$oids = trim(snmp_walk($device, '1.3.6.1.4.1.705.1.6.1', '-OsqnU')); $oids = trim(snmp_walk($device, '1.3.6.1.4.1.705.1.6.2.1.6', '-OsqnU')); // OID: mginputCurrent
d_echo($oids."\n"); d_echo($oids."\n");
$numPhase = count(explode("\n", $oids)); $numPhase = count(explode("\n", $oids));

View File

@@ -802,6 +802,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('mgeups', 'mgeups-galaxy'); $this->checkOS('mgeups', 'mgeups-galaxy');
$this->checkOS('mgeups', 'mgeups-evolution'); $this->checkOS('mgeups', 'mgeups-evolution');
$this->checkOS('mgeups', 'mgeups-proxy'); $this->checkOS('mgeups', 'mgeups-proxy');
$this->checkOS('mgeups', 'mgeups-comet');
} }
public function testMicrosemitime() public function testMicrosemitime()

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Comet
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.705.1.2