Merge pull request #3237 from xbeaudouin/cumulus

Basic Cumulus Linux support
This commit is contained in:
Neil Lathwood
2016-03-18 10:33:38 +00:00
9 changed files with 444 additions and 3 deletions

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -240,6 +240,18 @@ $config['os'][$os]['over'][1]['text'] = 'Processor Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool'; $config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage'; $config['os'][$os]['over'][2]['text'] = 'Memory Usage';
$os = 'cumulus';
$config['os'][$os]['type'] = 'network';
$config['os'][$os]['group'] = 'unix';
$config['os'][$os]['text'] = 'Cumulus Linux';
$config['os'][$os]['icon'] = 'cumulus';
$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'] = 'Processor Usage';
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
// Other Unix-based OSes here please. // Other Unix-based OSes here please.
$os = 'freebsd'; $os = 'freebsd';
$config['os'][$os]['type'] = 'server'; $config['os'][$os]['type'] = 'server';

View File

@@ -64,6 +64,9 @@ if (!$os) {
); );
register_mibs($device, $pktj_mibs, "include/discovery/os/linux.inc.php"); register_mibs($device, $pktj_mibs, "include/discovery/os/linux.inc.php");
} }
elseif (stristr($sysObjectId, 'cumulusMib') || strstr($sysObjectId, '.1.3.6.1.4.1.40310')) {
$os = 'cumulus';
}
else { else {
// Check for Synology DSM // Check for Synology DSM
$hrSystemInitialLoadParameters = trim(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv')); $hrSystemInitialLoadParameters = trim(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv'));

View File

@@ -1,7 +1,7 @@
<?php <?php
// LMSensors Fanspeeds // LMSensors Fanspeeds
if ($device['os'] == 'linux' || $device['os'] == 'pktj') { if ($device['os'] == 'linux' || $device['os'] == 'pktj' || $device['os'] == 'cumulus') {
$oids = snmp_walk($device, 'lmFanSensorsDevice', '-OsqnU', 'LM-SENSORS-MIB'); $oids = snmp_walk($device, 'lmFanSensorsDevice', '-OsqnU', 'LM-SENSORS-MIB');
d_echo($oids."\n"); d_echo($oids."\n");

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($device['os'] == 'linux' || $device['os'] == 'pktj') { if ($device['os'] == 'linux' || $device['os'] == 'pktj' || $device['os'] == 'cumulus') {
$oids = snmp_walk($device, 'lmTempSensorsDevice', '-Osqn', 'LM-SENSORS-MIB'); $oids = snmp_walk($device, 'lmTempSensorsDevice', '-Osqn', 'LM-SENSORS-MIB');
d_echo($oids."\n"); d_echo($oids."\n");

View File

@@ -1,7 +1,7 @@
<?php <?php
// LMSensors Voltages // LMSensors Voltages
if ($device['os'] == 'linux' || $device['os'] == 'pktj') { if ($device['os'] == 'linux' || $device['os'] == 'pktj' || $device['os'] == 'cumulus') {
$oids = snmp_walk($device, 'lmVoltSensorsDevice', '-OsqnU', 'LM-SENSORS-MIB'); $oids = snmp_walk($device, 'lmVoltSensorsDevice', '-OsqnU', 'LM-SENSORS-MIB');
d_echo($oids."\n"); d_echo($oids."\n");

124
mibs/CUMULUS-COUNTERS-MIB Normal file
View File

@@ -0,0 +1,124 @@
CUMULUS-COUNTERS-MIB DEFINITIONS ::= BEGIN
--
-- Top-level infrastructure of the Cumulus enterprise MIB tree
--
IMPORTS
OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
enterprises, Counter32 FROM SNMPv2-SMI
InterfaceIndex, ifIndex FROM IF-MIB
DateAndTime, DisplayString,
cumulusMib FROM CUMULUS-SNMP-MIB
TEXTUAL-CONVENTION FROM SNMPv2-TC;
--
-- Cumulus enterprise-specific counters
--
sysSpecificCounters OBJECT IDENTIFIER ::= { cumulusMib 2 }
-- the discardCounters group
-- The discardCounters group lists certain selected detailed discard
-- counters, counters that are not called out in standard MIBs.
discardCounters OBJECT IDENTIFIER ::= {sysSpecificCounters 1}
discardCountersTable OBJECT-TYPE
SYNTAX SEQUENCE OF DiscardCountersEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"This table breaks out ingress packet discards into more
reason-specific discard counters."
::= { discardCounters 1 }
discardCountersEntry OBJECT-TYPE
SYNTAX DiscardCountersEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Reason-specific ingress discard counters indexed by ifIndex"
INDEX { ifIndex }
::= { discardCountersTable 1 }
--
-- The counters are all Counter32 instead of Counter64 because of
-- limitations in the pass persist protocol.
--
DiscardCountersEntry ::=
SEQUENCE {
portName DisplayString,
l3v4InDiscards Counter32,
bufferOverflowDiscards Counter32,
l3AclDiscards Counter32,
egressQOverflowDiscards Counter32,
egressNonQDiscards Counter32
}
portName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Port name"
::= { discardCountersEntry 1 }
l3v4InDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of inbound IPv4 packets discarded
by the routing engine."
DEFVAL { 0 }
::= { discardCountersEntry 2 }
bufferOverflowDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of inbound packets discarded due to
ingress buffer overflow."
DEFVAL { 0 }
::= { discardCountersEntry 3 }
l3AclDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of inbound IPv4 packets discarded
due to ingress ACL table."
DEFVAL { 0 }
::= { discardCountersEntry 4 }
egressQOverflowDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of packets discarded due to egress queue overflow."
DEFVAL { 0 }
::= { discardCountersEntry 6 }
egressNonQDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total number of packets discarded on egress due to reasons
reasons other than queue overflow. With IF MIB's ifOutDiscards
not accounting for certain specific drops, this one accounts
for drops seen in the egress pipeline of the system that were
not because of egress queue overflow drops."
DEFVAL { 0 }
::= { discardCountersEntry 7 }
END

265
mibs/CUMULUS-RESOURCES-MIB Normal file
View File

@@ -0,0 +1,265 @@
CUMULUS-RESOURCES-MIB DEFINITIONS ::= BEGIN
--
-- Top-level infrastructure of the Cumulus enterprise MIB tree
--
IMPORTS
OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
Integer32, enterprises FROM SNMPv2-SMI
InterfaceIndex, ifIndex FROM IF-MIB
DateAndTime, DisplayString,
cumulusMib FROM CUMULUS-SNMP-MIB
TEXTUAL-CONVENTION FROM SNMPv2-TC;
-- Resource groups in cumulusMib
resourceUtilization OBJECT IDENTIFIER ::= { cumulusMib 1 }
-- the resourceUtilization group
-- The resourceUtilization group lists the current utilization
-- of various tables and buffers in the system.
-- the l3 tables group
l3Tables OBJECT IDENTIFIER ::= {resourceUtilization 1}
l3HostTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of L3 Host table entries currently in use"
::= { l3Tables 1 }
l3HostTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the L3 Host table. The
Host table is defined as the table holding the ARP/ND cache."
::= {l3Tables 2 }
l3RoutingTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of L3 Routing table entries currently in use."
::= { l3Tables 3 }
l3RoutingTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the L3 Routing table.
L3 Routing table is defined as the table holding the
longest prefix match (LPM) entries."
::= { l3Tables 4 }
l3NextHopTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of L3 Next Hop table entries currently in use."
::= { l3Tables 5 }
l3NextHopTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the L3 Next Hop table.
The L3 Next Hop table holds information about the next hop(s)
associated with a routing table entry."
::= { l3Tables 6 }
l3EcmpGroupTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of ECMP Group table entries currently in use."
::= { l3Tables 7 }
l3EcmpGroupTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the ECMP Group table.
The ECMP Group table holds information about "
::= { l3Tables 8 }
l3EcmpNextHopTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of ECMP Next Hop table entries currently in use."
::= { l3Tables 9 }
l3EcmpNextHopTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the ECMP Next Hop
table. ECMP Next Hop table stores information about the next
hop associated with a routing table entry that has multiple equal
cost next hop neighbors."
::= { l3Tables 10 }
-- the l2 tables group
l2Tables OBJECT IDENTIFIER ::= {resourceUtilization 2}
l2MacTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of L2 Mac table entries currently in use."
::= { l2Tables 1 }
l2MacTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the L2 Mac table."
::= { l2Tables 2 }
l2CacheTableCurrentEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of Cache table currently entries in use"
::= { l2Tables 3 }
l2CacheTableMaxEntries OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum possible entries in the Cache table. The Cache table
holds entries that are to be redirected to the CPU because they are
control packets, specifically L2 protocol control packets. Examples
are STP BPDUs, LLDP BPDUs etc."
::= { l2Tables 4 }
-- the buffer utilization group
bufferUtilizn OBJECT IDENTIFIER ::= {resourceUtilization 3}
bufUtiliznComputeTime OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time when the buffer utilization statistic was computed."
DEFVAL { "0" }
::= { bufferUtilizn 1 }
bufUtiliznPollInterval OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The periodicity at which the buffer utilization data
is pulled from the hardware. This is specified in milliseconds."
::= { bufferUtilizn 2 }
bufUtiliznMeasureInterval OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The time interval over which the buffer utilization
statistics is computed. This is specified in minutes."
::= { bufferUtilizn 3 }
bufUtiliznTable OBJECT-TYPE
SYNTAX SEQUENCE OF BufUtiliznEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Table describes the ingress buffer utilization per service pool"
::= { bufferUtilizn 4 }
bufUtiliznEntry OBJECT-TYPE
SYNTAX BufUtiliznEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
""
INDEX { bufServicePoolID }
::= { bufUtiliznTable 1 }
BufUtiliznEntry ::=
SEQUENCE {
bufServicePoolID INTEGER,
bufMin INTEGER,
bufMax INTEGER,
bufAvg DisplayString,
bufVariance DisplayString,
bufStdDev DisplayString
}
bufServicePoolID OBJECT-TYPE
SYNTAX INTEGER (1..8)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The service pool number."
::= { bufUtiliznEntry 1 }
bufMin OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The minimum number of cells used in this service pool."
::= { bufUtiliznEntry 2 }
bufMax OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum number of cells used in this service pool"
::= { bufUtiliznEntry 3 }
bufAvg OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The average number of cells used in this service pool"
::= { bufUtiliznEntry 4 }
bufVariance OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The variance of the buffer pool utilization for this service pool
over the last measured interval."
::= { bufUtiliznEntry 5 }
bufStdDev OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The Standard Deviation of the buffer pool utilization for this
service pool over the last measured interval."
::= { bufUtiliznEntry 6 }
END

37
mibs/CUMULUS-SNMP-MIB Normal file
View File

@@ -0,0 +1,37 @@
CUMULUS-SNMP-MIB DEFINITIONS ::= BEGIN
--
-- Top-level infrastructure of the Cumulus enterprise MIB tree
--
IMPORTS
OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
Integer32, enterprises FROM SNMPv2-SMI
InterfaceIndex, ifIndex FROM IF-MIB
DateAndTime, DisplayString,
TEXTUAL-CONVENTION FROM SNMPv2-TC;
cumulusMib MODULE-IDENTITY
LAST-UPDATED "201207230000Z"
ORGANIZATION "www.cumulusnetworks.com"
CONTACT-INFO
"postal: Dinesh Dutt
650 Castro Street,
suite 120-245
Mountain View, CA 94041
email: ddutt@cumulusnetworks.com"
DESCRIPTION
"Top-level infrastructure of the Cumulus enterprise MIB tree"
REVISION "201207230000Z"
DESCRIPTION
"Second version with new Enterprise number and discard counters"
::= { enterprises 40310 }
--
-- This is just the placeholder for the cumulusMib definition.
-- The actual objects are defined in separate, appropriately named files.
-- This way, we keep an overall MIB definition and add extensions as needed.
--
END