Skip to content

Commit c02cf1c

Browse files
authored
[snmp] aruba-clearpass: fix metric_type for memory/disk metrics (DataDog#23791)
* [snmp] Mirror backend tag enrichment in e2e tests * [snmp] Fix aruba-clearpass memory disk metric types * [snmp] Test aruba-clearpass capacity metric types * [snmp] Move aruba-clearpass metric type assertion into e2e test
1 parent daa1f93 commit c02cf1c

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

snmp/changelog.d/23791.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Breaking change: Fixed metric type for `snmp.cppmSystemMemoryFree`, `snmp.cppmSystemMemoryTotal`, `snmp.cppmSystemDiskSpaceFree`, and `snmp.cppmSystemDiskSpaceTotal` in the aruba-clearpass profile. These were previously submitted as rates due to their underlying `Counter64` SNMP type, producing incorrect values. They are now submitted as gauges. Customers with existing dashboards or monitors on these metrics will see a discontinuity between historical rate datapoints and new gauge datapoints; please rebuild any affected widgets or monitors.

snmp/datadog_checks/snmp/data/default_profiles/aruba-clearpass.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ metrics:
2323
symbols:
2424
- name: cppmSystemMemoryTotal
2525
OID: 1.3.6.1.4.1.14823.1.6.1.1.1.1.1.12
26+
metric_type: gauge
2627
- name: cppmSystemMemoryFree
2728
OID: 1.3.6.1.4.1.14823.1.6.1.1.1.1.1.13
29+
metric_type: gauge
2830
- name: cppmSystemDiskSpaceTotal
2931
OID: 1.3.6.1.4.1.14823.1.6.1.1.1.1.1.14
32+
metric_type: gauge
3033
- name: cppmSystemDiskSpaceFree
3134
OID: 1.3.6.1.4.1.14823.1.6.1.1.1.1.1.15
35+
metric_type: gauge
3236
metric_tags:
3337
- symbol:
3438
OID: 1.3.6.1.4.1.14823.1.6.1.1.1.1.1.4

snmp/tests/test_e2e_core_profiles/test_profile_aruba_clearpass.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pytest
66

77
from datadog_checks.dev.utils import get_metadata_metrics
8+
from datadog_checks.snmp.utils import get_profile_definition
89

910
from .. import common
1011
from ..test_e2e_core_metadata import assert_device_metadata
@@ -19,9 +20,30 @@
1920

2021
pytestmark = [pytest.mark.e2e, common.py3_plus_only, common.snmp_integration_only]
2122

23+
CPPM_CAPACITY_METRIC_TYPES = {
24+
'cppmSystemMemoryFree': 'gauge',
25+
'cppmSystemMemoryTotal': 'gauge',
26+
'cppmSystemDiskSpaceFree': 'gauge',
27+
'cppmSystemDiskSpaceTotal': 'gauge',
28+
}
29+
30+
31+
def assert_cppm_capacity_metrics_are_forced_to_gauge(profile):
32+
profile_definition = get_profile_definition({'definition_file': '{}.yaml'.format(profile)})
33+
metric_types = {}
34+
for metric in profile_definition['metrics']:
35+
for symbol in metric.get('symbols', []):
36+
name = symbol['name']
37+
if name in CPPM_CAPACITY_METRIC_TYPES:
38+
metric_types[name] = symbol.get('metric_type')
39+
40+
assert metric_types == CPPM_CAPACITY_METRIC_TYPES
41+
2242

2343
def test_e2e_profile_aruba_clearpass(dd_agent_check):
2444
profile = 'aruba-clearpass'
45+
assert_cppm_capacity_metrics_are_forced_to_gauge(profile)
46+
2547
config = create_e2e_core_test_config(profile)
2648
aggregator = common.dd_agent_check_wrapper(dd_agent_check, config, rate=True)
2749

0 commit comments

Comments
 (0)