PhilipMay / smart-prom-next

S.M.A.R.T. Prometheus Metrics Exporter
MIT License
18 stars 1 forks source link

[FR] add power on hours metric #11

Open PhilipMay opened 2 years ago

PhilipMay commented 2 years ago

like this:


# HELP smartctl_device_power_on_seconds Device power on seconds
# TYPE smartctl_device_power_on_seconds counter
smartctl_device_power_on_seconds{device="/dev/sda",model_family="Plextor M3/M5/M6 Series SSDs",model_name="PLEXTOR PX-128M6S",serial_number="P02448109994"} 1.06704e+07
smartctl_device_power_on_seconds{device="/dev/sdb",model_family="SandForce Driven SSDs",model_name="OCZ-VERTEX3",serial_number="A20Y8011312000361"} 1.0580304e+08
smartctl_device_power_on_seconds{device="/dev/sdc",model_family="Western Digital Red",model_name="WDC WD20EFRX-68EUZN0",serial_number="WD-WCC4M4VX3C69"} 6.70392e+07
smartctl_device_power_on_seconds{device="/dev/sdd",model_family="Western Digital Red",model_name="WDC WD20EFRX-68EUZN0",serial_number="WD-WCC4M6DCPPC7"} 6.70392e+07
smartctl_device_power_on_seconds{device="/dev/sde",model_family="Phison Driven SSDs",model_name="KINGSTON SA400S37120G",serial_number="50026B778224F6E1"} 2.46564e+07
smartctl_device_power_on_seconds{device="/dev/sdf",model_family="Phison Driven SSDs",model_name="KINGSTON SA400S37120G",serial_number="50026B778224F53C"} 2.4714e+07
PhilipMay commented 2 years ago

Looks like this:

  "power_on_time": {
    "hours": 1767
  }

or

  "power_on_time": {
    "hours": 30307,
    "minutes": 31
  }
PhilipMay commented 2 years ago

Only read "hours".