mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
APC UPS V/Hz values support, extra AirPort detection string
git-svn-id: http://www.observium.org/svn/observer/trunk@1346 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -129,10 +129,34 @@ if ($device['os'] == "apc")
|
|||||||
discover_freq($valid_freq,$device, $oid, "4.2.1.4.$index", $type, $descr, $precision, NULL, NULL, $current);
|
discover_freq($valid_freq,$device, $oid, "4.2.1.4.$index", $type, $descr, $precision, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.3.2.4.0", "-OsqnU", "");
|
||||||
|
if ($debug) { echo($oids."\n"); }
|
||||||
|
if ($oids)
|
||||||
|
{
|
||||||
|
echo(" APC In ");
|
||||||
|
list($oid,$current) = explode(" ",$oids);
|
||||||
|
$precision = 1;
|
||||||
|
$type = "apc";
|
||||||
|
$index = "3.2.4.0";
|
||||||
|
$descr = "Input";
|
||||||
|
discover_freq($valid_freq, $device, $oid, $index, $type, $descr, $precision, NULL, NULL, $current);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.4.2.2.0", "-OsqnU", "");
|
||||||
|
if ($debug) { echo($oids."\n"); }
|
||||||
|
if ($oids)
|
||||||
|
{
|
||||||
|
echo(" APC Out ");
|
||||||
|
list($oid,$current) = explode(" ",$oids);
|
||||||
|
$precision = 1;
|
||||||
|
$type = "apc";
|
||||||
|
$index = "4.2.2.0";
|
||||||
|
$descr = "Output";
|
||||||
|
discover_freq($valid_freq, $device, $oid, $index, $type, $descr, $precision, NULL, NULL, $current);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Delete removed sensors
|
## Delete removed sensors
|
||||||
|
|
||||||
if($debug) { print_r($valid_freq); }
|
if($debug) { print_r($valid_freq); }
|
||||||
|
|||||||
@@ -4,17 +4,17 @@ global $valid_temp;
|
|||||||
|
|
||||||
if ($device['os'] == "apc")
|
if ($device['os'] == "apc")
|
||||||
{
|
{
|
||||||
$current = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.2.2.2.0", "-OsqnU", "");
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.2.2.2.0", "-OsqnU", "");
|
||||||
if ($debug) { echo($current."\n"); }
|
if ($debug) { echo($oids."\n"); }
|
||||||
if ($current)
|
if ($oids)
|
||||||
{
|
{
|
||||||
echo("APC UPS Internal ");
|
echo("APC UPS Internal ");
|
||||||
|
list($oid,$current) = explode(' ',$oids);
|
||||||
$precision = 1;
|
$precision = 1;
|
||||||
$type = "apc";
|
$type = "apc";
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$oid = "1.3.6.1.4.1.318.1.1.1.2.2.2.0";
|
|
||||||
$descr = "Internal Temperature";
|
$descr = "Internal Temperature";
|
||||||
discover_temperature($valid_temp, $device, $oid, $index, $type, trim($descr,'"'), $precision, NULL, NULL, $current);
|
discover_temperature($valid_temp, $device, $oid, $index, $type, $descr, $precision, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,32 @@ if ($device['os'] == "apc")
|
|||||||
discover_volt($valid_volt,$device, $oid, "4.3.1.3.$index", $type, $descr, $precision, NULL, NULL, $current);
|
discover_volt($valid_volt,$device, $oid, "4.3.1.3.$index", $type, $descr, $precision, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.3.2.1.0", "-OsqnU", "");
|
||||||
|
if ($debug) { echo($oids."\n"); }
|
||||||
|
if ($oids)
|
||||||
|
{
|
||||||
|
echo(" APC In ");
|
||||||
|
list($oid,$current) = explode(" ",$oids);
|
||||||
|
$precision = 1;
|
||||||
|
$type = "apc";
|
||||||
|
$index = "3.2.1.0";
|
||||||
|
$descr = "Input";
|
||||||
|
discover_volt($valid_volt, $device, $oid, $index, $type, $descr, $precision, NULL, NULL, $current);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.4.2.1.0", "-OsqnU", "");
|
||||||
|
if ($debug) { echo($oids."\n"); }
|
||||||
|
if ($oids)
|
||||||
|
{
|
||||||
|
echo(" APC Out ");
|
||||||
|
list($oid,$current) = explode(" ",$oids);
|
||||||
|
$precision = 1;
|
||||||
|
$type = "apc";
|
||||||
|
$index = "4.2.1.0";
|
||||||
|
$descr = "Output";
|
||||||
|
discover_volt($valid_volt, $device, $oid, $index, $type, $descr, $precision, NULL, NULL, $current);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
## Supermicro Voltages
|
## Supermicro Voltages
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
if(!$os) {
|
if(!$os) {
|
||||||
|
|
||||||
if(strpos($sysDescr, "Apple AirPort") !== FALSE) { $os = "airport"; }
|
if(strpos($sysDescr, "Apple AirPort") !== FALSE) { $os = "airport"; }
|
||||||
|
else if(strpos($sysDescr, "Apple Base Station") !== FALSE) { $os = "airport"; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user