Skip to content

Commit 6f0a4d4

Browse files
authored
snmp update (#1413)
- shorter interface column - add configurable clampQuery to workaround traffic not properly calculated for some devices (like NX-OS).
1 parent 7172059 commit 6f0a4d4

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

snmp-observ-lib/config.libsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
alertInterfaceDownSelector: 'ifAlias=~".*(?i:(uplink|internet|WAN)|ISP).*"',
2020
alertInterfaceDownSeverity: 'warning',
2121

22+
// Enable to workaround issue with counters on Cisco NX-OS overloading issue.
23+
// This will clamp max interface traffic possible to 1000Gbps.
24+
clampQueryEnabled: true,
25+
clampSpeed: '100*10^9', // 1000 GBps
26+
2227
// cpuSelector for metricsSources with HOST-RESOURCE-MIB:
2328
cpuSelector: 'hrDeviceType="1.3.6.1.2.1.25.3.1.3"',
2429
// memorySelector for metricsSources with HOST-RESOURCE-MIB:

snmp-observ-lib/dashboards_out/snmp-fleet.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snmp-observ-lib/signals/interface.libsonnet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function(this, level='interface')
1414
local bitsWrapper = ['(', ')*8'],
1515
local nonZeroWrapper = ['(', ')>0'],
1616
//set max limit to workaround for TB-PB/sec spikes when counters are overloaded too quickly on very busy interfaces.
17-
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'],
17+
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],
1818
discoveryMetric: {
1919
generic: 'ifOperStatus',
2020
arista_sw: self.generic,
@@ -52,7 +52,7 @@ function(this, level='interface')
5252
generic:
5353
{
5454
expr: 'ifHCInOctets{%(queriesSelector)s}',
55-
exprWrappers: [bitsWrapper, clampQuery],
55+
exprWrappers: [bitsWrapper] + if this.clampQueryEnabled then [clampQuery] else [],
5656
},
5757
arista_sw: self.generic,
5858
brocade_fc: self.generic,
@@ -86,7 +86,7 @@ function(this, level='interface')
8686
generic:
8787
{
8888
expr: 'ifHCOutOctets{%(queriesSelector)s} ',
89-
exprWrappers: [bitsWrapper, clampQuery],
89+
exprWrappers: [bitsWrapper] + if this.clampQueryEnabled then [clampQuery] else [],
9090
},
9191
arista_sw: self.generic,
9292
brocade_fc: self.generic,
@@ -530,7 +530,7 @@ function(this, level='interface')
530530
},
531531
interfacesCount: self.ifOperStatus {
532532
name: 'Interfaces total',
533-
nameShort: 'Interfaces count',
533+
nameShort: 'Interfaces',
534534
description: |||
535535
Device interface count
536536
|||,

0 commit comments

Comments
 (0)