New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Cumulus Linux support #3237
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you change this to elseif please. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
$os = 'cumulus'; | ||
} | ||
else { | ||
// Check for Synology DSM | ||
$hrSystemInitialLoadParameters = trim(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv')); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well remove this if it's not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I am waiting for an official green light to push the icon from Cumulus Network.
Do I remove until I get it ? Please advise.