Merge pull request #2959 from murrant/netonix

Add hardware and version for Netonix.
This commit is contained in:
Neil Lathwood
2016-02-09 20:07:42 +00:00
4 changed files with 55 additions and 0 deletions

View 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

View 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

View 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

View 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'];