mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
hopefully doesn't break anything Mostly issues with snmp oids and options containing spaces. Try to remove all of those. DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926` After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert.
16 lines
849 B
PHP
16 lines
849 B
PHP
<?php
|
|
|
|
// Adapated from Bluecoat sgos discovery
|
|
echo 'Benu Sensors ';
|
|
|
|
$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');
|
|
|
|
$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";
|
|
$descr = $data["1.$index"]['benuSensorName'];
|
|
$current = $data["1.$index"]['benuSensorValue'];
|
|
discover_sensor($valid['sensor'], 'fanspeed', $device, $sensor_oid, $sensor_index, 'benuos', $descr, '1', '1', null, null, null, null, $current);
|
|
$sensor_index++;
|
|
}//end loop
|