diff --git a/includes/discovery/os/mgeups.inc.php b/includes/discovery/os/mgeups.inc.php index 63674a24f2..00fecb455d 100644 --- a/includes/discovery/os/mgeups.inc.php +++ b/includes/discovery/os/mgeups.inc.php @@ -4,6 +4,6 @@ if (str_contains($sysDescr, array('Pulsar M', 'MGE UPS SYSTEMS - Network Managem $os = 'mgeups'; } -if (starts_with($sysDescr, array('Galaxy ', 'Evolution '))) { +if (starts_with($sysDescr, array('Galaxy ', 'Evolution ', 'Comet'))) { $os = 'mgeups'; } diff --git a/includes/discovery/sensors/current/mgeups.inc.php b/includes/discovery/sensors/current/mgeups.inc.php index 521abc67af..9fe0e5e7e3 100644 --- a/includes/discovery/sensors/current/mgeups.inc.php +++ b/includes/discovery/sensors/current/mgeups.inc.php @@ -3,7 +3,7 @@ // MGE UPS if ($device['os'] == 'mgeups') { 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"); $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); }//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"); $numPhase = count(explode("\n", $oids)); diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index b38e5c1b9e..9601318749 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -802,6 +802,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase $this->checkOS('mgeups', 'mgeups-galaxy'); $this->checkOS('mgeups', 'mgeups-evolution'); $this->checkOS('mgeups', 'mgeups-proxy'); + $this->checkOS('mgeups', 'mgeups-comet'); } public function testMicrosemitime() diff --git a/tests/snmpsim/mgeups-comet.snmprec b/tests/snmpsim/mgeups-comet.snmprec new file mode 100644 index 0000000000..5a19f9f948 --- /dev/null +++ b/tests/snmpsim/mgeups-comet.snmprec @@ -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