2017-06-22 14:45:18 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Adapated from Bluecoat sgos discovery
|
|
|
|
echo 'Benu Sensors ';
|
|
|
|
|
2018-12-16 07:42:50 -06:00
|
|
|
$data = snmp_get_multi($device, ['benuSensorName.1.4', 'benuSensorName.1.5', 'benuSensorName.1.6', 'benuSensorName.1.7', 'benuSensorName.1.8', 'benuSensorName.1.9', 'benuSensorValue.1.4', 'benuSensorValue.1.5', 'benuSensorValue.1.6', 'benuSensorValue.1.7', 'benuSensorValue.1.8', 'benuSensorValue.1.9'], '-OQUs', 'BENU-CHASSIS-MIB');
|
2017-06-22 14:45:18 -06:00
|
|
|
|
2022-10-18 12:33:19 +02:00
|
|
|
if (empty($data)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-06-22 14:45:18 -06:00
|
|
|
$sensor_index = 0;
|
|
|
|
for ($index = 4; $index <= 9; $index++) { //Benu Fans are index 4 thru 9
|
|
|
|
$sensor_oid = ".1.3.6.1.4.1.39406.1.1.1.4.1.1.5.1.$index";
|
2022-10-18 12:33:19 +02:00
|
|
|
$descr = $data["1.$index"]['benuSensorName'] ?? null;
|
|
|
|
$current = $data["1.$index"]['benuSensorValue'] ?? null;
|
2024-09-03 21:04:34 -05:00
|
|
|
discover_sensor(null, 'fanspeed', $device, $sensor_oid, $sensor_index, 'benuos', $descr, '1', '1', null, null, null, null, $current);
|
2017-06-22 14:45:18 -06:00
|
|
|
$sensor_index++;
|
|
|
|
}//end loop
|