Skip to content

Commit

Permalink
More specific prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
TCheruy committed Jul 26, 2023
1 parent 5c03e34 commit b62acd9
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 83 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extends:
- _base.yaml
- _generic-host-resources-base.yaml
- _generic-if.yaml
- _generic-ucd.yaml
Expand All @@ -9,7 +8,7 @@ sysobjectid:
metrics:
# - MIB: IMM-MIB
# symbol:
# name: ibm.systemHealthStat
# name: ibm.imm.systemHealthStat
# OID: 1.3.6.1.4.1.2.3.51.3.1.4.1.0
# enum:
# onRecoverable: 0
Expand All @@ -23,134 +22,134 @@ metrics:
name: tempTable
OID: 1.3.6.1.4.1.2.3.51.3.1.1.2
symbols:
- name: ibm.tempReading
- name: ibm.imm.tempReading
OID: 1.3.6.1.4.1.2.3.51.3.1.1.2.1.3
metric_tags:
- column:
name: ibm.tempDescr
name: ibm.imm.tempDescr
OID: 1.3.6.1.4.1.2.3.51.3.1.1.2.1.2
tag: ibm_temp_descr
tag: ibm_imm_temp_descr
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.1.2.1.11
name: ibm.tempHealthStatus
tag: ibm_temp_health_status
name: ibm.imm.tempHealthStatus
tag: ibm_imm_temp_health_status
- MIB: IMM-MIB
table:
name: voltTable
OID: 1.3.6.1.4.1.2.3.51.3.1.2.2
symbols:
- name: ibm.voltReading
- name: ibm.imm.voltReading
OID: 1.3.6.1.4.1.2.3.51.3.1.2.2.1.3
metric_tags:
- column:
name: ibm.voltDescr
name: ibm.imm.voltDescr
OID: 1.3.6.1.4.1.2.3.51.3.1.2.2.1.2
tag: ibm_volt_descr
tag: ibm_imm_volt_descr
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.2.2.1.11
name: ibm.voltHealthStatus
tag: ibm_volt_health_status
name: ibm.imm.voltHealthStatus
tag: ibm_imm_volt_health_status
- MIB: IMM-MIB
table:
name: fanTable
OID: 1.3.6.1.4.1.2.3.51.3.1.3.2
symbols:
- name: ibm.fanSpeed
- name: ibm.imm.fanSpeed
OID: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
extract_value: '(\d+)%' # Example value : '74% of maximum'
metric_tags:
- column:
name: ibm.fanDescr
name: ibm.imm.fanDescr
OID: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
tag: ibm_fan_descr
tag: ibm_imm_fan_descr
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.10
name: ibm.fanHealthStatus
tag: ibm_fan_health_status
name: ibm.imm.fanHealthStatus
tag: ibm_imm_fan_health_status
- MIB: IMM-MIB
table:
name: systemHealthSummaryTable
OID: 1.3.6.1.4.1.2.3.51.3.1.4.2
symbols:
- name: ibm.systemHealthSummary
- name: ibm.imm.systemHealthSummary
constant_value_one: true
metric_tags:
- column:
name: ibm.systemHealthSummaryDescription
name: ibm.imm.systemHealthSummaryDescription
OID: 1.3.6.1.4.1.2.3.51.3.1.4.2.1.3
tag: ibm_system_health_summary_description
tag: ibm_imm_system_health_summary_description
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.4.2.1.2
name: ibm.systemHealthSummarySeverity
tag: ibm_system_health_summary_severity
name: ibm.imm.systemHealthSummarySeverity
tag: ibm_imm_system_health_summary_severity
- MIB: IMM-MIB
table:
name: systemCPUVpdTable
OID: 1.3.6.1.4.1.2.3.51.3.1.5.20
symbols:
- name: ibm.systemCPUVpd
- name: ibm.imm.systemCPUVpd
constant_value_one: true
metric_tags:
- column:
name: ibm.cpuVpdDescription
name: ibm.imm.cpuVpdDescription
OID: 1.3.6.1.4.1.2.3.51.3.1.5.20.1.2
tag: ibm_cpu_vpd_description
tag: ibm_imm_cpu_vpd_description
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.5.20.1.11
name: ibm.cpuVpdHealthStatus
tag: ibm_cpu_vpd_health_status
name: ibm.imm.cpuVpdHealthStatus
tag: ibm_imm_cpu_vpd_health_status
- MIB: IMM-MIB
table:
name: systemMemoryVpdTable
OID: 1.3.6.1.4.1.2.3.51.3.1.5.21
symbols:
- name: ibm.systemMemoryVpd
- name: ibm.imm.systemMemoryVpd
constant_value_one: true
metric_tags:
- column:
name: ibm.memoryVpdDescription
name: ibm.imm.memoryVpdDescription
OID: 1.3.6.1.4.1.2.3.51.3.1.5.21.1.2
tag: ibm_memory_vpd_description
tag: ibm_imm_memory_vpd_description
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.5.21.1.8
name: ibm.memoryHealthStatus
tag: ibm_memory_health_status
name: ibm.imm.memoryHealthStatus
tag: ibm_imm_memory_health_status
- MIB: IMM-MIB
table:
name: powerTable
OID: 1.3.6.1.4.1.2.3.51.3.1.11.2
symbols:
- name: ibm.power
- name: ibm.imm.power
constant_value_one: true
metric_tags:
- column:
name: ibm.powerFruName
name: ibm.imm.powerFruName
OID: 1.3.6.1.4.1.2.3.51.3.1.11.2.1.2
tag: ibm_power_fru_name
tag: ibm_imm_power_fru_name
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.11.2.1.6
name: ibm.powerHealthStatus
tag: ibm_power_health_status
name: ibm.imm.powerHealthStatus
tag: ibm_imm_power_health_status
- MIB: IMM-MIB
table:
name: diskTable
OID: 1.3.6.1.4.1.2.3.51.3.1.12.2
symbols:
- name: ibm.disk
- name: ibm.imm.disk
constant_value_one: true
metric_tags:
- column:
name: ibm.diskFruName
name: ibm.imm.diskFruName
OID: 1.3.6.1.4.1.2.3.51.3.1.12.2.1.2
tag: ibm_disk_fru_name
tag: ibm_imm_disk_fru_name
- column:
OID: 1.3.6.1.4.1.2.3.51.3.1.12.2.1.3
name: ibm.diskHealthStatus
tag: ibm_disk_health_status
name: ibm.imm.diskHealthStatus
tag: ibm_imm_disk_health_status
metric_tags:
- tag: ibm_machine_level_serial_number
- tag: ibm_imm_machine_level_serial_number
OID: 1.3.6.1.4.1.2.3.51.3.1.5.2.1.3.0
symbol: machineLevelSerialNumber
- OID: 1.3.6.1.4.1.2.3.51.3.1.5.2.1.5.0
symbol: machineLevelProductName
tag: ibm_machine_level_product_name
tag: ibm_imm_machine_level_product_name
16 changes: 8 additions & 8 deletions snmp/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,6 @@ snmp.ibDnsQueryRate,gauge,,,,"[IB-DNSONE-MIB] DNS queries per second",0,snmp,,
snmp.ibMemberServiceStatus,gauge,,,,"[IB-PLATFORMONE-MIB] A table of member service status. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibNodeQueueFromMaster,gauge,,,,"[IB-PLATFORMONE-MIB] Sent queue size from master.",0,snmp,,
snmp.ibNodeQueueToMaster,gauge,,,,"[IB-PLATFORMONE-MIB] Receive queue size to master.",0,snmp,,
snmp.ibm.disk,gauge,,,,"[IMM-MIB] This table contains disk inventory information. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.dpStatusConnectionsAcceptedoneDay,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of connections accepted in the previous 24 hours.",0,snmp,,
snmp.ibm.dpStatusConnectionsAcceptedoneHour,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of connections accepted in the previous hour.",0,snmp,,
snmp.ibm.dpStatusConnectionsAcceptedoneMinute,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of connections accepted in the previous minute.",0,snmp,,
Expand Down Expand Up @@ -770,13 +769,14 @@ snmp.ibm.dpStatusTCPSummarylisten,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of
snmp.ibm.dpStatusTCPSummarysynreceived,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of TCP connections in the syn-received state. Connections in this state are waiting for a confirming connection request acknowledgment after both receiving and sending a connection request.",0,snmp,,
snmp.ibm.dpStatusTCPSummarysynsent,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of TCP connections in the syn-sent state. Connections in this state are waiting for a matching connection request after sending a connection request.",0,snmp,,
snmp.ibm.dpStatusTCPSummarytimewait,gauge,,,,"[DATAPOWER-STATUS-MIB] The number of TCP connections in the time-wait state. Connections in this state are waiting for enough time to pass to be sure that the remote TCP received the acknowledgment of its connection termination request.",0,snmp,,
snmp.ibm.fanSpeed,gauge,,,,"[IMM-MIB] Fan speed expressed in percent(%) of maximum RPM. An octet string expressed as 'ddd% of maximum' where: d is a decimal digit or blank space for a leading zero. If the fan is determined not to be running or the fan speed cannot be determined, the string will indicate 'Offline'.",0,snmp,,
snmp.ibm.power,gauge,,,,"[IMM-MIB] This table contains power inventory information. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.systemCPUVpd,gauge,,,,"[IMM-MIB] Table of the system CPU VPD information. View as a table and not as individual entries for consistent results. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.systemHealthSummary,gauge,,,,"[IMM-MIB] Table of System Health summary. Contains more detailed information about the reasons for the overall system health status. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.systemMemoryVpd,gauge,,,,"[IMM-MIB] Table of the system Memory VPD information. View as a table and not as individual entries for consistent results. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.tempReading,gauge,,,,"[IMM-MIB] The measured temperature.",0,snmp,,
snmp.ibm.voltReading,gauge,,,,"[IMM-MIB] The measured voltage.",0,snmp,,
snmp.ibm.imm.disk,gauge,,,,"[IMM-MIB] This table contains disk inventory information. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.imm.fanSpeed,gauge,,,,"[IMM-MIB] Fan speed expressed in percent(%) of maximum RPM. An octet string expressed as 'ddd% of maximum' where: d is a decimal digit or blank space for a leading zero. If the fan is determined not to be running or the fan speed cannot be determined, the string will indicate 'Offline'.",0,snmp,,
snmp.ibm.imm.power,gauge,,,,"[IMM-MIB] This table contains power inventory information. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.imm.systemCPUVpd,gauge,,,,"[IMM-MIB] Table of the system CPU VPD information. View as a table and not as individual entries for consistent results. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.imm.systemHealthSummary,gauge,,,,"[IMM-MIB] Table of System Health summary. Contains more detailed information about the reasons for the overall system health status. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.imm.systemMemoryVpd,gauge,,,,"[IMM-MIB] Table of the system Memory VPD information. View as a table and not as individual entries for consistent results. (Make 'sum by {X}' queries to count elements with the tag X.)",0,snmp,,
snmp.ibm.imm.tempReading,gauge,,,,"[IMM-MIB] The measured temperature.",0,snmp,,
snmp.ibm.imm.voltReading,gauge,,,,"[IMM-MIB] The measured voltage.",0,snmp,,
snmp.ifAdminStatus,gauge,,,,[Generic router] [F5 BIG-IP] [Cisco c3850] [Cisco Nexus] [Cisco ASA 5525] The desired state of the interface.,0,snmp,,
snmp.ifBandwidthInUsage.rate,gauge,,percent,,"[Generic router] The percent rate of used received bandwidth.",0,snmp,,
snmp.ifBandwidthOutUsage.rate,gauge,,percent,,"[Generic router] The percent rate of used sent bandwidth.",0,snmp,,
Expand Down
67 changes: 36 additions & 31 deletions snmp/tests/test_e2e_core_profiles/test_profile_ibm_lenovo_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def test_e2e_profile_ibm_lenovo_server(dd_agent_check):
'device_namespace:default',
'snmp_device:' + ip_address,
] + [
'ibm_machine_level_product_name:Jaded acted their but acted kept driving ' 'Jaded Jaded',
'ibm_machine_level_serial_number:driving quaintly quaintly but driving',
'ibm_imm_machine_level_product_name:Jaded acted their but acted kept driving ' 'Jaded Jaded',
'ibm_imm_machine_level_serial_number:driving quaintly quaintly but driving',
]

