Prefer device path based names over exported names (#334)

* Prefer device path based names over exported names

For some sensors (like coretemp) it is possible that multiple
instances exist, thus base the name on the device path and not on
the exported name.

* Update end-to-end test for dual socket machines

Explicitly have 2 coretemp instances with a symlink for the device
such that the hwmon collector must pick that name (or fail)
This commit is contained in:
Rene Treffer 2016-10-28 21:25:44 +02:00 committed by Brian Brazil
parent 2ff8e5f0e4
commit abe8e297a6
81 changed files with 159 additions and 111 deletions

View file

@ -383,90 +383,90 @@ node_entropy_available_bits 1337
node_exporter_build_info{branch="",goversion="go1.6.2",revision="",version=""} 1
# HELP node_exporter_scrape_duration_seconds node_exporter: Duration of a scrape job.
# TYPE node_exporter_scrape_duration_seconds summary
node_exporter_scrape_duration_seconds{collector="bonding",result="success",quantile="0.5"} 0.00019123300000000002
node_exporter_scrape_duration_seconds{collector="bonding",result="success",quantile="0.9"} 0.00019123300000000002
node_exporter_scrape_duration_seconds{collector="bonding",result="success",quantile="0.99"} 0.00019123300000000002
node_exporter_scrape_duration_seconds_sum{collector="bonding",result="success"} 0.00019123300000000002
node_exporter_scrape_duration_seconds{collector="bonding",result="success",quantile="0.5"} 0.00016681900000000002
node_exporter_scrape_duration_seconds{collector="bonding",result="success",quantile="0.9"} 0.00016681900000000002
node_exporter_scrape_duration_seconds{collector="bonding",result="success",quantile="0.99"} 0.00016681900000000002
node_exporter_scrape_duration_seconds_sum{collector="bonding",result="success"} 0.00016681900000000002
node_exporter_scrape_duration_seconds_count{collector="bonding",result="success"} 1
node_exporter_scrape_duration_seconds{collector="conntrack",result="success",quantile="0.5"} 3.1222e-05
node_exporter_scrape_duration_seconds{collector="conntrack",result="success",quantile="0.9"} 3.1222e-05
node_exporter_scrape_duration_seconds{collector="conntrack",result="success",quantile="0.99"} 3.1222e-05
node_exporter_scrape_duration_seconds_sum{collector="conntrack",result="success"} 3.1222e-05
node_exporter_scrape_duration_seconds{collector="conntrack",result="success",quantile="0.5"} 7.791e-05
node_exporter_scrape_duration_seconds{collector="conntrack",result="success",quantile="0.9"} 7.791e-05
node_exporter_scrape_duration_seconds{collector="conntrack",result="success",quantile="0.99"} 7.791e-05
node_exporter_scrape_duration_seconds_sum{collector="conntrack",result="success"} 7.791e-05
node_exporter_scrape_duration_seconds_count{collector="conntrack",result="success"} 1
node_exporter_scrape_duration_seconds{collector="diskstats",result="success",quantile="0.5"} 0.001207839
node_exporter_scrape_duration_seconds{collector="diskstats",result="success",quantile="0.9"} 0.001207839
node_exporter_scrape_duration_seconds{collector="diskstats",result="success",quantile="0.99"} 0.001207839
node_exporter_scrape_duration_seconds_sum{collector="diskstats",result="success"} 0.001207839
node_exporter_scrape_duration_seconds{collector="diskstats",result="success",quantile="0.5"} 0.005133268000000001
node_exporter_scrape_duration_seconds{collector="diskstats",result="success",quantile="0.9"} 0.005133268000000001
node_exporter_scrape_duration_seconds{collector="diskstats",result="success",quantile="0.99"} 0.005133268000000001
node_exporter_scrape_duration_seconds_sum{collector="diskstats",result="success"} 0.005133268000000001
node_exporter_scrape_duration_seconds_count{collector="diskstats",result="success"} 1
node_exporter_scrape_duration_seconds{collector="entropy",result="success",quantile="0.5"} 2.1329000000000002e-05
node_exporter_scrape_duration_seconds{collector="entropy",result="success",quantile="0.9"} 2.1329000000000002e-05
node_exporter_scrape_duration_seconds{collector="entropy",result="success",quantile="0.99"} 2.1329000000000002e-05
node_exporter_scrape_duration_seconds_sum{collector="entropy",result="success"} 2.1329000000000002e-05
node_exporter_scrape_duration_seconds{collector="entropy",result="success",quantile="0.5"} 0.000170072
node_exporter_scrape_duration_seconds{collector="entropy",result="success",quantile="0.9"} 0.000170072
node_exporter_scrape_duration_seconds{collector="entropy",result="success",quantile="0.99"} 0.000170072
node_exporter_scrape_duration_seconds_sum{collector="entropy",result="success"} 0.000170072
node_exporter_scrape_duration_seconds_count{collector="entropy",result="success"} 1
node_exporter_scrape_duration_seconds{collector="filefd",result="success",quantile="0.5"} 3.7313e-05
node_exporter_scrape_duration_seconds{collector="filefd",result="success",quantile="0.9"} 3.7313e-05
node_exporter_scrape_duration_seconds{collector="filefd",result="success",quantile="0.99"} 3.7313e-05
node_exporter_scrape_duration_seconds_sum{collector="filefd",result="success"} 3.7313e-05
node_exporter_scrape_duration_seconds{collector="filefd",result="success",quantile="0.5"} 8.825900000000001e-05
node_exporter_scrape_duration_seconds{collector="filefd",result="success",quantile="0.9"} 8.825900000000001e-05
node_exporter_scrape_duration_seconds{collector="filefd",result="success",quantile="0.99"} 8.825900000000001e-05
node_exporter_scrape_duration_seconds_sum{collector="filefd",result="success"} 8.825900000000001e-05
node_exporter_scrape_duration_seconds_count{collector="filefd",result="success"} 1
node_exporter_scrape_duration_seconds{collector="hwmon",result="success",quantile="0.5"} 0.002039698
node_exporter_scrape_duration_seconds{collector="hwmon",result="success",quantile="0.9"} 0.002039698
node_exporter_scrape_duration_seconds{collector="hwmon",result="success",quantile="0.99"} 0.002039698
node_exporter_scrape_duration_seconds_sum{collector="hwmon",result="success"} 0.002039698
node_exporter_scrape_duration_seconds{collector="hwmon",result="success",quantile="0.5"} 0.0076871280000000005
node_exporter_scrape_duration_seconds{collector="hwmon",result="success",quantile="0.9"} 0.0076871280000000005
node_exporter_scrape_duration_seconds{collector="hwmon",result="success",quantile="0.99"} 0.0076871280000000005
node_exporter_scrape_duration_seconds_sum{collector="hwmon",result="success"} 0.0076871280000000005
node_exporter_scrape_duration_seconds_count{collector="hwmon",result="success"} 1
node_exporter_scrape_duration_seconds{collector="ksmd",result="success",quantile="0.5"} 9.497000000000001e-05
node_exporter_scrape_duration_seconds{collector="ksmd",result="success",quantile="0.9"} 9.497000000000001e-05
node_exporter_scrape_duration_seconds{collector="ksmd",result="success",quantile="0.99"} 9.497000000000001e-05
node_exporter_scrape_duration_seconds_sum{collector="ksmd",result="success"} 9.497000000000001e-05
node_exporter_scrape_duration_seconds{collector="ksmd",result="success",quantile="0.5"} 0.001088926
node_exporter_scrape_duration_seconds{collector="ksmd",result="success",quantile="0.9"} 0.001088926
node_exporter_scrape_duration_seconds{collector="ksmd",result="success",quantile="0.99"} 0.001088926
node_exporter_scrape_duration_seconds_sum{collector="ksmd",result="success"} 0.001088926
node_exporter_scrape_duration_seconds_count{collector="ksmd",result="success"} 1
node_exporter_scrape_duration_seconds{collector="loadavg",result="success",quantile="0.5"} 0.00030610500000000004
node_exporter_scrape_duration_seconds{collector="loadavg",result="success",quantile="0.9"} 0.00030610500000000004
node_exporter_scrape_duration_seconds{collector="loadavg",result="success",quantile="0.99"} 0.00030610500000000004
node_exporter_scrape_duration_seconds_sum{collector="loadavg",result="success"} 0.00030610500000000004
node_exporter_scrape_duration_seconds{collector="loadavg",result="success",quantile="0.5"} 0.000189222
node_exporter_scrape_duration_seconds{collector="loadavg",result="success",quantile="0.9"} 0.000189222
node_exporter_scrape_duration_seconds{collector="loadavg",result="success",quantile="0.99"} 0.000189222
node_exporter_scrape_duration_seconds_sum{collector="loadavg",result="success"} 0.000189222
node_exporter_scrape_duration_seconds_count{collector="loadavg",result="success"} 1
node_exporter_scrape_duration_seconds{collector="mdadm",result="success",quantile="0.5"} 0.001285081
node_exporter_scrape_duration_seconds{collector="mdadm",result="success",quantile="0.9"} 0.001285081
node_exporter_scrape_duration_seconds{collector="mdadm",result="success",quantile="0.99"} 0.001285081
node_exporter_scrape_duration_seconds_sum{collector="mdadm",result="success"} 0.001285081
node_exporter_scrape_duration_seconds{collector="mdadm",result="success",quantile="0.5"} 0.0030327270000000003
node_exporter_scrape_duration_seconds{collector="mdadm",result="success",quantile="0.9"} 0.0030327270000000003
node_exporter_scrape_duration_seconds{collector="mdadm",result="success",quantile="0.99"} 0.0030327270000000003
node_exporter_scrape_duration_seconds_sum{collector="mdadm",result="success"} 0.0030327270000000003
node_exporter_scrape_duration_seconds_count{collector="mdadm",result="success"} 1
node_exporter_scrape_duration_seconds{collector="megacli",result="success",quantile="0.5"} 0.006589346
node_exporter_scrape_duration_seconds{collector="megacli",result="success",quantile="0.9"} 0.006589346
node_exporter_scrape_duration_seconds{collector="megacli",result="success",quantile="0.99"} 0.006589346
node_exporter_scrape_duration_seconds_sum{collector="megacli",result="success"} 0.006589346
node_exporter_scrape_duration_seconds{collector="megacli",result="success",quantile="0.5"} 0.010434629
node_exporter_scrape_duration_seconds{collector="megacli",result="success",quantile="0.9"} 0.010434629
node_exporter_scrape_duration_seconds{collector="megacli",result="success",quantile="0.99"} 0.010434629
node_exporter_scrape_duration_seconds_sum{collector="megacli",result="success"} 0.010434629
node_exporter_scrape_duration_seconds_count{collector="megacli",result="success"} 1
node_exporter_scrape_duration_seconds{collector="meminfo",result="success",quantile="0.5"} 0.0025752360000000003
node_exporter_scrape_duration_seconds{collector="meminfo",result="success",quantile="0.9"} 0.0025752360000000003
node_exporter_scrape_duration_seconds{collector="meminfo",result="success",quantile="0.99"} 0.0025752360000000003
node_exporter_scrape_duration_seconds_sum{collector="meminfo",result="success"} 0.0025752360000000003
node_exporter_scrape_duration_seconds{collector="meminfo",result="success",quantile="0.5"} 0.000966604
node_exporter_scrape_duration_seconds{collector="meminfo",result="success",quantile="0.9"} 0.000966604
node_exporter_scrape_duration_seconds{collector="meminfo",result="success",quantile="0.99"} 0.000966604
node_exporter_scrape_duration_seconds_sum{collector="meminfo",result="success"} 0.000966604
node_exporter_scrape_duration_seconds_count{collector="meminfo",result="success"} 1
node_exporter_scrape_duration_seconds{collector="meminfo_numa",result="success",quantile="0.5"} 0.000494111
node_exporter_scrape_duration_seconds{collector="meminfo_numa",result="success",quantile="0.9"} 0.000494111
node_exporter_scrape_duration_seconds{collector="meminfo_numa",result="success",quantile="0.99"} 0.000494111
node_exporter_scrape_duration_seconds_sum{collector="meminfo_numa",result="success"} 0.000494111
node_exporter_scrape_duration_seconds{collector="meminfo_numa",result="success",quantile="0.5"} 0.0017954980000000002
node_exporter_scrape_duration_seconds{collector="meminfo_numa",result="success",quantile="0.9"} 0.0017954980000000002
node_exporter_scrape_duration_seconds{collector="meminfo_numa",result="success",quantile="0.99"} 0.0017954980000000002
node_exporter_scrape_duration_seconds_sum{collector="meminfo_numa",result="success"} 0.0017954980000000002
node_exporter_scrape_duration_seconds_count{collector="meminfo_numa",result="success"} 1
node_exporter_scrape_duration_seconds{collector="netdev",result="success",quantile="0.5"} 0.00038711700000000003
node_exporter_scrape_duration_seconds{collector="netdev",result="success",quantile="0.9"} 0.00038711700000000003
node_exporter_scrape_duration_seconds{collector="netdev",result="success",quantile="0.99"} 0.00038711700000000003
node_exporter_scrape_duration_seconds_sum{collector="netdev",result="success"} 0.00038711700000000003
node_exporter_scrape_duration_seconds{collector="netdev",result="success",quantile="0.5"} 0.000495389
node_exporter_scrape_duration_seconds{collector="netdev",result="success",quantile="0.9"} 0.000495389
node_exporter_scrape_duration_seconds{collector="netdev",result="success",quantile="0.99"} 0.000495389
node_exporter_scrape_duration_seconds_sum{collector="netdev",result="success"} 0.000495389
node_exporter_scrape_duration_seconds_count{collector="netdev",result="success"} 1
node_exporter_scrape_duration_seconds{collector="netstat",result="success",quantile="0.5"} 0.0009007370000000001
node_exporter_scrape_duration_seconds{collector="netstat",result="success",quantile="0.9"} 0.0009007370000000001
node_exporter_scrape_duration_seconds{collector="netstat",result="success",quantile="0.99"} 0.0009007370000000001
node_exporter_scrape_duration_seconds_sum{collector="netstat",result="success"} 0.0009007370000000001
node_exporter_scrape_duration_seconds{collector="netstat",result="success",quantile="0.5"} 0.004669412
node_exporter_scrape_duration_seconds{collector="netstat",result="success",quantile="0.9"} 0.004669412
node_exporter_scrape_duration_seconds{collector="netstat",result="success",quantile="0.99"} 0.004669412
node_exporter_scrape_duration_seconds_sum{collector="netstat",result="success"} 0.004669412
node_exporter_scrape_duration_seconds_count{collector="netstat",result="success"} 1
node_exporter_scrape_duration_seconds{collector="sockstat",result="success",quantile="0.5"} 0.000119957
node_exporter_scrape_duration_seconds{collector="sockstat",result="success",quantile="0.9"} 0.000119957
node_exporter_scrape_duration_seconds{collector="sockstat",result="success",quantile="0.99"} 0.000119957
node_exporter_scrape_duration_seconds_sum{collector="sockstat",result="success"} 0.000119957
node_exporter_scrape_duration_seconds{collector="sockstat",result="success",quantile="0.5"} 0.000185951
node_exporter_scrape_duration_seconds{collector="sockstat",result="success",quantile="0.9"} 0.000185951
node_exporter_scrape_duration_seconds{collector="sockstat",result="success",quantile="0.99"} 0.000185951
node_exporter_scrape_duration_seconds_sum{collector="sockstat",result="success"} 0.000185951
node_exporter_scrape_duration_seconds_count{collector="sockstat",result="success"} 1
node_exporter_scrape_duration_seconds{collector="stat",result="success",quantile="0.5"} 0.00014981800000000002
node_exporter_scrape_duration_seconds{collector="stat",result="success",quantile="0.9"} 0.00014981800000000002
node_exporter_scrape_duration_seconds{collector="stat",result="success",quantile="0.99"} 0.00014981800000000002
node_exporter_scrape_duration_seconds_sum{collector="stat",result="success"} 0.00014981800000000002
node_exporter_scrape_duration_seconds{collector="stat",result="success",quantile="0.5"} 0.00029448200000000004
node_exporter_scrape_duration_seconds{collector="stat",result="success",quantile="0.9"} 0.00029448200000000004
node_exporter_scrape_duration_seconds{collector="stat",result="success",quantile="0.99"} 0.00029448200000000004
node_exporter_scrape_duration_seconds_sum{collector="stat",result="success"} 0.00029448200000000004
node_exporter_scrape_duration_seconds_count{collector="stat",result="success"} 1
node_exporter_scrape_duration_seconds{collector="textfile",result="success",quantile="0.5"} 3.0500000000000004e-07
node_exporter_scrape_duration_seconds{collector="textfile",result="success",quantile="0.9"} 3.0500000000000004e-07
node_exporter_scrape_duration_seconds{collector="textfile",result="success",quantile="0.99"} 3.0500000000000004e-07
node_exporter_scrape_duration_seconds_sum{collector="textfile",result="success"} 3.0500000000000004e-07
node_exporter_scrape_duration_seconds{collector="textfile",result="success",quantile="0.5"} 5.180000000000001e-07
node_exporter_scrape_duration_seconds{collector="textfile",result="success",quantile="0.9"} 5.180000000000001e-07
node_exporter_scrape_duration_seconds{collector="textfile",result="success",quantile="0.99"} 5.180000000000001e-07
node_exporter_scrape_duration_seconds_sum{collector="textfile",result="success"} 5.180000000000001e-07
node_exporter_scrape_duration_seconds_count{collector="textfile",result="success"} 1
# HELP node_filefd_allocated File descriptor statistics: allocated.
# TYPE node_filefd_allocated gauge
@ -485,29 +485,29 @@ node_hwmon_fan_alarm{chip="nct6779",sensor="fan2"} 0
node_hwmon_fan_beep_enabled{chip="nct6779",sensor="fan2"} 0
# HELP node_hwmon_fan_manual Hardware monitor fan element manual
# TYPE node_hwmon_fan_manual gauge
node_hwmon_fan_manual{chip="applesmc_768",sensor="left_side"} 0
node_hwmon_fan_manual{chip="applesmc_768",sensor="right_side"} 0
node_hwmon_fan_manual{chip="platform_applesmc_768",sensor="left_side"} 0
node_hwmon_fan_manual{chip="platform_applesmc_768",sensor="right_side"} 0
# HELP node_hwmon_fan_max_rpm Hardware monitor for fan revolutions per minute (max)
# TYPE node_hwmon_fan_max_rpm gauge
node_hwmon_fan_max_rpm{chip="applesmc_768",sensor="left_side"} 6156
node_hwmon_fan_max_rpm{chip="applesmc_768",sensor="right_side"} 5700
node_hwmon_fan_max_rpm{chip="platform_applesmc_768",sensor="left_side"} 6156
node_hwmon_fan_max_rpm{chip="platform_applesmc_768",sensor="right_side"} 5700
# HELP node_hwmon_fan_min_rpm Hardware monitor for fan revolutions per minute (min)
# TYPE node_hwmon_fan_min_rpm gauge
node_hwmon_fan_min_rpm{chip="applesmc_768",sensor="left_side"} 2160
node_hwmon_fan_min_rpm{chip="applesmc_768",sensor="right_side"} 2000
node_hwmon_fan_min_rpm{chip="nct6779",sensor="fan2"} 0
node_hwmon_fan_min_rpm{chip="platform_applesmc_768",sensor="left_side"} 2160
node_hwmon_fan_min_rpm{chip="platform_applesmc_768",sensor="right_side"} 2000
# HELP node_hwmon_fan_output Hardware monitor fan element output
# TYPE node_hwmon_fan_output gauge
node_hwmon_fan_output{chip="applesmc_768",sensor="left_side"} 2160
node_hwmon_fan_output{chip="applesmc_768",sensor="right_side"} 2000
node_hwmon_fan_output{chip="platform_applesmc_768",sensor="left_side"} 2160
node_hwmon_fan_output{chip="platform_applesmc_768",sensor="right_side"} 2000
# HELP node_hwmon_fan_pulses Hardware monitor fan element pulses
# TYPE node_hwmon_fan_pulses gauge
node_hwmon_fan_pulses{chip="nct6779",sensor="fan2"} 2
# HELP node_hwmon_fan_rpm Hardware monitor for fan revolutions per minute (input)
# TYPE node_hwmon_fan_rpm gauge
node_hwmon_fan_rpm{chip="applesmc_768",sensor="left_side"} 0
node_hwmon_fan_rpm{chip="applesmc_768",sensor="right_side"} 1998
node_hwmon_fan_rpm{chip="nct6779",sensor="fan2"} 1098
node_hwmon_fan_rpm{chip="platform_applesmc_768",sensor="left_side"} 0
node_hwmon_fan_rpm{chip="platform_applesmc_768",sensor="right_side"} 1998
# HELP node_hwmon_fan_target_rpm Hardware monitor for fan revolutions per minute (target)
# TYPE node_hwmon_fan_target_rpm gauge
node_hwmon_fan_target_rpm{chip="nct6779",sensor="fan2"} 27000
@ -625,32 +625,52 @@ node_hwmon_pwm_weight_temp_step_base{chip="nct6779",sensor="pwm1"} 0
node_hwmon_pwm_weight_temp_step_tol{chip="nct6779",sensor="pwm1"} 0
# HELP node_hwmon_temp_celsius Hardware monitor for temperature (input)
# TYPE node_hwmon_temp_celsius gauge
node_hwmon_temp_celsius{chip="coretemp",sensor="core_0"} 54
node_hwmon_temp_celsius{chip="coretemp",sensor="core_1"} 52
node_hwmon_temp_celsius{chip="coretemp",sensor="core_2"} 53
node_hwmon_temp_celsius{chip="coretemp",sensor="core_3"} 50
node_hwmon_temp_celsius{chip="coretemp",sensor="physical_id_0"} 55
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="core_0"} 54
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="core_1"} 52
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="core_2"} 53
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="core_3"} 50
node_hwmon_temp_celsius{chip="platform_coretemp_0",sensor="physical_id_0"} 55
node_hwmon_temp_celsius{chip="platform_coretemp_1",sensor="core_0"} 54
node_hwmon_temp_celsius{chip="platform_coretemp_1",sensor="core_1"} 52
node_hwmon_temp_celsius{chip="platform_coretemp_1",sensor="core_2"} 53
node_hwmon_temp_celsius{chip="platform_coretemp_1",sensor="core_3"} 50
node_hwmon_temp_celsius{chip="platform_coretemp_1",sensor="physical_id_0"} 55
# HELP node_hwmon_temp_crit_alarm_celsius Hardware monitor for temperature (crit_alarm)
# TYPE node_hwmon_temp_crit_alarm_celsius gauge
node_hwmon_temp_crit_alarm_celsius{chip="coretemp",sensor="core_0"} 0
node_hwmon_temp_crit_alarm_celsius{chip="coretemp",sensor="core_1"} 0
node_hwmon_temp_crit_alarm_celsius{chip="coretemp",sensor="core_2"} 0
node_hwmon_temp_crit_alarm_celsius{chip="coretemp",sensor="core_3"} 0
node_hwmon_temp_crit_alarm_celsius{chip="coretemp",sensor="physical_id_0"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_0",sensor="core_0"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_0",sensor="core_1"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_0",sensor="core_2"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_0",sensor="core_3"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_0",sensor="physical_id_0"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_1",sensor="core_0"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_1",sensor="core_1"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_1",sensor="core_2"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_1",sensor="core_3"} 0
node_hwmon_temp_crit_alarm_celsius{chip="platform_coretemp_1",sensor="physical_id_0"} 0
# HELP node_hwmon_temp_crit_celsius Hardware monitor for temperature (crit)
# TYPE node_hwmon_temp_crit_celsius gauge
node_hwmon_temp_crit_celsius{chip="coretemp",sensor="core_0"} 100
node_hwmon_temp_crit_celsius{chip="coretemp",sensor="core_1"} 100
node_hwmon_temp_crit_celsius{chip="coretemp",sensor="core_2"} 100
node_hwmon_temp_crit_celsius{chip="coretemp",sensor="core_3"} 100
node_hwmon_temp_crit_celsius{chip="coretemp",sensor="physical_id_0"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_0",sensor="core_0"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_0",sensor="core_1"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_0",sensor="core_2"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_0",sensor="core_3"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_0",sensor="physical_id_0"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_1",sensor="core_0"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_1",sensor="core_1"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_1",sensor="core_2"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_1",sensor="core_3"} 100
node_hwmon_temp_crit_celsius{chip="platform_coretemp_1",sensor="physical_id_0"} 100
# HELP node_hwmon_temp_max_celsius Hardware monitor for temperature (max)
# TYPE node_hwmon_temp_max_celsius gauge
node_hwmon_temp_max_celsius{chip="coretemp",sensor="core_0"} 84
node_hwmon_temp_max_celsius{chip="coretemp",sensor="core_1"} 84
node_hwmon_temp_max_celsius{chip="coretemp",sensor="core_2"} 84
node_hwmon_temp_max_celsius{chip="coretemp",sensor="core_3"} 84
node_hwmon_temp_max_celsius{chip="coretemp",sensor="physical_id_0"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_0",sensor="core_0"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_0",sensor="core_1"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_0",sensor="core_2"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_0",sensor="core_3"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_0",sensor="physical_id_0"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_1",sensor="core_0"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_1",sensor="core_1"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_1",sensor="core_2"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_1",sensor="core_3"} 84
node_hwmon_temp_max_celsius{chip="platform_coretemp_1",sensor="physical_id_0"} 84
# HELP node_intr Total number of interrupts serviced.
# TYPE node_intr counter
node_intr 8.885917e+06

View file

@ -1 +1 @@
../../devices/platform/nct6775.656/hwmon/hwmon1
../../devices/platform/coretemp.1/hwmon/hwmon1

View file

@ -0,0 +1 @@
../../devices/platform/nct6775.656/hwmon/hwmon3

View file

@ -0,0 +1 @@
../../../coretemp.0

View file

@ -0,0 +1 @@
../../../coretemp.1

View file

@ -0,0 +1 @@
coretemp

View file

@ -0,0 +1 @@
Physical id 0

View file

@ -306,22 +306,12 @@ func (c *hwMonCollector) hwmonName(dir string) (string, error) {
// human readable names would be bat0 or coretemp, while a path string
// could be platform_applesmc.768
// preference 1: is there a name file
sysnameRaw, nameErr := ioutil.ReadFile(path.Join(dir, "name"))
if nameErr == nil && string(sysnameRaw) != "" {
cleanName := cleanMetricName(string(sysnameRaw))
if cleanName != "" {
return cleanName, nil
}
}
// preference 2: construct a name based on device
// preference 1: construct a name based on device name, always unique
devicePath, devErr := filepath.EvalSymlinks(path.Join(dir, "device"))
if devErr == nil {
devPathPrefix, devName := path.Split(devicePath)
_, devType := path.Split(devPathPrefix)
_, devType := path.Split(strings.TrimRight(devPathPrefix, "/"))
cleanDevName := cleanMetricName(devName)
cleanDevType := cleanMetricName(devType)
@ -335,6 +325,15 @@ func (c *hwMonCollector) hwmonName(dir string) (string, error) {
}
}
// preference 2: is there a name file
sysnameRaw, nameErr := ioutil.ReadFile(path.Join(dir, "name"))
if nameErr == nil && string(sysnameRaw) != "" {
cleanName := cleanMetricName(string(sysnameRaw))
if cleanName != "" {
return cleanName, nil
}
}
// it looks bad, name and device don't provide enough information
// return a hwmon[0-9]* name