Skip to content

Commit

Permalink
Test cpu.usage for profile netgear-switch (#15647)
Browse files Browse the repository at this point in the history
* Test cpu.usage for profile netgear-switch

* fix netgear-switch.yaml

* fix

* Add changelog

* no-change

* Add missing mappings

* update

* Revert "update"

This reverts commit 0a268f3.

* Revert "Add missing mappings"

This reverts commit 50e9b58.
  • Loading branch information
AlexandreYang authored and vivek-datadog committed Aug 23, 2023
1 parent f340599 commit 1bdea59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ metrics:
- MIB: NETGEAR-SWITCHING-MIB
symbol:
name: cpu.usage
OID: 1.3.6.1.4.1.4526.10.1.1.4.9.0
extract_value: 60 Secs.*?(\d+)
OID: 1.3.6.1.4.1.4526.10.1.1.4.9.0 # agentSwitchCpuProcessTotalUtilization.0
extract_value: 60 Secs.*?([\d\.]+)
metric_tags:
- OID: 1.3.6.1.4.1.4526.10.1.1.1.3.0
symbol: agentInventoryMachineModel
Expand Down
2 changes: 1 addition & 1 deletion snmp/tests/compose/data/netgear-switch.snmprec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
1.3.6.1.4.1.4526.10.1.1.4.8.1.3.7|4x|6f78656e20717561696e746c79
1.3.6.1.4.1.4526.10.1.1.4.8.1.4.2|4x|62757420746865697220666f727761726420717561696e746c79206f78656e20717561696e746c7920627574206163746564
1.3.6.1.4.1.4526.10.1.1.4.8.1.4.7|4x|6f78656e206163746564
1.3.6.1.4.1.4526.10.1.1.4.9.0|2|1024
1.3.6.1.4.1.4526.10.1.1.4.9.0|4|60 Secs (10.30%).+300 Secs
1.3.6.1.4.1.4526.10.1.1.6.1.1.1.14893|66|14893
1.3.6.1.4.1.4526.10.1.1.6.1.1.1.39755|66|39755
1.3.6.1.4.1.4526.10.1.1.6.1.1.2.14893|65|101084327
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_e2e_profile_netgear_switch(dd_agent_check):
# --- TEST METRICS ---
assert_common_metrics(aggregator, common_tags)

aggregator.assert_metric('snmp.cpu.usage', metric_type=aggregator.GAUGE, tags=common_tags)
aggregator.assert_metric('snmp.cpu.usage', metric_type=aggregator.GAUGE, tags=common_tags, value=10.3)
aggregator.assert_metric('snmp.memory.free', metric_type=aggregator.GAUGE, tags=common_tags)
aggregator.assert_metric('snmp.memory.total', metric_type=aggregator.GAUGE, tags=common_tags)

Expand Down

0 comments on commit 1bdea59

Please sign in to comment.