mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2959 from murrant/netonix
Add hardware and version for Netonix.
This commit is contained in:
17
includes/discovery/sensors/fanspeeds/netonix.inc.php
Normal file
17
includes/discovery/sensors/fanspeeds/netonix.inc.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
// Netonix Fan Speeds
|
||||
if ($device['os'] == 'netonix') {
|
||||
echo 'Netonix: ';
|
||||
$oids = snmpwalk_cache_multi_oid($device, 'fanTable', array(), 'NETONIX-SWITCH-MIB', '+'.$config['mibdir'].'/netonix');
|
||||
if (is_array($oids)) {
|
||||
foreach ($oids as $index => $entry) {
|
||||
if (is_numeric($entry['fanSpeed']) && is_numeric($index)) {
|
||||
$descr = $index;
|
||||
$oid = '.1.3.6.1.4.1.46242.2.1.2.'.$index;
|
||||
$current = $entry['fanSpeed'];
|
||||
discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, $device['os'], $descr, '1', '1', '0', '0', null, null, $current);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//end if
|
17
includes/discovery/sensors/temperatures/netonix.inc.php
Normal file
17
includes/discovery/sensors/temperatures/netonix.inc.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
// Netonix Temperatures
|
||||
if ($device['os'] == 'netonix') {
|
||||
echo 'Netonix: ';
|
||||
$oids = snmpwalk_cache_multi_oid($device, 'tempTable', array(), 'NETONIX-SWITCH-MIB', '+'.$config['mibdir'].'/netonix');
|
||||
if (is_array($oids)) {
|
||||
foreach ($oids as $index => $entry) {
|
||||
if (is_numeric($entry['temp']) && is_numeric($index) && $entry['temp'] > '0') {
|
||||
$descr = $entry['tempDescription'];
|
||||
$oid = '.1.3.6.1.4.1.46242.3.1.3.'.$index;
|
||||
$current = $entry['temp'];
|
||||
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $device['os'], $descr, '1', '1', null, null, null, null, $current);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//end if
|
18
includes/discovery/sensors/voltages/netonix.inc.php
Normal file
18
includes/discovery/sensors/voltages/netonix.inc.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
// Netonix Voltages
|
||||
if ($device['os'] == 'netonix') {
|
||||
echo 'Netonix: ';
|
||||
$oids = snmpwalk_cache_multi_oid($device, 'voltageTable', array(), 'NETONIX-SWITCH-MIB', '+'.$config['mibdir'].'/netonix');
|
||||
if (is_array($oids)) {
|
||||
foreach ($oids as $index => $entry) {
|
||||
if (is_numeric($entry['voltage']) && is_numeric($index) && $entry['voltage'] > '0') {
|
||||
$descr = $entry['voltageDescription'];
|
||||
$oid = '.1.3.6.1.4.1.46242.4.1.3.'.$index;
|
||||
$current = $entry['voltage'];
|
||||
$divisor = 100;
|
||||
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $device['os'], $descr, $divisor, '1', null, null, null, null, $current);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//end if
|
3
includes/polling/os/netonix.inc.php
Normal file
3
includes/polling/os/netonix.inc.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
$version = snmp_get($device, 'firmwareVersion.0', '-OQv', 'NETONIX-SWITCH-MIB', $config['mibdir'].':'.$config['mibdir'].'/netonix');
|
||||
$hardware = $poll_device['sysDescr'];
|
Reference in New Issue
Block a user