Handle icmpjitter SLA parsing for iosxe (#15707)

* Added MIB file CISCO-RTTMON-ICMP-MIB to Cisco collection
Query rttMonLatestIcmpJitterOperTable when polling SLAs
Extended icmpJitter parsing to allow retrieval of jitter related data from multiple locations in MIB tree

Fixes #15658

* Appended snmprec data to testdata

* Update iosxe_c9300.json

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
This commit is contained in:
Peter Reinhold
2024-01-08 18:42:00 +01:00
committed by GitHub
parent ca891b477e
commit 8fb94c07c4
4 changed files with 1712 additions and 10 deletions
+16 -10
View File
@@ -421,6 +421,7 @@ class Cisco extends OS implements
$data = snmpwalk_group($device, 'rttMonLatestRttOperTable', 'CISCO-RTTMON-MIB');
$data = snmpwalk_group($device, 'rttMonLatestOper', 'CISCO-RTTMON-MIB', 1, $data);
$data = snmpwalk_group($device, 'rttMonEchoAdminNumPackets', 'CISCO-RTTMON-MIB', 1, $data);
$data = snmpwalk_group($device, 'rttMonLatestIcmpJitterOperTable', 'CISCO-RTTMON-ICMP-MIB', 1, $data);
$time_offset = time() - $this->getDevice()->uptime;
@@ -486,17 +487,22 @@ class Cisco extends OS implements
$collected = array_merge($collected, $numPackets);
break;
case 'icmpjitter':
// icmpJitter data is placed at different locations in MIB tree, possibly based on IOS version
// First look for values as originally implemented in lnms (from CISCO-RTTMON-MIB), then look for OIDs defined in CISCO-RTTMON-ICMP-MIB
// This MIGHT mix values if a device presents some data from one and some from the other
$icmpjitter = [
'PacketLoss' => $data[$sla_nr]['rttMonLatestJitterOperPacketLossSD'],
'PacketOosSD' => $data[$sla_nr]['rttMonLatestJitterOperPacketOutOfSequence'],
'PacketOosDS' => $data[$sla_nr]['rttMonLatestJitterOperPacketMIA'],
'PacketLateArrival' => $data[$sla_nr]['rttMonLatestJitterOperPacketLateArrival'],
'JitterAvgSD' => $data[$sla_nr]['rttMonLatestJitterOperAvgSDJ'],
'JitterAvgDS' => $data[$sla_nr]['rttMonLatestJitterOperAvgDSJ'],
'LatencyOWAvgSD' => $data[$sla_nr]['rttMonLatestJitterOperOWAvgSD'],
'LatencyOWAvgDS' => $data[$sla_nr]['rttMonLatestJitterOperOWAvgDS'],
'JitterIAJOut' => $data[$sla_nr]['rttMonLatestJitterOperIAJOut'],
'JitterIAJIn' => $data[$sla_nr]['rttMonLatestJitterOperIAJIn'],
'PacketLoss' => $data[$sla_nr]['rttMonLatestJitterOperPacketLossSD'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterPktLoss'],
'PacketOosSD' => $data[$sla_nr]['rttMonLatestJitterOperPacketOutOfSequence'] ?? $data[$sla_nr]['rttMonLatestIcmpJPktOutSeqBoth'],
// No equivalent found in CISCO-RTTMON-ICMP-MIB, return null
'PacketOosDS' => $data[$sla_nr]['rttMonLatestJitterOperPacketMIA'] ?? null,
'PacketLateArrival' => $data[$sla_nr]['rttMonLatestJitterOperPacketLateArrival'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterPktLateA'],
'JitterAvgSD' => $data[$sla_nr]['rttMonLatestJitterOperAvgSDJ'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterAvgSDJ'],
'JitterAvgDS' => $data[$sla_nr]['rttMonLatestJitterOperAvgDSJ'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterAvgDSJ'],
'LatencyOWAvgSD' => $data[$sla_nr]['rttMonLatestJitterOperOWAvgSD'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterOWAvgSD'],
'LatencyOWAvgDS' => $data[$sla_nr]['rttMonLatestJitterOperOWAvgDS'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterOWAvgDS'],
'JitterIAJOut' => $data[$sla_nr]['rttMonLatestJitterOperIAJOut'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterIAJOut'],
'JitterIAJIn' => $data[$sla_nr]['rttMonLatestJitterOperIAJIn'] ?? $data[$sla_nr]['rttMonLatestIcmpJitterIAJIn'],
];
$rrd_name = ['sla', $sla_nr, $rtt_type];
$rrd_def = RrdDefinition::make()
+1501
View File
File diff suppressed because it is too large Load Diff
+17
View File
@@ -14229,5 +14229,22 @@
}
]
}
},
"slas": {
"discovery": {
"slas": [
{
"sla_nr": 200,
"owner": "",
"tag": "ICMP-JITTER",
"rtt_type": "icmpjitter",
"rtt": 15,
"status": 1,
"opstatus": 0,
"deleted": 0
}
]
},
"poller": "matches discovery"
}
}
+178
View File
@@ -5167,3 +5167,181 @@
1.3.6.1.2.1.47.1.3.2.1.2.1107.0|6|1.3.6.1.2.1.2.2.1.1.53
1.3.6.1.2.1.47.1.3.2.1.2.1108.0|6|1.3.6.1.2.1.2.2.1.1.54
1.3.6.1.2.1.47.1.3.2.1.2.1109.0|6|1.3.6.1.2.1.2.2.1.1.55
1.3.6.1.4.1.9.9.42.1.2.1.1.2.200|4|
1.3.6.1.4.1.9.9.42.1.2.1.1.3.200|4|ICMP-JITTER
1.3.6.1.4.1.9.9.42.1.2.1.1.4.200|2|16
1.3.6.1.4.1.9.9.42.1.2.1.1.5.200|2|5000
1.3.6.1.4.1.9.9.42.1.2.1.1.6.200|2|60
1.3.6.1.4.1.9.9.42.1.2.1.1.7.200|2|5000
1.3.6.1.4.1.9.9.42.1.2.1.1.8.200|2|2
1.3.6.1.4.1.9.9.42.1.2.1.1.9.200|2|1
1.3.6.1.4.1.9.9.42.1.2.1.1.10.200|2|1
1.3.6.1.4.1.9.9.42.1.2.1.1.11.200|4|
1.3.6.1.4.1.9.9.42.1.2.1.1.12.200|4|ICMP-JITTER
1.3.6.1.4.1.9.9.42.1.2.2.1.1.200|2|34
1.3.6.1.4.1.9.9.42.1.2.2.1.2.200|4x|64400402
1.3.6.1.4.1.9.9.42.1.2.2.1.3.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.4.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.5.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.6.200|4x|64400802
1.3.6.1.4.1.9.9.42.1.2.2.1.7.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.8.200|2|2
1.3.6.1.4.1.9.9.42.1.2.2.1.9.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.10.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.11.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.12.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.13.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.14.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.15.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.16.200|2|2
1.3.6.1.4.1.9.9.42.1.2.2.1.17.200|2|20
1.3.6.1.4.1.9.9.42.1.2.2.1.18.200|2|10
1.3.6.1.4.1.9.9.42.1.2.2.1.19.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.20.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.21.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.22.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.23.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.24.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.25.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.26.200|4|vrf-name
1.3.6.1.4.1.9.9.42.1.2.2.1.27.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.28.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.29.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.30.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.31.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.32.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.33.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.34.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.35.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.36.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.37.200|2|1
1.3.6.1.4.1.9.9.42.1.2.2.1.38.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.39.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.40.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.41.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.42.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.43.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.44.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.45.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.46.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.47.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.48.200|2|2
1.3.6.1.4.1.9.9.42.1.2.2.1.49.200|66|0
1.3.6.1.4.1.9.9.42.1.2.2.1.50.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.51.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.52.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.53.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.54.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.55.200|2|2
1.3.6.1.4.1.9.9.42.1.2.2.1.56.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.57.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.58.200|2|3
1.3.6.1.4.1.9.9.42.1.2.2.1.59.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.60.200|4x|00000000
1.3.6.1.4.1.9.9.42.1.2.2.1.61.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.62.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.63.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.64.200|4x|000000000000
1.3.6.1.4.1.9.9.42.1.2.2.1.65.200|4x|000000000000
1.3.6.1.4.1.9.9.42.1.2.2.1.66.200|66|0
1.3.6.1.4.1.9.9.42.1.2.2.1.67.200|4|
1.3.6.1.4.1.9.9.42.1.2.2.1.68.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.69.200|66|0
1.3.6.1.4.1.9.9.42.1.2.2.1.70.200|66|0
1.3.6.1.4.1.9.9.42.1.2.2.1.71.200|66|0
1.3.6.1.4.1.9.9.42.1.2.2.1.72.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.73.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.74.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.75.200|2|0
1.3.6.1.4.1.9.9.42.1.2.2.1.76.200|2|2
1.3.6.1.4.1.9.9.42.1.2.5.1.1.200|2|2147483647
1.3.6.1.4.1.9.9.42.1.2.5.1.2.200|67|1
1.3.6.1.4.1.9.9.42.1.2.5.1.3.200|2|0
1.3.6.1.4.1.9.9.42.1.2.5.1.4.200|2|2
1.3.6.1.4.1.9.9.42.1.2.5.1.5.200|2|0
1.3.6.1.4.1.9.9.42.1.2.5.1.6.200|2|2
1.3.6.1.4.1.9.9.42.1.2.5.1.7.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.1.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.2.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.3.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.4.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.5.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.6.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.7.200|2|0
1.3.6.1.4.1.9.9.42.1.2.6.1.8.200|2|0
1.3.6.1.4.1.9.9.42.1.2.7.1.1.200|2|2
1.3.6.1.4.1.9.9.42.1.2.7.1.2.200|2|1
1.3.6.1.4.1.9.9.42.1.2.7.1.3.200|2|1
1.3.6.1.4.1.9.9.42.1.2.7.1.4.200|2|1
1.3.6.1.4.1.9.9.42.1.2.7.1.5.200|2|20
1.3.6.1.4.1.9.9.42.1.2.8.1.1.200|2|0
1.3.6.1.4.1.9.9.42.1.2.8.1.2.200|2|0
1.3.6.1.4.1.9.9.42.1.2.8.1.3.200|2|1
1.3.6.1.4.1.9.9.42.1.2.8.1.4.200|2|0
1.3.6.1.4.1.9.9.42.1.2.9.1.1.200|67|0
1.3.6.1.4.1.9.9.42.1.2.9.1.2.200|4|
1.3.6.1.4.1.9.9.42.1.2.9.1.3.200|67|0
1.3.6.1.4.1.9.9.42.1.2.9.1.4.200|66|0
1.3.6.1.4.1.9.9.42.1.2.9.1.5.200|2|2
1.3.6.1.4.1.9.9.42.1.2.9.1.6.200|2|2
1.3.6.1.4.1.9.9.42.1.2.9.1.7.200|2|2
1.3.6.1.4.1.9.9.42.1.2.9.1.8.200|2|36181
1.3.6.1.4.1.9.9.42.1.2.9.1.9.200|2|2147483647
1.3.6.1.4.1.9.9.42.1.2.9.1.10.200|2|6
1.3.6.1.4.1.9.9.42.1.2.9.1.11.200|2|2
1.3.6.1.4.1.9.9.42.1.2.10.1.1.200|66|15
1.3.6.1.4.1.9.9.42.1.2.10.1.2.200|2|1
1.3.6.1.4.1.9.9.42.1.2.10.1.3.200|2|0
1.3.6.1.4.1.9.9.42.1.2.10.1.4.200|4|
1.3.6.1.4.1.9.9.42.1.2.10.1.5.200|67|398555786
1.3.6.1.4.1.9.9.42.1.2.10.1.6.200|4x|64400402
1.3.6.1.4.1.9.9.42.1.5.4.1.1.200|66|10
1.3.6.1.4.1.9.9.42.1.5.4.1.2.200|66|150
1.3.6.1.4.1.9.9.42.1.5.4.1.3.200|66|2250
1.3.6.1.4.1.9.9.42.1.5.4.1.4.200|66|15
1.3.6.1.4.1.9.9.42.1.5.4.1.5.200|66|15
1.3.6.1.4.1.9.9.42.1.5.4.1.6.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.7.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.8.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.9.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.10.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.11.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.12.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.13.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.14.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.15.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.16.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.17.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.18.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.19.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.20.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.21.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.22.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.23.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.24.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.25.200|66|2
1.3.6.1.4.1.9.9.42.1.5.4.1.26.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.27.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.28.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.29.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.31.200|2|1
1.3.6.1.4.1.9.9.42.1.5.4.1.32.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.33.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.34.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.35.200|66|53
1.3.6.1.4.1.9.9.42.1.5.4.1.36.200|66|283
1.3.6.1.4.1.9.9.42.1.5.4.1.37.200|66|5
1.3.6.1.4.1.9.9.42.1.5.4.1.38.200|66|6
1.3.6.1.4.1.9.9.42.1.5.4.1.39.200|66|95
1.3.6.1.4.1.9.9.42.1.5.4.1.40.200|66|905
1.3.6.1.4.1.9.9.42.1.5.4.1.41.200|66|9
1.3.6.1.4.1.9.9.42.1.5.4.1.42.200|66|10
1.3.6.1.4.1.9.9.42.1.5.4.1.43.200|66|10
1.3.6.1.4.1.9.9.42.1.5.4.1.44.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.45.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.46.200|66|1
1.3.6.1.4.1.9.9.42.1.5.4.1.47.200|66|5
1.3.6.1.4.1.9.9.42.1.5.4.1.48.200|66|9
1.3.6.1.4.1.9.9.42.1.5.4.1.49.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.50.200|66|0
1.3.6.1.4.1.9.9.42.1.5.4.1.51.200|66|0