# --- TEST EXTENDED METRICS ---
Expand All @@ -44,77 +44,82 @@ def test_e2e_profile_ibm_lenovo_server(dd_agent_check):
assert_common_metrics(aggregator, common_tags)

tag_rows = [
['ibm_temp_descr:acted oxen oxen their but', 'ibm_temp_health_status:but quaintly forward'],
['ibm_temp_descr:quaintly acted kept', 'ibm_temp_health_status:acted quaintly acted zombies'],
['ibm_imm_temp_descr:acted oxen oxen their but', 'ibm_imm_temp_health_status:but quaintly forward'],
['ibm_imm_temp_descr:quaintly acted kept', 'ibm_imm_temp_health_status:acted quaintly acted zombies'],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.tempReading', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric('snmp.ibm.imm.tempReading', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

tag_rows = [
['ibm_volt_descr:kept Jaded quaintly kept their', 'ibm_volt_health_status:quaintly Jaded zombies oxen'],
['ibm_volt_descr:zombies acted their their', 'ibm_volt_health_status:acted forward kept forward'],
['ibm_imm_volt_descr:kept Jaded quaintly kept their', 'ibm_imm_volt_health_status:quaintly Jaded zombies oxen'],
['ibm_imm_volt_descr:zombies acted their their', 'ibm_imm_volt_health_status:acted forward kept forward'],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.voltReading', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric('snmp.ibm.imm.voltReading', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

tag_rows = [
['ibm_fan_descr:kept but quaintly acted Jaded', 'ibm_fan_health_status:acted acted forward acted'],
['ibm_fan_descr:their but quaintly oxen', 'ibm_fan_health_status:kept'],
['ibm_imm_fan_descr:kept but quaintly acted Jaded', 'ibm_imm_fan_health_status:acted acted forward acted'],
['ibm_imm_fan_descr:their but quaintly oxen', 'ibm_imm_fan_health_status:kept'],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.fanSpeed', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric('snmp.ibm.imm.fanSpeed', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

tag_rows = [
[
'ibm_system_health_summary_description:acted Jaded their quaintly zombies but oxen',
'ibm_system_health_summary_severity:Jaded',
'ibm_imm_system_health_summary_description:acted Jaded their quaintly zombies but oxen',
'ibm_imm_system_health_summary_severity:Jaded',
],
[
'ibm_system_health_summary_description:driving driving acted but',
'ibm_system_health_summary_severity:oxen Jaded',
'ibm_imm_system_health_summary_description:driving driving acted but',
'ibm_imm_system_health_summary_severity:oxen Jaded',
],
]
for tag_row in tag_rows:
aggregator.assert_metric(
'snmp.ibm.systemHealthSummary', metric_type=aggregator.GAUGE, tags=common_tags + tag_row
'snmp.ibm.imm.systemHealthSummary', metric_type=aggregator.GAUGE, tags=common_tags + tag_row
)

tag_rows = [
[
'ibm_cpu_vpd_description:Jaded driving',
'ibm_cpu_vpd_health_status:driving driving their kept quaintly driving their but kept',
'ibm_imm_cpu_vpd_description:Jaded driving',
'ibm_imm_cpu_vpd_health_status:driving driving their kept quaintly driving their but kept',
],
[
'ibm_imm_cpu_vpd_description:their quaintly',
'ibm_imm_cpu_vpd_health_status:acted driving kept zombies driving kept',
],
['ibm_cpu_vpd_description:their quaintly', 'ibm_cpu_vpd_health_status:acted driving kept zombies driving kept'],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.systemCPUVpd', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric('snmp.ibm.imm.systemCPUVpd', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

tag_rows = [
[
'ibm_memory_health_status:but acted',
'ibm_memory_vpd_description:quaintly acted forward quaintly their zombies',
'ibm_imm_memory_health_status:but acted',
'ibm_imm_memory_vpd_description:quaintly acted forward quaintly their zombies',
],
[
'ibm_memory_health_status:their kept quaintly Jaded kept',
'ibm_memory_vpd_description:their Jaded acted their their',
'ibm_imm_memory_health_status:their kept quaintly Jaded kept',
'ibm_imm_memory_vpd_description:their Jaded acted their their',
],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.systemMemoryVpd', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric(
'snmp.ibm.imm.systemMemoryVpd', metric_type=aggregator.GAUGE, tags=common_tags + tag_row
)

tag_rows = [
['ibm_power_fru_name:driving driving', 'ibm_power_health_status:but forward but their but'],
['ibm_power_fru_name:forward', 'ibm_power_health_status:Jaded'],
['ibm_imm_power_fru_name:driving driving', 'ibm_imm_power_health_status:but forward but their but'],
['ibm_imm_power_fru_name:forward', 'ibm_imm_power_health_status:Jaded'],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.power', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric('snmp.ibm.imm.power', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

tag_rows = [
['ibm_disk_fru_name:acted Jaded', 'ibm_disk_health_status:driving driving zombies Jaded'],
['ibm_disk_fru_name:oxen', 'ibm_disk_health_status:forward'],
['ibm_imm_disk_fru_name:acted Jaded', 'ibm_imm_disk_health_status:driving driving zombies Jaded'],
['ibm_imm_disk_fru_name:oxen', 'ibm_imm_disk_health_status:forward'],
]
for tag_row in tag_rows:
aggregator.assert_metric('snmp.ibm.disk', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)
aggregator.assert_metric('snmp.ibm.imm.disk', metric_type=aggregator.GAUGE, tags=common_tags + tag_row)

# --- TEST METADATA ---
device = {
Expand Down

0 comments on commit b62acd9

Please sign in to comment.