Skip to content

Commit

Permalink
Fixes for SNMP Profiles introduced in 7.48 (#15800)
Browse files Browse the repository at this point in the history
Co-authored-by: Thibaud Cheruy <[email protected]>
  • Loading branch information
AlexandreYang and TCheruy authored Sep 12, 2023
1 parent 8749d34 commit d24c2fc
Show file tree
Hide file tree
Showing 19 changed files with 153 additions and 46 deletions.
1 change: 1 addition & 0 deletions snmp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
65 changes: 65 additions & 0 deletions snmp/datadog_checks/snmp/data/default_profiles/_dell-rac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -231,5 +231,5 @@ metrics:
name: ospfVirtIfState
mapping:
1: down
4: pointToPoint
4: point_to_point
tag: if_state
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions snmp/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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,,
Expand All @@ -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,,
Expand Down Expand Up @@ -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,,
Expand All @@ -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,,
Expand Down
2 changes: 1 addition & 1 deletion snmp/tests/test_e2e_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
32 changes: 26 additions & 6 deletions snmp/tests/test_e2e_core_profiles/test_profile__dell_rac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit d24c2fc

Please sign in to comment.