Skip to content

Commit

Permalink
[NDMII-3147] update Cisco IP SLA metrics (#19079)
Browse files Browse the repository at this point in the history
* update cisco ipsla metric tags and description

* fix test cisco asa

* switch oper sense to camel case

* fix test cisco asa

* fix test cisco asa

* fix release note

* fix test

* fix test
  • Loading branch information
jedupau authored Nov 19, 2024
1 parent fb7450d commit c875ec6
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 12 deletions.
1 change: 1 addition & 0 deletions snmp/changelog.d/19079.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[NDMII-3147] update Cisco IP SLA metric tags and description.
56 changes: 56 additions & 0 deletions snmp/datadog_checks/snmp/data/default_profiles/_cisco-generic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,41 @@ metrics:
26: fabric_path_echo
- index: 1
tag: rtt_index
- symbol:
OID: 1.3.6.1.4.1.9.9.42.1.2.2.1.6
name: rttMonEchoAdminSourceAddress
format: ip_address
table: rttMonEchoAdminTable
tag: rtt_source_address
- symbol:
OID: 1.3.6.1.4.1.9.9.42.1.2.2.1.2
name: rttMonEchoAdminTargetAddress
format: ip_address
table: rttMonEchoAdminTable
tag: rtt_target_address
- symbol:
OID: 1.3.6.1.4.1.9.9.42.1.2.10.1.2
name: rttMonLatestRttOperSense
table: rttMonLatestRttOperTable
tag: rtt_sense
mapping:
0: other
1: ok
2: disconnected
3: over_threshold
4: timeout
5: busy
6: not_connected
7: dropped
8: sequence_error
9: verify_error
10: application_specific
11: dns_server_timeout
12: tcp_connect_timeout
13: http_transaction_timeout
14: dns_query_error
15: http_error
16: error

- MIB: CISCO-RTTMON-MIB
table:
Expand Down Expand Up @@ -500,3 +535,24 @@ metrics:
26: fabric_path_echo
- index: 1
tag: rtt_index
- symbol:
OID: 1.3.6.1.4.1.9.9.42.1.2.2.1.6
name: rttMonEchoAdminSourceAddress
format: ip_address
table: rttMonEchoAdminTable
tag: rtt_source_address
- symbol:
OID: 1.3.6.1.4.1.9.9.42.1.2.2.1.2
name: rttMonEchoAdminTargetAddress
format: ip_address
table: rttMonEchoAdminTable
tag: rtt_target_address
- symbol:
OID: 1.3.6.1.4.1.9.9.42.1.2.9.1.6
name: rttMonCtrlOperTimeoutOccurred
name: rttMonCtrlOperTable
tag: rtt_timeout
mapping:
1: true
2: false

6 changes: 3 additions & 3 deletions snmp/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1982,9 +1982,9 @@ snmp.rtpSenderPackets,gauge,,,,"[RTP-MIB] Count of RTP packets sent by this send
snmp.rtpSessionByes,gauge,,,,"[RTP-MIB] A count of RTCP BYE (see RFC 1889, 'RTP: A Transport Protocol for Real-Time Applications,' sec. 6.6) messages received by this entity.",0,snmp,,
snmp.rtpSessionReceiverJoins,gauge,,,,"[RTP-MIB] The number of receivers that have been been observed to have joined this session since this conceptual row was created (rtpSessionStartTime). A receiver 'joins' an RTP session by sending RTCP Receiver Reports to the session. Receivers that leave and then re-join following an RTCP BYE (see RFC 1889, 'RTP: A Transport Protocol for Real-Time Applications,' sec. 6.6) or session timeout ma...",0,snmp,,
snmp.rtpSessionSenderJoins,gauge,,,,"[RTP-MIB] The number of senders that have been observed to have joined the session since this conceptual row was created (rtpSessionStartTime). A sender 'joins' an RTP session by sending to it. Senders that leave and then re-join following an RTCP BYE (see RFC 1889, 'RTP: A Transport Protocol for Real-Time Applications,' sec. 6.6) or session timeout may be counted twice. Every time a new RTP se...",0,snmp,,
snmp.rttMonCtrlOperTimeoutOccurred,gauge,,,,This object will change its value for all RttMonRttTypes.,0,snmp,,
snmp.rttMonLatestRttOperCompletionTime,gauge,,millisecond,,The completion time of the latest RTT operation successfully completed.,0,snmp,,
snmp.rttMonLatestRttOperSense,gauge,,,,A sense code for the completion status of the latest RTT operation.,0,snmp,,
snmp.rttMonCtrlOperTimeoutOccurred,gauge,,,,[CISCO-RTTMON-MIB] This value indicates whether a timeout has occurred during the Cisco IP SLA operation where 1 means true (timeout occurred) and 2 means false (no timeout).,0,snmp,,
snmp.rttMonLatestRttOperCompletionTime,gauge,,millisecond,,[CISCO-RTTMON-MIB] This value shows the time in milliseconds taken to complete the latest succesful Cisco IP SLA operation.,0,snmp,,
snmp.rttMonLatestRttOperSense,gauge,,,,[CISCO-RTTMON-MIB] This value indicates the result of the latest Cisco IP SLA operation where different integer values represent specific outcomes. Tagging the metric with rtt_sense will show the corresponding status.,0,snmp,,
snmp.ruckusUnleashedSystemStatsAllNumSta,gauge,,,,"[RUCKUS-UNLEASHED-SYSTEM-MIB] Number of All client devices",0,snmp,,
snmp.ruckusUnleashedSystemStatsNumAP,gauge,,,,"[RUCKUS-UNLEASHED-SYSTEM-MIB] Number of AP",0,snmp,,
snmp.ruckusUnleashedSystemStatsNumRegisteredAP,gauge,,,,"[RUCKUS-UNLEASHED-SYSTEM-MIB] Number of registered AP",0,snmp,,
Expand Down
8 changes: 4 additions & 4 deletions snmp/tests/compose/data/_cisco-generic.snmprec
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@
1.3.6.1.4.1.9.9.42.1.2.1.1.12.30|4x|717561696e746c7920717561696e746c79207a6f6d62696573
1.3.6.1.4.1.9.9.42.1.2.2.1.1.27|2|25
1.3.6.1.4.1.9.9.42.1.2.2.1.1.31|2|4
1.3.6.1.4.1.9.9.42.1.2.2.1.2.27|4x|717561696e746c79206b6570742064726976696e67
1.3.6.1.4.1.9.9.42.1.2.2.1.2.31|4x|6f78656e207a6f6d6269657320746865697220717561696e746c79206b657074206163746564
1.3.6.1.4.1.9.9.42.1.2.2.1.2.26|4x|be7260a9
1.3.6.1.4.1.9.9.42.1.2.2.1.2.30|4x|00000000
1.3.6.1.4.1.9.9.42.1.2.2.1.3.27|2|19
1.3.6.1.4.1.9.9.42.1.2.2.1.3.31|2|24
1.3.6.1.4.1.9.9.42.1.2.2.1.4.27|2|30
1.3.6.1.4.1.9.9.42.1.2.2.1.4.31|2|6
1.3.6.1.4.1.9.9.42.1.2.2.1.5.27|2|15
1.3.6.1.4.1.9.9.42.1.2.2.1.5.31|2|10
1.3.6.1.4.1.9.9.42.1.2.2.1.6.27|4x|6f78656e20627574207468656972206f78656e206f78656e204a61646564206163746564207a6f6d62696573206163746564
1.3.6.1.4.1.9.9.42.1.2.2.1.6.31|4x|7a6f6d62696573206f78656e20666f727761726420666f7277617264206f78656e
1.3.6.1.4.1.9.9.42.1.2.2.1.6.26|4x|00000000
1.3.6.1.4.1.9.9.42.1.2.2.1.6.30|4x|be7260a9
1.3.6.1.4.1.9.9.42.1.2.2.1.7.27|2|16
1.3.6.1.4.1.9.9.42.1.2.2.1.7.31|2|24
1.3.6.1.4.1.9.9.42.1.2.2.1.8.27|2|1
Expand Down
36 changes: 32 additions & 4 deletions snmp/tests/test_e2e_core_profiles/test_profile__cisco_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,22 @@ def test_e2e_profile__cisco_generic(dd_agent_check):
aggregator.assert_metric('snmp.cvsChassisUpTime', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

tag_rows = [
['rtt_index:26', 'rtt_state:inactive', 'rtt_type:tcp_connect'],
['rtt_index:30', 'rtt_state:orderly_stop', 'rtt_type:script'],
[
'rtt_index:26',
'rtt_state:inactive',
'rtt_type:tcp_connect',
'rtt_source_address:0.0.0.0',
'rtt_target_address:190.114.96.169',
'rtt_sense:other',
],
[
'rtt_index:30',
'rtt_state:orderly_stop',
'rtt_type:script',
'rtt_source_address:190.114.96.169',
'rtt_target_address:0.0.0.0',
'rtt_sense:timeout',
],
]
for tag_row in tag_rows:
aggregator.assert_metric(
Expand All @@ -256,8 +270,22 @@ def test_e2e_profile__cisco_generic(dd_agent_check):
)

tag_rows = [
['rtt_index:26', 'rtt_state:inactive', 'rtt_type:tcp_connect'],
['rtt_index:30', 'rtt_state:orderly_stop', 'rtt_type:script'],
[
'rtt_index:26',
'rtt_state:inactive',
'rtt_type:tcp_connect',
'rtt_source_address:0.0.0.0',
'rtt_target_address:190.114.96.169',
'rtt_timeout:false',
],
[
'rtt_index:30',
'rtt_state:orderly_stop',
'rtt_type:script',
'rtt_source_address:190.114.96.169',
'rtt_target_address:0.0.0.0',
'rtt_timeout:true',
],
]
for tag_row in tag_rows:
aggregator.assert_metric(
Expand Down
4 changes: 4 additions & 0 deletions snmp/tests/test_e2e_core_vs_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ def test_e2e_profile_cisco_asa(dd_agent_check):
'temp_state',
'power_source',
'connection_type',
'rtt_timeout',
'rtt_sense',
], # Ignore tags that have mappings
)

Expand All @@ -446,6 +448,8 @@ def test_e2e_profile_cisco_asa_5525(dd_agent_check):
'temp_state',
'power_source',
'connection_type',
'rtt_timeout',
'rtt_sense',
], # Ignore tags that have mappings
)

