2010-07-31 20:30:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
global $valid_sensor;
|
|
|
|
|
|
|
|
## XUPS
|
|
|
|
if ($device['os'] == "powerware")
|
|
|
|
{
|
|
|
|
echo("XUPS-MIB ");
|
2011-03-16 17:53:20 +00:00
|
|
|
|
2010-07-31 20:30:30 +00:00
|
|
|
# I'm not sure if there is provision for frequency of multiple phases in this MIB -TL
|
2011-03-16 17:53:20 +00:00
|
|
|
|
2010-07-31 20:30:30 +00:00
|
|
|
# XUPS-MIB::xupsInputFrequency.0 = INTEGER: 500
|
|
|
|
$freq_oid = ".1.3.6.1.4.1.534.1.3.1.0";
|
|
|
|
$descr = "Input";
|
|
|
|
$divisor = 10;
|
|
|
|
$current = snmp_get($device, $freq_oid, "-Oqv") / $divisor;
|
|
|
|
$type = "xups";
|
|
|
|
$index = '3.1.0';
|
2011-04-21 10:39:42 +00:00
|
|
|
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
2010-07-31 20:30:30 +00:00
|
|
|
|
|
|
|
# XUPS-MIB::xupsOutputFrequency.0 = INTEGER: 500
|
|
|
|
$freq_oid = "1.3.6.1.4.1.534.1.4.2.0";
|
|
|
|
$descr = "Output";
|
|
|
|
$divisor = 10;
|
|
|
|
$current = snmp_get($device, $freq_oid, "-Oqv") / $divisor;
|
|
|
|
$type = "xups";
|
|
|
|
$index = '4.2.0';
|
2011-04-21 10:39:42 +00:00
|
|
|
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
2010-07-31 20:30:30 +00:00
|
|
|
|
|
|
|
# XUPS-MIB::xupsBypassFrequency.0 = INTEGER: 500
|
|
|
|
$freq_oid = "1.3.6.1.4.1.534.1.5.1.0";
|
|
|
|
$descr = "Bypass";
|
|
|
|
$divisor = 10;
|
|
|
|
$current = snmp_get($device, $freq_oid, "-Oqv");
|
|
|
|
if ($current != "")
|
|
|
|
{
|
|
|
|
# Bypass is not always available in SNMP
|
|
|
|
$current /= $divisor;
|
|
|
|
$type = "xups";
|
|
|
|
$index = '5.1.0';
|
2011-04-21 10:39:42 +00:00
|
|
|
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
2010-07-31 20:30:30 +00:00
|
|
|
}
|
|
|
|
}
|
2011-03-15 09:57:13 +00:00
|
|
|
|
|
|
|
?>
|