From d24c2fcccab1fb75f525b99bc622c10008889703 Mon Sep 17 00:00:00 2001 From: Alexandre Yang Date: Tue, 12 Sep 2023 13:24:16 +0200 Subject: [PATCH] Fixes for SNMP Profiles introduced in 7.48 (#15800) Co-authored-by: Thibaud Cheruy --- snmp/CHANGELOG.md | 1 + .../data/default_profiles/_cisco-generic.yaml | 6 ++ .../snmp/data/default_profiles/_dell-rac.yaml | 65 +++++++++++++++++++ .../data/default_profiles/_generic-ospf.yaml | 18 ++--- .../aruba-wireless-controller.yaml | 12 ++-- .../data/default_profiles/chatsworth_pdu.yaml | 7 +- .../dell-emc-data-domain.yaml | 4 +- .../default_profiles/servertech-pdu4.yaml | 4 +- .../default_profiles/vertiv-watchdog.yaml | 4 +- snmp/metadata.csv | 6 +- snmp/tests/test_e2e_core.py | 2 +- .../test_profile__cisco_generic.py | 4 +- .../test_profile__dell_rac.py | 32 +++++++-- .../test_profile_chatsworth_pdu.py | 6 +- .../test_profile_dell_emc_data_domain.py | 4 +- .../test_profile_generic_ospf.py | 16 ++++- .../test_profile_servertech_pdu4.py | 4 +- .../test_profile_vertiv_watchdog.py | 2 +- snmp/tests/test_e2e_core_vs_python.py | 2 +- 19 files changed, 153 insertions(+), 46 deletions(-) diff --git a/snmp/CHANGELOG.md b/snmp/CHANGELOG.md index 21d1db1e074d0..147ac645d5b15 100644 --- a/snmp/CHANGELOG.md +++ b/snmp/CHANGELOG.md @@ -10,6 +10,7 @@ * Remove unsupported metric in riverbed-interceptor.yaml ([#15678](https://github.com/DataDog/integrations-core/pull/15678)) * [SNMP] Fix mapping for apc-pdu ([#15765](https://github.com/DataDog/integrations-core/pull/15765)) +* Fixes for SNMP Profiles introduced in 7.48 ([#15800](https://github.com/DataDog/integrations-core/pull/15800)) ## 6.2.1 / 2023-09-05 diff --git a/snmp/datadog_checks/snmp/data/default_profiles/_cisco-generic.yaml b/snmp/datadog_checks/snmp/data/default_profiles/_cisco-generic.yaml index 18e0f1e5d8105..f213f178459da 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/_cisco-generic.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/_cisco-generic.yaml @@ -147,6 +147,12 @@ metrics: OID: 1.3.6.1.4.1.9.9.13.1.5.1.4 name: ciscoEnvMonSupplySource tag: power_source + mapping: + 1: unknown + 2: ac + 3: dc + 4: external_power_supply + 5: internal_redundant - column: OID: 1.3.6.1.4.1.9.9.13.1.5.1.2 name: ciscoEnvMonSupplyStatusDescr diff --git a/snmp/datadog_checks/snmp/data/default_profiles/_dell-rac.yaml b/snmp/datadog_checks/snmp/data/default_profiles/_dell-rac.yaml index 469d2e9ed34fb..dcdbb0ae72997 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/_dell-rac.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/_dell-rac.yaml @@ -660,6 +660,27 @@ metrics: OID: 1.3.6.1.4.1.674.10892.5.4.600.30.1.7 name: amperageProbeType tag: probe_type + mapping: + 1: amperage_probe_type_is_other + 2: amperage_probe_type_is_unknown + 3: amperage_probe_type_is1_point5_volt + 4: amperage_probe_type_is3_point3volt + 5: amperage_probe_type_is5_volt + 6: amperage_probe_type_is_minus5_volt + 7: amperage_probe_type_is12_volt + 8: amperage_probe_type_is_minus12_volt + 9: amperage_probe_type_is_io + 10: amperage_probe_type_is_core + 11: amperage_probe_type_is_flea + 12: amperage_probe_type_is_battery + 13: amperage_probe_type_is_terminator + 14: amperage_probe_type_is2_point5_volt + 15: amperage_probe_type_is_gtl + 16: amperage_probe_type_is_discrete + 23: amperage_probe_type_is_power_supply_amps + 24: amperage_probe_type_is_power_supply_watts + 25: amperage_probe_type_is_system_amps + 26: amperage_probe_type_is_system_watts - column: OID: 1.3.6.1.4.1.674.10892.5.4.600.30.1.1 name: amperageProbechassisIndex @@ -745,6 +766,26 @@ metrics: OID: 1.3.6.1.4.1.674.10892.5.4.600.20.1.7 name: voltageProbeType tag: probe_type + mapping: + 1: voltage_probe_type_is_other + 2: voltage_probe_type_is_unknown + 3: voltage_probe_type_is1_point5_volt + 4: voltage_probe_type_is3_point3_volt + 5: voltage_probe_type_is5_volt + 6: voltage_probe_type_is_minus5_volt + 7: voltage_probe_type_is12_volt + 8: voltage_probe_type_is_minus12_volt + 9: voltage_probe_type_is_io + 10: voltage_probe_type_is_core + 11: voltage_probe_type_is_flea + 12: voltage_probe_type_is_battery + 13: voltage_probe_type_is_terminator + 14: voltage_probe_type_is2_point5_volt + 15: voltage_probe_type_is_gtl + 16: voltage_probe_type_is_discrete + 17: voltage_probe_type_is_generic_discrete + 18: voltage_probe_type_is_ps_voltage + 19: voltage_probe_type_is_memory_status - column: OID: 1.3.6.1.4.1.674.10892.5.4.600.20.1.5 name: voltageProbeStatus @@ -948,6 +989,30 @@ metrics: OID: 1.3.6.1.4.1.674.10892.5.4.1100.50.1.7 name: memoryDeviceType tag: device_type + mapping: + 1: device_type_is_other + 2: device_type_is_unknown + 3: device_type_is_dram + 4: device_type_is_edram + 5: device_type_is_vram + 6: device_type_is_sram + 7: device_type_is_ram + 8: device_type_is_rom + 9: device_type_is_flash + 10: device_type_is_eeprom + 11: device_type_is_feprom + 12: device_type_is_eprom + 13: device_type_is_cdram + 14: device_type_is3_dram + 15: device_type_is_sdram + 16: device_type_is_sgram + 17: device_type_is_rdram + 18: device_type_is_ddr + 19: device_type_is_ddr2 + 20: device_type_is_ddr2_fbdimm + 24: device_type_is_ddr3 + 25: device_type_is_fbd2 + 26: device_type_is_ddr4 - column: OID: 1.3.6.1.4.1.674.10892.5.4.1100.50.1.2 name: memoryDeviceIndex diff --git a/snmp/datadog_checks/snmp/data/default_profiles/_generic-ospf.yaml b/snmp/datadog_checks/snmp/data/default_profiles/_generic-ospf.yaml index 6bd6d6513ef01..cdd59f5eccdba 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/_generic-ospf.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/_generic-ospf.yaml @@ -55,8 +55,8 @@ metrics: 1: down 2: attempt 3: init - 4: twoWay - 5: exchangeStart + 4: two_way + 5: exchange_start 6: exchange 7: loading 8: full @@ -117,8 +117,8 @@ metrics: 1: down 2: attempt 3: init - 4: twoWay - 5: exchangeStart + 4: two_way + 5: exchange_start 6: exchange 7: loading 8: full @@ -182,10 +182,10 @@ metrics: 1: down 2: loopback 3: waiting - 4: pointToPoint - 5: designatedRouter - 6: backupDesignatedRouter - 7: otherDesignatedRouter + 4: point_to_point + 5: designated_router + 6: backup_designated_router + 7: other_designated_router tag: if_state - MIB: OSPF-MIB table: @@ -231,5 +231,5 @@ metrics: name: ospfVirtIfState mapping: 1: down - 4: pointToPoint + 4: point_to_point tag: if_state diff --git a/snmp/datadog_checks/snmp/data/default_profiles/aruba-wireless-controller.yaml b/snmp/datadog_checks/snmp/data/default_profiles/aruba-wireless-controller.yaml index 067b28206190c..27bd79760ffb1 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/aruba-wireless-controller.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/aruba-wireless-controller.yaml @@ -115,8 +115,8 @@ metrics: OID: 1.3.6.1.4.1.14823.2.2.1.1.3.3.1.12 tag: ap_load_balancing mapping: - 1: true - 2: false + 1: 'true' + 2: 'false' - MIB: WLSX-SWITCH-MIB table: name: wlsxSwitchAccessPointStatsTable @@ -257,15 +257,15 @@ metrics: OID: 1.3.6.1.4.1.14823.2.2.1.5.2.2.1.1.4 tag: wlan_sta_is_authenticated mapping: - 1: true - 2: false + 1: 'true' + 2: 'false' - column: name: wlanStaIsAssociated OID: 1.3.6.1.4.1.14823.2.2.1.5.2.2.1.1.5 tag: wlan_sta_is_associated mapping: - 1: true - 2: false + 1: 'true' + 2: 'false' - column: name: wlanStaHTMode OID: 1.3.6.1.4.1.14823.2.2.1.5.2.2.1.1.16 diff --git a/snmp/datadog_checks/snmp/data/default_profiles/chatsworth_pdu.yaml b/snmp/datadog_checks/snmp/data/default_profiles/chatsworth_pdu.yaml index 2cd015bd46f63..e157963d71bc7 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/chatsworth_pdu.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/chatsworth_pdu.yaml @@ -506,15 +506,18 @@ metrics: - MIB: CPI-UNITY-MIB table: OID: 1.3.6.1.4.1.30932.1.10.1.7.100 - name: cpiPduOutletTable + name: cpiEasTable symbols: - - name: cpiPduEas + - name: cpiEas constant_value_one: true metric_tags: - tag: lock_id column: OID: 1.3.6.1.4.1.30932.1.10.1.7.100.1.2 name: cpiPduLockId + mapping: + 1: front + 2: rear - tag: eas_status column: OID: 1.3.6.1.4.1.30932.1.10.1.7.100.1.3 diff --git a/snmp/datadog_checks/snmp/data/default_profiles/dell-emc-data-domain.yaml b/snmp/datadog_checks/snmp/data/default_profiles/dell-emc-data-domain.yaml index a9599c6f600ec..570e40e8258ed 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/dell-emc-data-domain.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/dell-emc-data-domain.yaml @@ -203,7 +203,7 @@ metrics: OID: 1.3.6.1.4.1.19746.1.3.3.1.1.8 - name: datadomain.fileSystemTotalCompressionFactor OID: 1.3.6.1.4.1.19746.1.3.3.1.1.9 - - name: datadomain.fileSystemReductionPercent + - name: datadomain.fileSystemReductionPercent1 OID: 1.3.6.1.4.1.19746.1.3.3.1.1.11 metric_tags: - column: @@ -243,7 +243,7 @@ metrics: OID: 1.3.6.1.4.1.19746.1.5.1.1.1.14 - name: datadomain.replInKBytesPerSecond OID: 1.3.6.1.4.1.19746.1.5.1.1.1.15 - - name: datadomain.relOutKBytesPerSecond + - name: datadomain.replOutKBytesPerSecond OID: 1.3.6.1.4.1.19746.1.5.1.1.1.16 metric_tags: - column: diff --git a/snmp/datadog_checks/snmp/data/default_profiles/servertech-pdu4.yaml b/snmp/datadog_checks/snmp/data/default_profiles/servertech-pdu4.yaml index 233a0fdfc7857..d5cf05eef6301 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/servertech-pdu4.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/servertech-pdu4.yaml @@ -37,8 +37,8 @@ metrics: OID: 1.3.6.1.4.1.1718.4.1.2.2.1.7 tag: servertech_sentry4_st4_unit_type mapping: - 0: primary - 1: link + 0: master_pdu + 1: link_pdu 2: controller 3: emcu - column: diff --git a/snmp/datadog_checks/snmp/data/default_profiles/vertiv-watchdog.yaml b/snmp/datadog_checks/snmp/data/default_profiles/vertiv-watchdog.yaml index 084578a3eca03..a1d40f27d8ce9 100644 --- a/snmp/datadog_checks/snmp/data/default_profiles/vertiv-watchdog.yaml +++ b/snmp/datadog_checks/snmp/data/default_profiles/vertiv-watchdog.yaml @@ -50,8 +50,8 @@ metrics: tag: vertiv_temp_sensor_serial - column: OID: 1.3.6.1.4.1.21239.5.1.4.1.3 - name: vertiv.tempSensorName - tag: vertiv_temp_sensor_name + name: vertiv.tempSensorLabel + tag: vertiv_temp_sensor_label - column: OID: 1.3.6.1.4.1.21239.5.1.4.1.4 name: vertiv.tempSensorAvail diff --git a/snmp/metadata.csv b/snmp/metadata.csv index 7f6b6ed8fa009..a55facb107b62 100644 --- a/snmp/metadata.csv +++ b/snmp/metadata.csv @@ -244,6 +244,7 @@ snmp.coriant.groove.portRxOpticalPower,gauge,,,,"[CORIANT-GROOVE-MIB] Received o snmp.coriant.groove.portTxOpticalPower,gauge,,,,"[CORIANT-GROOVE-MIB] Transmitted optical power",0,snmp,, snmp.coriant.groove.shelfInletTemperature,gauge,,,,"[CORIANT-GROOVE-MIB] shelf inlet temperature",0,snmp,, snmp.coriant.groove.shelfOutletTemperature,gauge,,,,"[CORIANT-GROOVE-MIB] shelf outlet temperature",0,snmp,, +snmp.cpiEas,gauge,,,,"[Chatsworth] Constant metric equal to 1.",0,snmp,, snmp.cpiPduBranchCurrent,gauge,,,,[Chatsworth] The current draw in 1/100 amp of the branch on the PDU.,0,snmp,, snmp.cpiPduBranchEnergy,count,,,,[Chatsworth] Get the branch energy accumulated in decaVA-secs.,0,snmp,, snmp.cpiPduBranchMaxCurrent,gauge,,,,[Chatsworth] The maximum current draw in 1/100 amp of the branch on the PDU.,0,snmp,, @@ -253,7 +254,6 @@ snmp.cpiPduBranchStatus,gauge,,,,[Chatsworth] Get the alarm status of the branch snmp.cpiPduBranchVoltage,gauge,,,,[Chatsworth] The voltage in 1/10 volts of the branch on the PDU.,0,snmp,, snmp.cpiPduChainRole,gauge,,,,[Chatsworth] Get the role of the PDU in a daisy chain.,0,snmp,, snmp.cpiPduDoorStatus,gauge,,,,[Chatsworth] Indicates if the door sensor is closed or open.,0,snmp,, -snmp.cpiPduEas,gauge,,,,"[Chatsworth] Constant metric equal to 1.",0,snmp,, snmp.cpiPduEasStatus,gauge,,,,"[Chatsworth] Indicates if the Electronic Access Control system is ready, inactive, or error state.",0,snmp,, snmp.cpiPduLineCurrent,gauge,,,,[Chatsworth] The current draw in 1/100 amp of the line on the PDU.,0,snmp,, snmp.cpiPduLockStatus,gauge,,,,[Chatsworth] Indicates if the lock is closed or open.,0,snmp,, @@ -582,7 +582,7 @@ snmp.datadomain.fileSystemLocalCompressionFactor,gauge,,,,"[DATA-DOMAIN-MIB] Fil snmp.datadomain.fileSystemPercentUsed,gauge,,,,"[DATA-DOMAIN-MIB] Percentage of used space within the file system resource",0,snmp,, snmp.datadomain.fileSystemPostCompressionSize,gauge,,,,"[DATA-DOMAIN-MIB] Size of the file system post compression in gigabytes",0,snmp,, snmp.datadomain.fileSystemPreCompressionSize,gauge,,,,"[DATA-DOMAIN-MIB] Size of the file system pre compression in gigabytes",0,snmp,, -snmp.datadomain.fileSystemReductionPercent,gauge,,,,"[DATA-DOMAIN-MIB] File system Reduction Percent",0,snmp,, +snmp.datadomain.fileSystemReductionPercent1,gauge,,,,"[DATA-DOMAIN-MIB] File system Reduction Percent",0,snmp,, snmp.datadomain.fileSystemSpaceAvail,gauge,,,,"[DATA-DOMAIN-MIB] Amount of available space within the file system resource in gigabytes",0,snmp,, snmp.datadomain.fileSystemSpaceCleanable,gauge,,,,"[DATA-DOMAIN-MIB] Amount of cleanable space within the file system resource",0,snmp,, snmp.datadomain.fileSystemSpaceSize,gauge,,,,"[DATA-DOMAIN-MIB] Size of the file system resource in gigabytes",0,snmp,, @@ -596,7 +596,7 @@ snmp.datadomain.nfsSendPercentage,gauge,,,,"[DATA-DOMAIN-MIB] Percentage of time snmp.datadomain.nvramReadKBytesPerSecond,gauge,,,,"[DATA-DOMAIN-MIB] Number of KBytes read per second from NVRAM",0,snmp,, snmp.datadomain.nvramWriteKBytesPerSecond,gauge,,,,"[DATA-DOMAIN-MIB] Number of KBytes written per second on NVRAM",0,snmp,, snmp.datadomain.powerModule,gauge,,,,"[DATA-DOMAIN-MIB] A table containing entries of PowerModuleEntry. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,, -snmp.datadomain.relOutKBytesPerSecond,gauge,,,,"",0,snmp,, +snmp.datadomain.replOutKBytesPerSecond,gauge,,,,"",0,snmp,, snmp.datadomain.replInKBytesPerSecond,gauge,,,,"[DATA-DOMAIN-MIB] Number of KBytes per second received for Replication",0,snmp,, snmp.datadomain.tempSensorCurrentValue,gauge,,,,"[DATA-DOMAIN-MIB] Current Temperature Value of the sensor",0,snmp,, snmp.dell.amperageProbe,gauge,,,,"[IDRAC-MIB-SMIv2] 0600.0030 This object defines the Amperage Probe Table. Constant metric equal to 1.",0,snmp,, diff --git a/snmp/tests/test_e2e_core.py b/snmp/tests/test_e2e_core.py index bb4ec6580c97b..c5d5ec9c60b2f 100644 --- a/snmp/tests/test_e2e_core.py +++ b/snmp/tests/test_e2e_core.py @@ -645,7 +645,7 @@ def test_e2e_cisco_nexus(dd_agent_check): power_supply_tags = [ 'cisco_env_mon_supply_state:normal', - 'power_source:1', + 'power_source:unknown', 'power_status_descr:Jaded driving their their their', ] + common_tags aggregator.assert_metric('snmp.ciscoEnvMonSupplyStatus', metric_type=aggregator.GAUGE, tags=power_supply_tags) diff --git a/snmp/tests/test_e2e_core_profiles/test_profile__cisco_generic.py b/snmp/tests/test_e2e_core_profiles/test_profile__cisco_generic.py index 4214439bbc979..e7e583c809a44 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile__cisco_generic.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile__cisco_generic.py @@ -119,8 +119,8 @@ def test_e2e_profile__cisco_generic(dd_agent_check): ) tag_rows = [ - ['cisco_env_mon_supply_state:critical', 'power_source:5', 'power_status_descr:their'], - ['cisco_env_mon_supply_state:shutdown', 'power_source:2', 'power_status_descr:kept Jaded oxen Jaded their'], + ['cisco_env_mon_supply_state:critical', 'power_source:internal_redundant', 'power_status_descr:their'], + ['cisco_env_mon_supply_state:shutdown', 'power_source:ac', 'power_status_descr:kept Jaded oxen Jaded their'], ] for tag_row in tag_rows: aggregator.assert_metric( diff --git a/snmp/tests/test_e2e_core_profiles/test_profile__dell_rac.py b/snmp/tests/test_e2e_core_profiles/test_profile__dell_rac.py index 52ea31bc476dc..aa7e97dee4742 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile__dell_rac.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile__dell_rac.py @@ -344,8 +344,18 @@ def test_e2e_profile__dell_rac(dd_agent_check): aggregator.assert_metric('snmp.amperageProbeStatus', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) tag_rows = [ - ['amperage_probe_index:12', 'chassis_index:13', 'probe_type:8', 'amperage_probe_status:other'], - ['amperage_probe_index:16', 'chassis_index:3', 'probe_type:3', 'amperage_probe_status:critical_lower'], + [ + 'amperage_probe_index:12', + 'chassis_index:13', + 'probe_type:amperage_probe_type_is_minus12_volt', + 'amperage_probe_status:other', + ], + [ + 'amperage_probe_index:16', + 'chassis_index:3', + 'probe_type:amperage_probe_type_is1_point5_volt', + 'amperage_probe_status:critical_lower', + ], ] for tag_row in tag_rows: aggregator.assert_metric('snmp.dell.amperageProbe', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) @@ -366,8 +376,18 @@ def test_e2e_profile__dell_rac(dd_agent_check): aggregator.assert_metric('snmp.voltageProbeStatus', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) tag_rows = [ - ['chassis_index:14', 'probe_type:19', 'voltage_probe_index:21', 'voltage_probe_status:failed'], - ['chassis_index:29', 'probe_type:3', 'voltage_probe_index:25', 'voltage_probe_status:critical_lower'], + [ + 'chassis_index:14', + 'probe_type:voltage_probe_type_is_memory_status', + 'voltage_probe_index:21', + 'voltage_probe_status:failed', + ], + [ + 'chassis_index:29', + 'probe_type:voltage_probe_type_is1_point5_volt', + 'voltage_probe_index:25', + 'voltage_probe_status:critical_lower', + ], ] for tag_row in tag_rows: aggregator.assert_metric('snmp.dell.voltageProbe', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) @@ -488,8 +508,8 @@ def test_e2e_profile__dell_rac(dd_agent_check): aggregator.assert_metric('snmp.memoryDeviceStatus', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) tag_rows = [ - ['chassis_index:15', 'device_index:23', 'device_type:11', 'memory_device_status:unknown'], - ['chassis_index:22', 'device_index:23', 'device_type:24', 'memory_device_status:other'], + ['chassis_index:15', 'device_index:23', 'device_type:device_type_is_feprom', 'memory_device_status:unknown'], + ['chassis_index:22', 'device_index:23', 'device_type:device_type_is_ddr3', 'memory_device_status:other'], ] for tag_row in tag_rows: aggregator.assert_metric('snmp.dell.memoryDevice', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) diff --git a/snmp/tests/test_e2e_core_profiles/test_profile_chatsworth_pdu.py b/snmp/tests/test_e2e_core_profiles/test_profile_chatsworth_pdu.py index 7a082d0b939fc..92db0330746a4 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile_chatsworth_pdu.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile_chatsworth_pdu.py @@ -155,11 +155,11 @@ def test_e2e_profile_chatsworth_pdu(dd_agent_check): aggregator.assert_metric('snmp.cpiPduLockStatus', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) tag_rows = [ - ['eas_status:inactive', 'lock_id:1', 'lock_status:closed', 'door_status:open'], - ['eas_status:ready', 'lock_id:2', 'lock_status:closed', 'door_status:closed'], + ['eas_status:inactive', 'lock_id:front', 'lock_status:closed', 'door_status:open'], + ['eas_status:ready', 'lock_id:rear', 'lock_status:closed', 'door_status:closed'], ] for tag_row in tag_rows: - aggregator.assert_metric('snmp.cpiPduEas', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) + aggregator.assert_metric('snmp.cpiEas', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) tag_rows = [ ['sensor_index:20', 'sensor_name:sensor2', 'sensor_type:1'], diff --git a/snmp/tests/test_e2e_core_profiles/test_profile_dell_emc_data_domain.py b/snmp/tests/test_e2e_core_profiles/test_profile_dell_emc_data_domain.py index 9c1f507a99b59..716eaa2418f38 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile_dell_emc_data_domain.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile_dell_emc_data_domain.py @@ -159,7 +159,7 @@ def test_e2e_profile_dell_emc_data_domain(dd_agent_check): 'snmp.datadomain.fileSystemPreCompressionSize', metric_type=aggregator.GAUGE, tags=common_tags + tag_row ) aggregator.assert_metric( - 'snmp.datadomain.fileSystemReductionPercent', metric_type=aggregator.GAUGE, tags=common_tags + tag_row + 'snmp.datadomain.fileSystemReductionPercent1', metric_type=aggregator.GAUGE, tags=common_tags + tag_row ) aggregator.assert_metric( 'snmp.datadomain.fileSystemTotalCompressionFactor', metric_type=aggregator.GAUGE, tags=common_tags + tag_row @@ -209,7 +209,7 @@ def test_e2e_profile_dell_emc_data_domain(dd_agent_check): 'snmp.datadomain.nvramWriteKBytesPerSecond', metric_type=aggregator.GAUGE, tags=common_tags + tag_row ) aggregator.assert_metric( - 'snmp.datadomain.relOutKBytesPerSecond', metric_type=aggregator.GAUGE, tags=common_tags + tag_row + 'snmp.datadomain.replOutKBytesPerSecond', metric_type=aggregator.GAUGE, tags=common_tags + tag_row ) aggregator.assert_metric( 'snmp.datadomain.replInKBytesPerSecond', metric_type=aggregator.GAUGE, tags=common_tags + tag_row diff --git a/snmp/tests/test_e2e_core_profiles/test_profile_generic_ospf.py b/snmp/tests/test_e2e_core_profiles/test_profile_generic_ospf.py index 3bb282df4f54d..c16ede3d54beb 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile_generic_ospf.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile_generic_ospf.py @@ -59,23 +59,35 @@ def test_e2e_profile_generic_ospf(dd_agent_check): ['if_state:pointToPoint', 'neighbor_id:133.138.249.246', 'ospf_ip_addr:185.206.44.173'], ] for tag_row in tag_rows: - aggregator.assert_metric('snmp.ospfIf', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) aggregator.assert_metric('snmp.ospfIfLsaCount', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) aggregator.assert_metric('snmp.ospfIfRetransInterval', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) aggregator.assert_metric('snmp.ospfIfState', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) + tag_rows = [ + ['if_state:backup_designated_router', 'neighbor_id:197.51.68.111', 'ospf_ip_addr:153.137.11.77'], + ['if_state:point_to_point', 'neighbor_id:133.138.249.246', 'ospf_ip_addr:185.206.44.173'], + ] + for tag_row in tag_rows: + aggregator.assert_metric('snmp.ospfIf', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) + tag_rows = [ ['if_state:pointToPoint', 'neighbor_id:178.106.85.220'], ['if_state:pointToPoint', 'neighbor_id:32.2.154.12'], ] for tag_row in tag_rows: - aggregator.assert_metric('snmp.ospfVirtIf', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) aggregator.assert_metric('snmp.ospfVirtIfLsaCount', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) aggregator.assert_metric( 'snmp.ospfVirtIfRetransInterval', metric_type=aggregator.GAUGE, tags=common_tags + tag_row ) aggregator.assert_metric('snmp.ospfVirtIfState', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) + tag_rows = [ + ['if_state:point_to_point', 'neighbor_id:178.106.85.220'], + ['if_state:point_to_point', 'neighbor_id:32.2.154.12'], + ] + for tag_row in tag_rows: + aggregator.assert_metric('snmp.ospfVirtIf', metric_type=aggregator.GAUGE, tags=common_tags + tag_row) + # --- TEST METADATA --- device = { 'description': '_generic-ospf Device Description', diff --git a/snmp/tests/test_e2e_core_profiles/test_profile_servertech_pdu4.py b/snmp/tests/test_e2e_core_profiles/test_profile_servertech_pdu4.py index 22a46d030a0ec..a7a0e2b126252 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile_servertech_pdu4.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile_servertech_pdu4.py @@ -43,7 +43,7 @@ def test_e2e_profile_servertech_pdu4(dd_agent_check): 'servertech_sentry4_st4_unit_product_mfr_date:driving', 'servertech_sentry4_st4_unit_product_sn:zombies oxen their', 'servertech_sentry4_st4_unit_status:low_warning', - 'servertech_sentry4_st4_unit_type:link', + 'servertech_sentry4_st4_unit_type:link_pdu', ], [ 'servertech_sentry4_st4_unit_asset_tag:quaintly', @@ -52,7 +52,7 @@ def test_e2e_profile_servertech_pdu4(dd_agent_check): 'servertech_sentry4_st4_unit_name:zombies quaintly kept forward', 'servertech_sentry4_st4_unit_product_mfr_date:Jaded', 'servertech_sentry4_st4_unit_product_sn:their', - 'servertech_sentry4_st4_unit_type:primary', + 'servertech_sentry4_st4_unit_type:master_pdu', ], ] for tag_row in tag_rows: diff --git a/snmp/tests/test_e2e_core_profiles/test_profile_vertiv_watchdog.py b/snmp/tests/test_e2e_core_profiles/test_profile_vertiv_watchdog.py index 63494e0325092..2b08b44f95a7b 100644 --- a/snmp/tests/test_e2e_core_profiles/test_profile_vertiv_watchdog.py +++ b/snmp/tests/test_e2e_core_profiles/test_profile_vertiv_watchdog.py @@ -61,7 +61,7 @@ def test_e2e_profile_vertiv_watchdog(dd_agent_check): tag_rows = [ [ 'vertiv_temp_sensor_avail:available', - 'vertiv_temp_sensor_name:but', + 'vertiv_temp_sensor_label:but', 'vertiv_temp_sensor_serial:kept quaintly kept oxen quaintly but', ], ] diff --git a/snmp/tests/test_e2e_core_vs_python.py b/snmp/tests/test_e2e_core_vs_python.py index 77e9844ebcb6d..71a09cdd76b49 100644 --- a/snmp/tests/test_e2e_core_vs_python.py +++ b/snmp/tests/test_e2e_core_vs_python.py @@ -46,7 +46,7 @@ 'snmp.ospfVirtIf', 'snmp.wlsxSysExtFan', # Aruba constant metric 'snmp.upsOutletGroupStatus', # APC UPS constant metric - 'snmp.cpiPduEas', # Chatsworth constant metric + 'snmp.cpiEas', # Chatsworth constant metric 'snmp.ciscoEnvMonSupplyStatus', # Cisco constant metric 'snmp.ciscoEnvMonFanStatus', # Cisco constant metric 'snmp.cefcFanTrayStatus', # Cisco constant metric