Merge pull request #1521 from clinta/drac-voltage-alert

Drac voltage alert
This commit is contained in:
Neil Lathwood
2015-07-22 17:00:19 +01:00
+3 -3
View File
@@ -20,10 +20,10 @@ if ($device['os'] == "drac") {
$limit_oid = "powerSupplyMaximumInputVoltage.1.$index";
$descr = trim(snmp_get($device, $descr_oid, "-Oqv", "IDRAC-MIB-SMIv2"),'"');
$descr = preg_replace("/(Status)/","", $descr);
$current = snmp_get($device, $fan_oid, "-Oqv", "IDRAC-MIB-SMIv2");
$low_limit = snmp_get($device, $limit_oid, "-Oqv", "IDRAC-MIB-SMIv2");
$current = snmp_get($device, $voltage_oid, "-Oqv", "IDRAC-MIB-SMIv2");
$high_limit = snmp_get($device, $limit_oid, "-Oqv", "IDRAC-MIB-SMIv2");
$divisor = "1";
discover_sensor($valid['sensor'], 'voltage', $device, $voltage_oid, $index, 'drac', $descr, $divisor, '1', $low_limit, NULL, NULL, NULL, $current);
discover_sensor($valid['sensor'], 'voltage', $device, $voltage_oid, $index, 'drac', $descr, $divisor, '1', 0, NULL, NULL, $high_limit, $current);
}
}
}