Skip to content

chore: snmp-observ-lib update #1413

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

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions snmp-observ-lib/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
alertInterfaceDownSelector: 'ifAlias=~".*(?i:(uplink|internet|WAN)|ISP).*"',
alertInterfaceDownSeverity: 'warning',

// Enable to workaround issue with counters on Cisco NX-OS overloading issue.
// This will clamp max interface traffic possible to 1000Gbps.
clampQueryEnabled: true,
clampSpeed: '100*10^9', // 1000 GBps

// cpuSelector for metricsSources with HOST-RESOURCE-MIB:
cpuSelector: 'hrDeviceType="1.3.6.1.2.1.25.3.1.3"',
// memorySelector for metricsSources with HOST-RESOURCE-MIB:
Expand Down
4 changes: 2 additions & 2 deletions snmp-observ-lib/dashboards_out/snmp-fleet.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions snmp-observ-lib/signals/interface.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function(this, level='interface')
local bitsWrapper = ['(', ')*8'],
local nonZeroWrapper = ['(', ')>0'],
//set max limit to workaround for TB-PB/sec spikes when counters are overloaded too quickly on very busy interfaces.
local clampQuery = ['', '\n# set max limit to workaround for TB-PB/sec spikes when counters are overloaded too quickly on very busy interfaces.\n<100*10^9'],
local clampQuery = ['', '\n# set max limit to workaround for TB-PB/sec spikes when counters are overloaded too quickly on very busy interfaces.\n<' + this.clampSpeed],
discoveryMetric: {
generic: 'ifOperStatus',
arista_sw: self.generic,
Expand Down Expand Up @@ -52,7 +52,7 @@ function(this, level='interface')
generic:
{
expr: 'ifHCInOctets{%(queriesSelector)s}',
exprWrappers: [bitsWrapper, clampQuery],
exprWrappers: [bitsWrapper] + if this.clampQueryEnabled then [clampQuery] else [],
},
arista_sw: self.generic,
brocade_fc: self.generic,
Expand Down Expand Up @@ -86,7 +86,7 @@ function(this, level='interface')
generic:
{
expr: 'ifHCOutOctets{%(queriesSelector)s} ',
exprWrappers: [bitsWrapper, clampQuery],
exprWrappers: [bitsWrapper] + if this.clampQueryEnabled then [clampQuery] else [],
},
arista_sw: self.generic,
brocade_fc: self.generic,
Expand Down Expand Up @@ -530,7 +530,7 @@ function(this, level='interface')
},
interfacesCount: self.ifOperStatus {
name: 'Interfaces total',
nameShort: 'Interfaces count',
nameShort: 'Interfaces',
description: |||
Device interface count
|||,
Expand Down
Loading