From 7e4718c771d61d62af6b8dd5e6734ba0d649403f Mon Sep 17 00:00:00 2001 From: Xavier Beaudouin Date: Mon, 14 Mar 2016 12:04:27 +0100 Subject: [PATCH 1/4] Adding Cumulus Linux mibs --- mibs/CUMULUS-COUNTERS-MIB | 124 +++++++++++++++++ mibs/CUMULUS-RESOURCES-MIB | 265 +++++++++++++++++++++++++++++++++++++ mibs/CUMULUS-SNMP-MIB | 37 ++++++ 3 files changed, 426 insertions(+) create mode 100644 mibs/CUMULUS-COUNTERS-MIB create mode 100644 mibs/CUMULUS-RESOURCES-MIB create mode 100644 mibs/CUMULUS-SNMP-MIB diff --git a/mibs/CUMULUS-COUNTERS-MIB b/mibs/CUMULUS-COUNTERS-MIB new file mode 100644 index 000000000000..272eaf4c2ea8 --- /dev/null +++ b/mibs/CUMULUS-COUNTERS-MIB @@ -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 + diff --git a/mibs/CUMULUS-RESOURCES-MIB b/mibs/CUMULUS-RESOURCES-MIB new file mode 100644 index 000000000000..89fa48ee05e5 --- /dev/null +++ b/mibs/CUMULUS-RESOURCES-MIB @@ -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 diff --git a/mibs/CUMULUS-SNMP-MIB b/mibs/CUMULUS-SNMP-MIB new file mode 100644 index 000000000000..06655ec0933a --- /dev/null +++ b/mibs/CUMULUS-SNMP-MIB @@ -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 From 77a5918d4e628d2010cef643ac62adbca6c9dfb7 Mon Sep 17 00:00:00 2001 From: Xavier Beaudouin Date: Mon, 14 Mar 2016 15:39:45 +0100 Subject: [PATCH 2/4] Basic Cumulus Linux detection --- includes/definitions.inc.php | 12 ++++++++++++ includes/discovery/os/linux.inc.php | 3 +++ .../discovery/sensors/fanspeeds/lmsensors.inc.php | 2 +- .../sensors/temperatures/lm-sensors.inc.php | 2 +- includes/discovery/sensors/voltages/linux.inc.php | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 31f417edd246..667ae782bc71 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -240,6 +240,18 @@ $config['os'][$os]['over'][2]['graph'] = 'device_mempool'; $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. $os = 'freebsd'; $config['os'][$os]['type'] = 'server'; diff --git a/includes/discovery/os/linux.inc.php b/includes/discovery/os/linux.inc.php index 3ae2e3e6dafd..f74722d92e49 100644 --- a/includes/discovery/os/linux.inc.php +++ b/includes/discovery/os/linux.inc.php @@ -64,6 +64,9 @@ ); register_mibs($device, $pktj_mibs, "include/discovery/os/linux.inc.php"); } + else if (stristr($sysObjectId, 'cumulusMib') || strstr($sysObjectId, '.1.3.6.1.4.1.40310')) { + $os = 'cumulus'; + } else { // Check for Synology DSM $hrSystemInitialLoadParameters = trim(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv')); diff --git a/includes/discovery/sensors/fanspeeds/lmsensors.inc.php b/includes/discovery/sensors/fanspeeds/lmsensors.inc.php index 5396eeccb044..3127970f3030 100644 --- a/includes/discovery/sensors/fanspeeds/lmsensors.inc.php +++ b/includes/discovery/sensors/fanspeeds/lmsensors.inc.php @@ -1,7 +1,7 @@ Date: Tue, 15 Mar 2016 11:39:49 +0100 Subject: [PATCH 3/4] Change else if to elseif as requested by @laf. --- includes/discovery/os/linux.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/os/linux.inc.php b/includes/discovery/os/linux.inc.php index f74722d92e49..cd912203ab64 100644 --- a/includes/discovery/os/linux.inc.php +++ b/includes/discovery/os/linux.inc.php @@ -64,7 +64,7 @@ ); register_mibs($device, $pktj_mibs, "include/discovery/os/linux.inc.php"); } - else if (stristr($sysObjectId, 'cumulusMib') || strstr($sysObjectId, '.1.3.6.1.4.1.40310')) { + elseif (stristr($sysObjectId, 'cumulusMib') || strstr($sysObjectId, '.1.3.6.1.4.1.40310')) { $os = 'cumulus'; } else { From 571ee1631a0c84be5e6d95b39ccdeacffd7ad7a2 Mon Sep 17 00:00:00 2001 From: Xavier Beaudouin Date: Wed, 16 Mar 2016 16:07:51 +0100 Subject: [PATCH 4/4] Add cumulus icon --- html/images/os/cumulus.png | Bin 0 -> 1276 bytes includes/definitions.inc.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 html/images/os/cumulus.png diff --git a/html/images/os/cumulus.png b/html/images/os/cumulus.png new file mode 100644 index 0000000000000000000000000000000000000000..30c5d33009bd9e68ef7465b6da10259161deef17 GIT binary patch literal 1276 zcmV4p*?%tlf7-bmn+*|;#wv+1*l=a*nblB#(xpO=(6G;rFo-Y&ky{-rWLS_PhrsM(P z^=jRr*zH1^`MmUOX~$ilXmD8cLGkw=cT}e5hUKOKqW&>g6s%EC0l=NwaOmrM`NJH0 z{`c!ZGk~f0SEhvfXr4JNVn&n_nppR^ZNOof9s^I)Il=Q68cf~Q#%7?HO@Z-^d(H_d zrpDN^OSdsCH1TBJ)xwl)cSbbpE<$~_0l7#LC|Cb!F|E@?>%Pn2Tuwl!u<_=WPs_6s zcI_?BS+gjzptWL}Af`?cfRJ&E@L7_iiPp+gpOu~&8nyxg064Yz$m#n9a?!kAOMi?q z?3cC*!1T*UfbmyVKi$sA-B+B`xI3@UK5(J=SEZ--!I;zwEhXRAUZpX;M5gfekOI%o zmS_~c_2Q9%VQaOq`GMJZFedeh)x5LdM5n16Ftth%db_)xMigLb_Dp_iGlPq*=xMy! zQFFTf2C#OZ830g8{d~kSLP$wh9ngY*BNYf}x7^w**=zTf_cSc?(-yT=t0dmrf>&pj zo;jZIp8nik05mHej5D)+@DGbAQ=i`6Z+vPqBS1>e1&gJAX_t@LU5@Di&`c*9Awal2 zQCs5Gy1`-V*@mK;uKJO5%~mR=&<`Ly00M-kBQPPryMPkB{J=pNFb#NAf*4AGCi{AT zm*Rt%RH>VIGJr`na>Pkq>~|M?U}eez53j%f`-Y{f7D;^HSfm5Ok1H}E%N4;<{=q}6 zO)3-*I);|YRaVv>>8I8CY8@{2&44J@<#Z8_p=gfh{UqKA>SZl`onl5bU>^*SDMbRe zXho=0B)Q&R2>>??<$$T@5%B!}70K_0y=8IQ^{R;d%aeh19MxxR)W#-hqA@~+so5Q7 zY}hoff`x z@sq=GJ2nUE$B%A$OnHu%<=x$Rs`61&=d<3G%8+C0K3wLj{h{d=LkSQ<9*hV8+y!n1 zQ%_FfzPjGlmcA|mq{D1H8lQnM@)655QpJgi^ZChNT8BFhGxW!(8Y6W7q7U~bn7+$ zAiXN0sH6H}zY#E=lm`R|8I6wcFK#FV00AL@5D)@D#+^RDHR1;}o+9)_-i@72+<(yM mUNrhdliZr<|9>}~k^KeA#MQi+I}>^U0000