Merge pull request #1476 from laf/issue-1466

Added basic detection of Netonix
This commit is contained in:
Daniel Preussker
2015-07-19 18:52:38 +02:00
4 changed files with 189 additions and 0 deletions

BIN
html/images/os/netonix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

View File

@@ -466,6 +466,17 @@ $config['os'][$os]['bad_if'][] = 'cpu';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$os = 'netonix';
$config['os'][$os]['text'] = 'Netonix';
$config['os'][$os]['type'] = 'network';
$config['os'][$os]['icon'] = 'netonix';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
$config['os'][$os]['over'][1]['text'] = 'CPU Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
// Juniper
$os = 'junos';
$config['os'][$os]['text'] = 'Juniper JunOS';

View File

@@ -0,0 +1,7 @@
<?php
$version = snmp_get($device, 'firmwareVersion.0', '-Osqnv', 'NETONIX-SWITCH-MIB', 'mibs:mibs/netonix/');
list(,$version) = explode(': ', $version);
if (is_numeric($version)) {
$os = 'netonix';
}

View File

@@ -0,0 +1,171 @@
NETONIX-SWITCH-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises FROM SNMPv2-SMI
OBJECT-GROUP, MODULE-COMPLIANCE FROM SNMPv2-CONF
snmpMIBGroups FROM SNMPv2-MIB
DisplayString,TEXTUAL-CONVENTION FROM SNMPv2-TC;
netonixSwitch MODULE-IDENTITY
LAST-UPDATED "9803231700Z"
ORGANIZATION "Netonix"
CONTACT-INFO "eric@netonix.com"
DESCRIPTION "The MIB Module for Netonix Switches."
REVISION "9803231700Z"
DESCRIPTION "The MIB Module for Netonix Switches."
::= { enterprises 99999 }
netonixSwitchGroup OBJECT-GROUP
OBJECTS { firmwareVersion,
fanSpeed,
tempDescription,
temp,
voltageDescription,
voltage
}
STATUS current
DESCRIPTION "A collection of objects providing basic instrumentation and control of an SNMPv2 entity."
::= { snmpMIBGroups 8 }
netonixSwitchConformance OBJECT IDENTIFIER ::= { netonixSwitch 99 }
netonixSwitchGroups OBJECT IDENTIFIER ::= { netonixSwitchConformance 1 }
netonixSwitchCompliances OBJECT IDENTIFIER ::= { netonixSwitchConformance 2 }
netonixSwitchCompliance MODULE-COMPLIANCE
STATUS current
DESCRIPTION "The compliance statement for switches which implement the Netonix Switch MIB."
MODULE MANDATORY-GROUPS { netonixSwitchGroup }
::= { netonixSwitchCompliances 1 }
VoltageTC ::= TEXTUAL-CONVENTION
DISPLAY-HINT "d-2"
STATUS current
DESCRIPTION "A voltage with 2 decimal places"
SYNTAX Integer32
firmwareVersion OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The version of the firmware running on the switch"
::= { netonixSwitch 1 }
fanTable OBJECT-TYPE
SYNTAX SEQUENCE OF FanEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Fan watching information."
::= { netonixSwitch 2 }
fanEntry OBJECT-TYPE
SYNTAX FanEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry containing a disk and its statistics."
INDEX { fanIndex }
::= { fanTable 1 }
FanEntry ::= SEQUENCE {
fanIndex Integer32,
fanSpeed Integer32
}
fanIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Integer reference number (row number) for the fan mib."
::= { fanEntry 1 }
fanSpeed OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Integer reference number (row number) for the fan mib."
::= { fanEntry 2 }
tempTable OBJECT-TYPE
SYNTAX SEQUENCE OF TempEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Temperature watching information."
::= { netonixSwitch 3 }
tempEntry OBJECT-TYPE
SYNTAX TempEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry containing a temperature sensor."
INDEX { tempIndex }
::= { tempTable 1 }
TempEntry ::= SEQUENCE {
tempIndex Integer32,
tempDescription DisplayString,
temp Integer32
}
tempIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Integer reference number (row number) for the temp mib."
::= { tempEntry 1 }
tempDescription OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Description of this temperature sensor"
::= { tempEntry 2 }
temp OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The current temperature for this sensor"
::= { tempEntry 3 }
voltageTable OBJECT-TYPE
SYNTAX SEQUENCE OF VoltageEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Voltage watching information."
::= { netonixSwitch 4 }
voltageEntry OBJECT-TYPE
SYNTAX VoltageEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry containing a voltage sensor."
INDEX { voltageIndex }
::= { voltageTable 1 }
VoltageEntry ::= SEQUENCE {
voltageIndex Integer32,
voltageDescription DisplayString,
voltage VoltageTC
}
voltageIndex OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Integer reference number (row number) for the voltage mib."
::= { voltageEntry 1 }
voltageDescription OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Description of this voltage sensor"
::= { voltageEntry 2 }
voltage OBJECT-TYPE
SYNTAX VoltageTC
MAX-ACCESS read-only
STATUS current
DESCRIPTION "The current voltage for this sensor"
::= { voltageEntry 3 }
END