Expand Down
14 changes: 13 additions & 1 deletion snmp/tests/test_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -2141,16 +2141,28 @@ def assert_cisco_asa(aggregator, profile):
rtt_indexes = [1, 7, 10, 13, 15, 18, 20]
rtt_types = [22, 21, 17, 6, 20, 8, 16]
rtt_states = [3, 1, 6, 4, 6, 1, 6]
rtt_gauges = ['rttMonLatestRttOperCompletionTime', 'rttMonLatestRttOperSense', 'rttMonCtrlOperTimeoutOccurred']
rtt_senses = [13, 30, 2, 21, 19, 20, 27]
rtt_timeouts = [1, 1, 2, 2, 1, 2, 1]
rtt_gauges = ['rttMonLatestRttOperCompletionTime', 'rttMonLatestRttOperSense']
for i in range(len(rtt_indexes)):
tags = [
"rtt_index:{}".format(rtt_indexes[i]),
"rtt_type:{}".format(rtt_types[i]),
"rtt_state:{}".format(rtt_states[i]),
"rtt_sense:{}".format(rtt_senses[i]),
] + common_tags
for rtt in rtt_gauges:
aggregator.assert_metric('snmp.{}'.format(rtt), metric_type=aggregator.GAUGE, tags=tags)

for i in range(len(rtt_indexes)):
tags = [
"rtt_index:{}".format(rtt_indexes[i]),
"rtt_type:{}".format(rtt_types[i]),
"rtt_state:{}".format(rtt_states[i]),
"rtt_timeout:{}".format(rtt_timeouts[i]),
] + common_tags
aggregator.assert_metric('snmp.rttMonCtrlOperTimeoutOccurred', metric_type=aggregator.GAUGE, tags=tags)

aggregator.assert_all_metrics_covered()
aggregator.assert_metrics_using_metadata(get_metadata_metrics(), check_submission_type=True)

Expand Down

0 comments on commit c875ec6

Please sign in to comment.