Skip to content

Commit 6bd3759

Browse files
authored
Snmp observ lib update: New cisco memory counter. (#1401)
* add cisco CISCO-ENHANCED-MEMPOOL-MIB memory counters * Update version parser for cisco
1 parent 09ca0a6 commit 6bd3759

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

snmp-observ-lib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The library supports multiple metrics sources that corresponds to different netw
99
|metricsSource|Description|MIBs|Known devices|Links|snmp_exporter modules|
1010
|-|-|-|-|-|-|
1111
|generic |Generic SNMP device|IF-MIB,SNMPv2-MIB |default choice||system,if_mib,hrDevice,hrStorage|
12-
|cisco | Cisco IoS devices |IF-MIB,SNMPv2-MIB, Cisco private mibs|Cisco C2900, Cisco C7600, Cisco MDS|-|system,if_mib,cisco_device,cisco_fc_fe|
12+
|cisco | Cisco ASA, IOS, NX-OS, and IOS-XR devices |IF-MIB,SNMPv2-MIB, Cisco private mibs|Cisco C2900, Cisco C7600, Cisco Nexus 93180, Cisco MDS|https://www.cisco.com/c/en/us/td/docs/security/asa/asa918/configuration/general/asa-918-general-config/monitor-snmp.html|system,if_mib,cisco_device,cisco_fc_fe|
1313
|arista_sw | Arista devices |IF-MIB,SNMPv2-MIB,HOST-RESOURCES-MIB|-||system,if_mib,hrDevice,hrStorage,arista_sw|
1414
|brocade_fcs | Brocade |IF-MIB,SNMPv2-MIB,SW-MIB|Brocade 6520 v7.4.1c, Brocade 300 v7.0.0c,Brocade BL 5480 v6.3.1c|https://techdocs.broadcom.com/us/en/fibre-channel-networking/fabric-os/fabric-os-mib/9-1-x/understanding-brocade-snmp/loading-brocade-mibs/brocade-mib-files.html|system,if_mib|
1515
|brocade_foundry | Brocade Foundry | FOUNDRY-SN-AGENT-MIB | Brocade MLXe (System Mode: MLX), IronWare Version V5.4.0eT163, Foundry FLS648 Foundry Networks, Inc. FLS648, IronWare Version 04.1.00bT7e1, Foundry FWSX424 Foundry Networks, Inc. FWSX424, IronWare Version 02.0.00aT1e0||system,if_mib|

snmp-observ-lib/signals/interface.libsonnet

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ function(this, level='interface')
235235
dell_network: self.generic,
236236
dlink_des: self.generic,
237237
extreme: self.generic,
238-
239238
eltex_mes: self.generic,
240239
f5_bigip: self.generic,
241240
fortigate: self.generic,
@@ -305,7 +304,6 @@ function(this, level='interface')
305304
dell_network: self.generic,
306305
dlink_des: self.generic,
307306
extreme: self.generic,
308-
309307
eltex_mes: self.generic,
310308
f5_bigip: self.generic,
311309
fortigate: self.generic,
@@ -342,7 +340,6 @@ function(this, level='interface')
342340
dell_network: self.generic,
343341
dlink_des: self.generic,
344342
extreme: self.generic,
345-
346343
eltex_mes: self.generic,
347344
f5_bigip: self.generic,
348345
fortigate: self.generic,
@@ -378,7 +375,6 @@ function(this, level='interface')
378375
dell_network: self.generic,
379376
dlink_des: self.generic,
380377
extreme: self.generic,
381-
382378
eltex_mes: self.generic,
383379
f5_bigip: self.generic,
384380
fortigate: self.generic,
@@ -414,7 +410,6 @@ function(this, level='interface')
414410
dell_network: self.generic,
415411
dlink_des: self.generic,
416412
extreme: self.generic,
417-
418413
eltex_mes: self.generic,
419414
f5_bigip: self.generic,
420415
fortigate: self.generic,
@@ -450,7 +445,6 @@ function(this, level='interface')
450445
dell_network: self.generic,
451446
dlink_des: self.generic,
452447
extreme: self.generic,
453-
454448
eltex_mes: self.generic,
455449
f5_bigip: self.generic,
456450
fortigate: self.generic,
@@ -486,7 +480,6 @@ function(this, level='interface')
486480
dell_network: self.generic,
487481
dlink_des: self.generic,
488482
extreme: self.generic,
489-
490483
eltex_mes: self.generic,
491484
f5_bigip: self.generic,
492485
fortigate: self.generic,
@@ -522,7 +515,6 @@ function(this, level='interface')
522515
dell_network: self.generic,
523516
dlink_des: self.generic,
524517
extreme: self.generic,
525-
526518
eltex_mes: self.generic,
527519
f5_bigip: self.generic,
528520
fortigate: self.generic,
@@ -852,7 +844,6 @@ function(this, level='interface')
852844
dell_network: self.generic,
853845
dlink_des: self.generic,
854846
extreme: self.generic,
855-
856847
eltex_mes: self.generic,
857848
f5_bigip: self.generic,
858849
fortigate: self.generic,

snmp-observ-lib/signals/memory.libsonnet

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function(this)
1313
arista_sw: self.generic,
1414
brocade_fc: 'swMemUsage',
1515
brocade_foundry: 'snAgGblDynMemUtil',
16-
cisco: 'ciscoMemoryPoolUsed',
16+
cisco: 'cempMemPoolUsed',
1717
dell_network: 'dellNetCpuUtilMemUsage',
1818
dlink_des: 'agentDRAMutilization',
1919
extreme: 'extremeMemoryMonitorSystemTotal',
@@ -50,14 +50,28 @@ function(this)
5050
},
5151
cisco: {
5252
expr: |||
53-
# cisco
53+
# cisco CISCO-ENHANCED-MEMPOOL-MIB
54+
# cempMemPoolType="2" - processorMemory, cempMemPoolType="10" - virtual memory, i.e in ASA(v).
55+
(
56+
57+
(
58+
cempMemPoolUsed{%(queriesSelector)s}
59+
/
60+
(cempMemPoolUsed{%(queriesSelector)s} + cempMemPoolFree{%(queriesSelector)s}) * 100
61+
) * on (instance, cempMemPoolIndex) group_left ()
62+
(
63+
cempMemPoolType{%(queriesSelector)s} == 2)/2
64+
or (cempMemPoolType{%(queriesSelector)s} == 10)/10
65+
)
66+
or
67+
# cisco firmwares that supports only CISCO-MEMORY-POOL-MIB
5468
# ciscoMemoryPoolType="1" - Processor
55-
ciscoMemoryPoolUsed{ciscoMemoryPoolType="1", %(queriesSelector)s}
69+
(ciscoMemoryPoolUsed{ciscoMemoryPoolType="1", %(queriesSelector)s}
5670
/
57-
(ciscoMemoryPoolUsed{ciscoMemoryPoolType="1", %(queriesSelector)s} + ciscoMemoryPoolFree{ciscoMemoryPoolType="1", %(queriesSelector)s}) * 100
71+
(ciscoMemoryPoolUsed{ciscoMemoryPoolType="1", %(queriesSelector)s} + ciscoMemoryPoolFree{ciscoMemoryPoolType="1", %(queriesSelector)s}) * 100)
5872
|||,
5973
// keeping this label for now for future improvements
60-
// aggKeepLabels: ['ciscoMemoryPoolName'],
74+
// aggKeepLabels: ['ciscoMemoryPoolName', cempMemPoolName'],
6175
},
6276
dell_network: {
6377
expr: 'dellNetCpuUtilMemUsage{%(queriesSelector)s}',

snmp-observ-lib/signals/system.libsonnet

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ function(this)
107107
arista_sw: self.generic,
108108
brocade_fc: self.generic,
109109
brocade_foundry: self.generic,
110-
cisco:
111-
{
112-
expr: 'label_replace(sysDescr{%(queriesSelector)s}, "sysDescr", "$1", "sysDescr", ".*Version(.+?),.*")',
113-
infoLabel: 'sysDescr',
114-
},
110+
cisco: {
111+
expr: 'label_replace(sysDescr{%(queriesSelector)s}, "sysDescr", "$1", "sysDescr", ".*Version ([0-9a-zA-Z\\\\.\\\\(\\\\)]+).*")',
112+
infoLabel: 'sysDescr',
113+
},
115114
dell_network: self.generic,
116115
dlink_des: self.generic,
117116
extreme: self.generic,

0 commit comments

Comments
 (0)