mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
fixes to mge ups discovery to also work on their proxy agent, also get the serial number now
git-svn-id: http://www.observium.org/svn/observer/trunk@1594 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -8,7 +8,7 @@ if ($device['os'] == "mgeups")
|
||||
echo("MGE ");
|
||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.7.1", "-OsqnU"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
list($unused,$numPhase) = explode(' ',$oids);
|
||||
$numPhase = count(explode("\n",$oids));
|
||||
for($i = 1; $i <= $numPhase;$i++)
|
||||
{
|
||||
unset($current);
|
||||
@@ -33,7 +33,7 @@ if ($device['os'] == "mgeups")
|
||||
}
|
||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
list($unused,$numPhase) = explode(' ',$oids);
|
||||
$numPhase = count(explode("\n",$oids));
|
||||
for($i = 1; $i <= $numPhase;$i++)
|
||||
{
|
||||
unset($current);
|
||||
|
||||
@@ -8,7 +8,7 @@ if ($device['os'] == "mgeups")
|
||||
echo("MGE ");
|
||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.7.1", "-OsqnU"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
list($unused,$numPhase) = explode(' ',$oids);
|
||||
$numPhase = count(explode("\n",$oids));
|
||||
for($i = 1; $i <= $numPhase;$i++)
|
||||
{
|
||||
$freq_oid = ".1.3.6.1.4.1.705.1.7.2.1.3.$i";
|
||||
@@ -27,7 +27,7 @@ if ($device['os'] == "mgeups")
|
||||
}
|
||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
list($unused,$numPhase) = explode(' ',$oids);
|
||||
$numPhase = count(explode("\n",$oids));
|
||||
for($i = 1; $i <= $numPhase;$i++)
|
||||
{
|
||||
$freq_oid = ".1.3.6.1.4.1.705.1.6.2.1.3.$i";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
if(!$os) {
|
||||
|
||||
if(!$os)
|
||||
{
|
||||
if(strstr($sysDescr, "Pulsar M")) { $os = "mgeups"; }
|
||||
else if (preg_match("/^Galaxy /", $sysDescr)) { $os = "mgeups"; }
|
||||
else if (preg_match("/^Evolution /", $sysDescr)) { $os = "mgeups"; }
|
||||
|
||||
else if ($sysDescr == "MGE UPS SYSTEMS - Network Management Proxy") { $os = "mgeups"; }
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
if(!$os) {
|
||||
|
||||
if(strstr($sysDescr, "Xerox Phaser")) { $os = "xerox"; }
|
||||
else if(strstr($sysDescr, "Xerox WorkCentre")) { $os = "xerox"; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ global $valid_sensor;
|
||||
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, "mgoutputVoltage", "-OsqnU", "MG-SNMP-UPS-MIB"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
list($unused,$numPhase) = explode(' ',$oids);
|
||||
$numPhase = count(explode("\n",$oids));
|
||||
for($i = 1; $i <= $numPhase;$i++)
|
||||
{
|
||||
$volt_oid = ".1.3.6.1.4.1.705.1.7.2.1.2.$i";
|
||||
@@ -25,9 +25,9 @@ if ($device['os'] == "mgeups")
|
||||
$index = $i;
|
||||
echo discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||
}
|
||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
||||
$oids = trim(snmp_walk($device, "mgeinputVoltage", "-OsqnU", "MG-SNMP-UPS-MIB"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
list($unused,$numPhase) = explode(' ',$oids);
|
||||
$numPhase = count(explode("\n",$oids));
|
||||
for($i = 1; $i <= $numPhase;$i++)
|
||||
{
|
||||
$volt_oid = ".1.3.6.1.4.1.705.1.6.2.1.2.$i";
|
||||
|
||||
Reference in New Issue
Block a user