Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server returned HTTP status 500 Internal Server Error #3

Closed
AdolarMezga opened this issue Sep 18, 2019 · 5 comments · Fixed by #28
Closed

server returned HTTP status 500 Internal Server Error #3

AdolarMezga opened this issue Sep 18, 2019 · 5 comments · Fixed by #28
Assignees
Labels
bug Something isn't working

Comments

@AdolarMezga
Copy link

Hello,
thank you for your work. Sadly prometheus reports a "server returned HTTP status 500 Internal Server Error" in target overview. If I request

http://10.100.165.16:9633/metrics

via Browser, I get:

An error has occurred while serving metrics:

10 error(s) occurred:
* collected metric "smartctl_device_smartctl_exit_status" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > gauge:<value:2 > } was collected before with the same name and label values
* collected metric "smartctl_device" { label:<name:"ata_additional_product_id" value:"unknown" > label:<name:"ata_version" value:"" > label:<name:"device" value:"" > label:<name:"firmware_version" value:"" > label:<name:"interface" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"protocol" value:"" > label:<name:"sata_version" value:"" > label:<name:"serial_number" value:"" > gauge:<value:1 > } was collected before with the same name and label values
* collected metric "smartctl_device_capacity_blocks" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_capacity_bytes" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_block_size" { label:<name:"blocks_type" value:"logical" > label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_block_size" { label:<name:"blocks_type" value:"physical" > label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_interface_speed" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > label:<name:"speed_type" value:"max" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_interface_speed" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > label:<name:"speed_type" value:"current" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_power_on_seconds" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > counter:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_power_cycle_count" { label:<name:"device" value:"" > label:<name:"model_family" value:"" > label:<name:"model_name" value:"" > label:<name:"serial_number" value:"" > counter:<value:0 > } was collected before with the same name and label values

smartctl version is:

[root@NxOsLab004 ~]# smartctl --version
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-957.1.3.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

The smartctl-exporter reports a warning, because return value of smartctl is 32, but should be irrelevant.

[root@NxOsLab004 ~]# ./smartctl_exporter --config=./smartctl_exporter.yaml --debug
[Debug] Parsed options: {{10.100.165.16:9633 /metrics %!s(bool=false) /usr/sbin/smartctl 20s 20s [/dev/sda /dev/sdb /dev/sdc /dev/sdd]}}
[Debug] Collecting S.M.A.R.T. counters, device: /dev/sda
[Warning] S.M.A.R.T. output reading error: exit status 32
[Debug] Collecting S.M.A.R.T. counters, device: /dev/sdb
[Warning] S.M.A.R.T. output reading error: exit status 32
[Debug] Collecting S.M.A.R.T. counters, device: /dev/sdc
[Warning] S.M.A.R.T. output reading error: exit status 2
[Debug] Collecting S.M.A.R.T. counters, device: /dev/sdd
[Warning] S.M.A.R.T. output reading error: exit status 2
[Info] Starting on 10.100.165.16:9633/metrics

Its possible to avoid that behavior?

Regards.

@Sheridan Sheridan self-assigned this Sep 25, 2019
@Sheridan Sheridan added the bug Something isn't working label Sep 25, 2019
@Sheridan
Copy link
Contributor

Sorry for the long answer...
Can you send me result of smartctl --json --xall /dev/sda > /tmp/sda.json, json files for all devices?

@sneak
Copy link

sneak commented Jul 6, 2020

I'm getting the same:

An error has occurred while serving metrics:

16 error(s) occurred:
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3NY2V" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3NY2V" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3NY2V" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3NY2V" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P3E3" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3P3E3" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P3E3" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3P3E3" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3P9P1" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3P9P1" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3Q95P" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3Q95P" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3Q95P" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3Q95P" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3QGV5" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3QGV5" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3QGV5" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3QGV5" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3R74X" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3R74X" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3R74X" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3R74X" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3SZCM" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3SZCM" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3SZCM" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3SZCM" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3WHE7" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3WHE7" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values
* collected metric "smartctl_device_statistics" { label:<name:"device" value:"/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3WHE7" > label:<name:"model_family" value:"Seagate Exos X14" > label:<name:"model_name" value:"ST12000NM0008-2H3101" > label:<name:"serial_number" value:"ZHZ3WHE7" > label:<name:"statistic_flags_long" value:"valid" > label:<name:"statistic_flags_short" value:"V---" > label:<name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > } was collected before with the same name and label values

Daemon output:

root@lstor1:/etc/service/smartctl_exporter# ./run
[Verbose] Read options from /etc/smartctl_exporter.yaml

[Debug] Parsed options: {{[::]:9666 /metrics %!s(bool=false) /usr/local/sbin/smartctl 20s 20s [/dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E219 /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E21B /dev/disk/by-id/scsi-SATA_ST10000NM0016-1T_ZA2CZA35 /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3NY2V /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P3E3 /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1 /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3Q95P /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3QGV5 /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3R74X /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3SZCM /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3WHE7]}}
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E219
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E219: , PNY CS900 120GB SSD
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E21B
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E21B: , PNY CS900 120GB SSD
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST10000NM0016-1T_ZA2CZA35
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST10000NM0016-1T_ZA2CZA35: Seagate Enterprise Capacity 3.5 HDD, ST10000NM0016-1TT101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3NY2V
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3NY2V: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P3E3
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P3E3: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3Q95P
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3Q95P: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3QGV5
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3QGV5: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3R74X
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3R74X: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3SZCM
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3SZCM: Seagate Exos X14, ST12000NM0008-2H3101
[Debug] Collecting S.M.A.R.T. counters, device: /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3WHE7
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3WHE7: Seagate Exos X14, ST12000NM0008-2H3101
[Info] Starting on [::]:9666/metrics
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E219: , PNY CS900 120GB SSD
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_PNY_CS900_120GB_PNY0520228055010E21B: , PNY CS900 120GB SSD
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST10000NM0016-1T_ZA2CZA35: Seagate Enterprise Capacity 3.5 HDD, ST10000NM0016-1TT101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3NY2V: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P3E3: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3Q95P: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3QGV5: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3R74X: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3SZCM: Seagate Exos X14, ST12000NM0008-2H3101
[Verbose] Collecting metrics from /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3WHE7: Seagate Exos X14, ST12000NM0008-2H3101

I ran smartctl --json --xall /dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1 > out.json

out.json:

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      1
    ],
    "svn_revision": "5022",
    "platform_info": "x86_64-linux-5.4.0-40-generic",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--json",
      "--xall",
      "/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1"
    ],
    "exit_status": 0
  },
  "device": {
    "name": "/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1",
    "info_name": "/dev/disk/by-id/scsi-SATA_ST12000NM0008-2H_ZHZ3P9P1 [SAT]",
    "type": "sat",
    "protocol": "ATA"
  },
  "model_family": "Seagate Exos X14",
  "model_name": "ST12000NM0008-2H3101",
  "serial_number": "ZHZ3P9P1",
  "wwn": {
    "naa": 5,
    "oui": 3152,
    "id": 3265897365
  },
  "firmware_version": "SN02",
  "user_capacity": {
    "blocks": 23437770752,
    "bytes": 12000138625024
  },
  "logical_block_size": 512,
  "physical_block_size": 4096,
  "rotation_rate": 7200,
  "form_factor": {
    "ata_value": 2,
    "name": "3.5 inches"
  },
  "in_smartctl_database": true,
  "ata_version": {
    "string": "ACS-4 T13/BSR INCITS 529 revision 5",
    "major_value": 4064,
    "minor_value": 94
  },
  "sata_version": {
    "string": "SATA 3.3",
    "value": 511
  },
  "interface_speed": {
    "max": {
      "sata_value": 14,
      "string": "6.0 Gb/s",
      "units_per_second": 60,
      "bits_per_unit": 100000000
    },
    "current": {
      "sata_value": 3,
      "string": "6.0 Gb/s",
      "units_per_second": 60,
      "bits_per_unit": 100000000
    }
  },
  "local_time": {
    "time_t": 1593997637,
    "asctime": "Mon Jul  6 01:07:17 2020 UTC"
  },
  "read_lookahead": {
    "enabled": true
  },
  "write_cache": {
    "enabled": true
  },
  "ata_dsn": {
    "enabled": false
  },
  "ata_security": {
    "state": 33,
    "string": "Disabled, NOT FROZEN [SEC1]",
    "enabled": false,
    "frozen": false
  },
  "smart_status": {
    "passed": true
  },
  "ata_smart_data": {
    "offline_data_collection": {
      "status": {
        "value": 130,
        "string": "was completed without error",
        "passed": true
      },
      "completion_seconds": 575
    },
    "self_test": {
      "status": {
        "value": 0,
        "string": "completed without error",
        "passed": true
      },
      "polling_minutes": {
        "short": 1,
        "extended": 1174,
        "conveyance": 2
      }
    },
    "capabilities": {
      "values": [
        123,
        3
      ],
      "exec_offline_immediate_supported": true,
      "offline_is_aborted_upon_new_cmd": false,
      "offline_surface_scan_supported": true,
      "self_tests_supported": true,
      "conveyance_self_test_supported": true,
      "selective_self_test_supported": true,
      "attribute_autosave_enabled": true,
      "error_logging_supported": true,
      "gp_logging_supported": true
    }
  },
  "ata_sct_capabilities": {
    "value": 28861,
    "error_recovery_control_supported": true,
    "feature_control_supported": true,
    "data_table_supported": true
  },
  "ata_smart_attributes": {
    "revision": 10,
    "table": [
      {
        "id": 1,
        "name": "Raw_Read_Error_Rate",
        "value": 81,
        "worst": 64,
        "thresh": 44,
        "when_failed": "",
        "flags": {
          "value": 15,
          "string": "POSR-- ",
          "prefailure": true,
          "updated_online": true,
          "performance": true,
          "error_rate": true,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 124098219,
          "string": "124098219"
        }
      },
      {
        "id": 3,
        "name": "Spin_Up_Time",
        "value": 98,
        "worst": 98,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 3,
          "string": "PO---- ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 4,
        "name": "Start_Stop_Count",
        "value": 100,
        "worst": 100,
        "thresh": 20,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 3,
          "string": "3"
        }
      },
      {
        "id": 5,
        "name": "Reallocated_Sector_Ct",
        "value": 100,
        "worst": 100,
        "thresh": 10,
        "when_failed": "",
        "flags": {
          "value": 51,
          "string": "PO--CK ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 7,
        "name": "Seek_Error_Rate",
        "value": 74,
        "worst": 60,
        "thresh": 45,
        "when_failed": "",
        "flags": {
          "value": 15,
          "string": "POSR-- ",
          "prefailure": true,
          "updated_online": true,
          "performance": true,
          "error_rate": true,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 24153386,
          "string": "24153386"
        }
      },
      {
        "id": 9,
        "name": "Power_On_Hours",
        "value": 99,
        "worst": 99,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 1276,
          "string": "1276"
        }
      },
      {
        "id": 10,
        "name": "Spin_Retry_Count",
        "value": 100,
        "worst": 100,
        "thresh": 97,
        "when_failed": "",
        "flags": {
          "value": 19,
          "string": "PO--C- ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 12,
        "name": "Power_Cycle_Count",
        "value": 100,
        "worst": 100,
        "thresh": 20,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 3,
          "string": "3"
        }
      },
      {
        "id": 18,
        "name": "Unknown_Attribute",
        "value": 100,
        "worst": 100,
        "thresh": 50,
        "when_failed": "",
        "flags": {
          "value": 11,
          "string": "PO-R-- ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": true,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 187,
        "name": "Reported_Uncorrect",
        "value": 100,
        "worst": 100,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 188,
        "name": "Command_Timeout",
        "value": 100,
        "worst": 100,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 190,
        "name": "Airflow_Temperature_Cel",
        "value": 58,
        "worst": 57,
        "thresh": 40,
        "when_failed": "",
        "flags": {
          "value": 34,
          "string": "-O---K ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": true
        },
        "raw": {
          "value": 723386410,
          "string": "42 (Min/Max 30/43)"
        }
      },
      {
        "id": 192,
        "name": "Power-Off_Retract_Count",
        "value": 100,
        "worst": 100,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 5,
          "string": "5"
        }
      },
      {
        "id": 193,
        "name": "Load_Cycle_Count",
        "value": 100,
        "worst": 100,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 50,
          "string": "-O--CK ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 452,
          "string": "452"
        }
      },
      {
        "id": 194,
        "name": "Temperature_Celsius",
        "value": 42,
        "worst": 43,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 34,
          "string": "-O---K ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": true
        },
        "raw": {
          "value": 120259084330,
          "string": "42 (0 28 0 0 0)"
        }
      },
      {
        "id": 195,
        "name": "Hardware_ECC_Recovered",
        "value": 16,
        "worst": 14,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 26,
          "string": "-O-RC- ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": true,
          "event_count": true,
          "auto_keep": false
        },
        "raw": {
          "value": 124098219,
          "string": "124098219"
        }
      },
      {
        "id": 197,
        "name": "Current_Pending_Sector",
        "value": 100,
        "worst": 100,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 18,
          "string": "-O--C- ",
          "prefailure": false,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 198,
        "name": "Offline_Uncorrectable",
        "value": 100,
        "worst": 100,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 16,
          "string": "----C- ",
          "prefailure": false,
          "updated_online": false,
          "performance": false,
          "error_rate": false,
          "event_count": true,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 199,
        "name": "UDMA_CRC_Error_Count",
        "value": 200,
        "worst": 200,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 62,
          "string": "-OSRCK ",
          "prefailure": false,
          "updated_online": true,
          "performance": true,
          "error_rate": true,
          "event_count": true,
          "auto_keep": true
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 200,
        "name": "Multi_Zone_Error_Rate",
        "value": 100,
        "worst": 100,
        "thresh": 1,
        "when_failed": "",
        "flags": {
          "value": 35,
          "string": "PO---K ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": true
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
      {
        "id": 240,
        "name": "Head_Flying_Hours",
        "value": 100,
        "worst": 253,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 0,
          "string": "------ ",
          "prefailure": false,
          "updated_online": false,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 12903271463125164,
          "string": "172h+50m+04.277s"
        }
      },
      {
        "id": 241,
        "name": "Total_LBAs_Written",
        "value": 100,
        "worst": 253,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 0,
          "string": "------ ",
          "prefailure": false,
          "updated_online": false,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 22822792513,
          "string": "22822792513"
        }
      },
      {
        "id": 242,
        "name": "Total_LBAs_Read",
        "value": 100,
        "worst": 253,
        "thresh": 0,
        "when_failed": "",
        "flags": {
          "value": 0,
          "string": "------ ",
          "prefailure": false,
          "updated_online": false,
          "performance": false,
          "error_rate": false,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 6432600,
          "string": "6432600"
        }
      }
    ]
  },
  "power_on_time": {
    "hours": 1276
  },
  "power_cycle_count": 3,
  "temperature": {
    "current": 42,
    "power_cycle_min": 30,
    "power_cycle_max": 43,
    "lifetime_min": 0,
    "lifetime_max": 43,
    "op_limit_min": 5,
    "op_limit_max": 60,
    "limit_min": 5,
    "limit_max": 60,
    "lifetime_over_limit_minutes": 0,
    "lifetime_under_limit_minutes": 7230
  },
  "ata_log_directory": {
    "gp_dir_version": 1,
    "smart_dir_version": 1,
    "smart_dir_multi_sector": true,
    "table": [
      {
        "address": 0,
        "name": "Log Directory",
        "read": true,
        "write": false,
        "gp_sectors": 1,
        "smart_sectors": 1
      },
      {
        "address": 1,
        "name": "Summary SMART error log",
        "read": true,
        "write": false,
        "smart_sectors": 1
      },
      {
        "address": 2,
        "name": "Comprehensive SMART error log",
        "read": true,
        "write": false,
        "smart_sectors": 5
      },
      {
        "address": 3,
        "name": "Ext. Comprehensive SMART error log",
        "read": true,
        "write": false,
        "gp_sectors": 5
      },
      {
        "address": 4,
        "name": "Device Statistics log",
        "read": true,
        "write": false,
        "gp_sectors": 256,
        "smart_sectors": 8
      },
      {
        "address": 6,
        "name": "SMART self-test log",
        "read": true,
        "write": false,
        "smart_sectors": 1
      },
      {
        "address": 7,
        "name": "Extended self-test log",
        "read": true,
        "write": false,
        "gp_sectors": 1
      },
      {
        "address": 8,
        "name": "Power Conditions log",
        "read": true,
        "write": false,
        "gp_sectors": 2
      },
      {
        "address": 9,
        "name": "Selective self-test log",
        "read": true,
        "write": true,
        "smart_sectors": 1
      },
      {
        "address": 10,
        "name": "Device Statistics Notification",
        "read": true,
        "write": true,
        "gp_sectors": 8
      },
      {
        "address": 12,
        "name": "Pending Defects log",
        "read": true,
        "write": false,
        "gp_sectors": 2048
      },
      {
        "address": 16,
        "name": "NCQ Command Error log",
        "read": true,
        "write": false,
        "gp_sectors": 1
      },
      {
        "address": 17,
        "name": "SATA Phy Event Counters log",
        "read": true,
        "write": false,
        "gp_sectors": 1
      },
      {
        "address": 19,
        "name": "SATA NCQ Send and Receive log",
        "read": true,
        "write": false,
        "gp_sectors": 1
      },
      {
        "address": 21,
        "name": "Rebuild Assist log",
        "read": true,
        "write": true,
        "gp_sectors": 1
      },
      {
        "address": 33,
        "name": "Write stream error log",
        "read": true,
        "write": false,
        "gp_sectors": 1
      },
      {
        "address": 34,
        "name": "Read stream error log",
        "read": true,
        "write": false,
        "gp_sectors": 1
      },
      {
        "address": 36,
        "name": "Current Device Internal Status Data log",
        "read": true,
        "write": false,
        "gp_sectors": 768
      },
      {
        "address": 47,
        "name": "Set Sector Configuration",
        "gp_sectors": 1
      },
      {
        "address": 48,
        "name": "IDENTIFY DEVICE data log",
        "read": true,
        "write": false,
        "gp_sectors": 9,
        "smart_sectors": 9
      },
      {
        "address": 128,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 129,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 130,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 131,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 132,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 133,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 134,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 135,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 136,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 137,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 138,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 139,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 140,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 141,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 142,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 143,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 144,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 145,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 146,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 147,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 148,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 149,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 150,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 151,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 152,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 153,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 154,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 155,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 156,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 157,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 158,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 159,
        "name": "Host vendor specific log",
        "read": true,
        "write": true,
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 161,
        "name": "Device vendor specific log",
        "gp_sectors": 24,
        "smart_sectors": 24
      },
      {
        "address": 162,
        "name": "Device vendor specific log",
        "gp_sectors": 16320
      },
      {
        "address": 164,
        "name": "Device vendor specific log",
        "gp_sectors": 160,
        "smart_sectors": 160
      },
      {
        "address": 166,
        "name": "Device vendor specific log",
        "gp_sectors": 192
      },
      {
        "address": 168,
        "name": "Device vendor specific log",
        "gp_sectors": 136,
        "smart_sectors": 136
      },
      {
        "address": 169,
        "name": "Device vendor specific log",
        "gp_sectors": 136,
        "smart_sectors": 136
      },
      {
        "address": 171,
        "name": "Device vendor specific log",
        "gp_sectors": 1
      },
      {
        "address": 173,
        "name": "Device vendor specific log",
        "gp_sectors": 16
      },
      {
        "address": 190,
        "name": "Device vendor specific log",
        "gp_sectors": 65535
      },
      {
        "address": 191,
        "name": "Device vendor specific log",
        "gp_sectors": 65535
      },
      {
        "address": 193,
        "name": "Device vendor specific log",
        "gp_sectors": 8,
        "smart_sectors": 8
      },
      {
        "address": 195,
        "name": "Device vendor specific log",
        "gp_sectors": 32,
        "smart_sectors": 32
      },
      {
        "address": 201,
        "name": "Device vendor specific log",
        "gp_sectors": 8,
        "smart_sectors": 8
      },
      {
        "address": 202,
        "name": "Device vendor specific log",
        "gp_sectors": 16,
        "smart_sectors": 16
      },
      {
        "address": 209,
        "name": "Device vendor specific log",
        "gp_sectors": 336
      },
      {
        "address": 210,
        "name": "Device vendor specific log",
        "gp_sectors": 10000
      },
      {
        "address": 212,
        "name": "Device vendor specific log",
        "gp_sectors": 2048
      },
      {
        "address": 218,
        "name": "Device vendor specific log",
        "gp_sectors": 1,
        "smart_sectors": 1
      },
      {
        "address": 224,
        "name": "SCT Command/Status",
        "read": true,
        "write": true,
        "gp_sectors": 1,
        "smart_sectors": 1
      },
      {
        "address": 225,
        "name": "SCT Data Transfer",
        "read": true,
        "write": true,
        "gp_sectors": 1,
        "smart_sectors": 1
      }
    ]
  },
  "ata_smart_error_log": {
    "extended": {
      "revision": 1,
      "sectors": 5,
      "count": 0
    }
  },
  "ata_smart_self_test_log": {
    "extended": {
      "revision": 1,
      "sectors": 1,
      "count": 0
    }
  },
  "ata_smart_selective_self_test_log": {
    "revision": 1,
    "table": [
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      }
    ],
    "flags": {
      "value": 0,
      "remainder_scan_enabled": false
    },
    "power_up_scan_resume_minutes": 0
  },
  "ata_sct_status": {
    "format_version": 3,
    "sct_version": 522,
    "device_state": {
      "value": 0,
      "string": "Active"
    },
    "temperature": {
      "current": 42,
      "power_cycle_min": 30,
      "power_cycle_max": 43,
      "lifetime_min": 26,
      "lifetime_max": 43,
      "under_limit_count": 0,
      "over_limit_count": 4
    }
  },
  "ata_sct_temperature_history": {
    "version": 2,
    "sampling_period_minutes": 3,
    "logging_interval_minutes": 59,
    "temperature": {
      "op_limit_min": 10,
      "op_limit_max": 40,
      "limit_min": 5,
      "limit_max": 60
    },
    "size": 128,
    "index": 26,
    "table": [
      33,
      34,
      35,
      36,
      37,
      37,
      37,
      37,
      37,
      37,
      37,
      36,
      36,
      35,
      35,
      34,
      34,
      33,
      33,
      33,
      33,
      32,
      32,
      33,
      34,
      35,
      36,
      37,
      37,
      38,
      38,
      38,
      38,
      37,
      37,
      37,
      36,
      36,
      36,
      35,
      35,
      35,
      34,
      34,
      34,
      34,
      33,
      34,
      35,
      36,
      37,
      38,
      38,
      38,
      38,
      38,
      38,
      38,
      38,
      37,
      37,
      37,
      36,
      36,
      35,
      35,
      35,
      34,
      34,
      34,
      34,
      34,
      35,
      36,
      37,
      38,
      39,
      39,
      39,
      39,
      39,
      39,
      38,
      38,
      39,
      39,
      38,
      38,
      37,
      37,
      36,
      36,
      35,
      35,
      35,
      35,
      36,
      37,
      38,
      39,
      40,
      40,
      40,
      40,
      40,
      40,
      39,
      39,
      38,
      38,
      38,
      37,
      37,
      36,
      36,
      36,
      35,
      35,
      35,
      35,
      36,
      37,
      38,
      39,
      40,
      40,
      41,
      43
    ]
  },
  "ata_sct_erc": {
    "read": {
      "enabled": true,
      "deciseconds": 100
    },
    "write": {
      "enabled": true,
      "deciseconds": 100
    }
  },
  "ata_device_statistics": {
    "pages": [
      {
        "number": 1,
        "name": "General Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Lifetime Power-On Resets",
            "size": 4,
            "value": 3,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Power-on Hours",
            "size": 4,
            "value": 1276,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Logical Sectors Written",
            "size": 6,
            "value": 22822792513,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 32,
            "name": "Number of Write Commands",
            "size": 6,
            "value": 71485685,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 40,
            "name": "Logical Sectors Read",
            "size": 6,
            "value": 6432600,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 48,
            "name": "Number of Read Commands",
            "size": 6,
            "value": 202309,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 56,
            "name": "Date and Time TimeStamp",
            "size": 6,
            "flags": {
              "value": 128,
              "string": "---- ",
              "valid": false,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          }
        ]
      },
      {
        "number": 3,
        "name": "Rotating Media Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Spindle Motor Power-on Hours",
            "size": 4,
            "value": 1157,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Head Flying Hours",
            "size": 4,
            "value": 203,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Head Load Events",
            "size": 4,
            "value": 452,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 32,
            "name": "Number of Reallocated Logical Sectors",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 40,
            "name": "Read Recovery Attempts",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 48,
            "name": "Number of Mechanical Start Failures",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 56,
            "name": "Number of Realloc. Candidate Logical Sectors",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 64,
            "name": "Number of High Priority Unload Events",
            "size": 4,
            "value": 5,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          }
        ]
      },
      {
        "number": 4,
        "name": "General Errors Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Number of Reported Uncorrectable Errors",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Resets Between Cmd Acceptance and Completion",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Physical Element Status Changed",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 208,
              "string": "V-D- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": true,
              "monitored_condition_met": false
            }
          }
        ]
      },
      {
        "number": 5,
        "name": "Temperature Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Current Temperature",
            "size": 1,
            "value": 42,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Average Short Term Temperature",
            "size": 1,
            "value": 38,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Average Long Term Temperature",
            "size": 1,
            "value": 30,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 32,
            "name": "Highest Temperature",
            "size": 1,
            "value": 43,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 40,
            "name": "Lowest Temperature",
            "size": 1,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 48,
            "name": "Highest Average Short Term Temperature",
            "size": 1,
            "value": 40,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 56,
            "name": "Lowest Average Short Term Temperature",
            "size": 1,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 64,
            "name": "Highest Average Long Term Temperature",
            "size": 1,
            "value": 30,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 72,
            "name": "Lowest Average Long Term Temperature",
            "size": 1,
            "value": 29,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 80,
            "name": "Time in Over-Temperature",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 88,
            "name": "Specified Maximum Operating Temperature",
            "size": 1,
            "value": 60,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 96,
            "name": "Time in Under-Temperature",
            "size": 4,
            "value": 7230,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 104,
            "name": "Specified Minimum Operating Temperature",
            "size": 1,
            "value": 5,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          }
        ]
      },
      {
        "number": 6,
        "name": "Transport Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Number of Hardware Resets",
            "size": 4,
            "value": 1,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Number of ASR Events",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Number of Interface CRC Errors",
            "size": 4,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          }
        ]
      },
      {
        "number": 255,
        "name": "Vendor Specific Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Vendor Specific",
            "size": 7,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Vendor Specific",
            "size": 7,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Vendor Specific",
            "size": 7,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          }
        ]
      }
    ]
  },
  "ata_pending_defects_log": {
    "size": 65535,
    "count": 0
  },
  "sata_phy_event_counters": {
    "table": [
      {
        "id": 10,
        "name": "Device-to-host register FISes sent due to a COMRESET",
        "size": 2,
        "value": 2,
        "overflow": false
      },
      {
        "id": 1,
        "name": "Command failed due to ICRC error",
        "size": 2,
        "value": 0,
        "overflow": false
      },
      {
        "id": 3,
        "name": "R_ERR response for device-to-host data FIS",
        "size": 2,
        "value": 0,
        "overflow": false
      },
      {
        "id": 4,
        "name": "R_ERR response for host-to-device data FIS",
        "size": 2,
        "value": 0,
        "overflow": false
      },
      {
        "id": 6,
        "name": "R_ERR response for device-to-host non-data FIS",
        "size": 2,
        "value": 0,
        "overflow": false
      },
      {
        "id": 7,
        "name": "R_ERR response for host-to-device non-data FIS",
        "size": 2,
        "value": 0,
        "overflow": false
      }
    ],
    "reset": false
  }
}

@lahwaacz
Copy link
Contributor

lahwaacz commented Oct 3, 2021

The problem is that smartctl reports some fields for which the smartctl_exporter extracts duplicate name and label values. Notably (from the above output):

      {
        "number": 255,
        "name": "Vendor Specific Statistics",
        "revision": 1,
        "table": [
          {
            "offset": 8,
            "name": "Vendor Specific",
            "size": 7,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 16,
            "name": "Vendor Specific",
            "size": 7,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          },
          {
            "offset": 24,
            "name": "Vendor Specific",
            "size": 7,
            "value": 0,
            "flags": {
              "value": 192,
              "string": "V--- ",
              "valid": true,
              "normalized": false,
              "supports_dsn": false,
              "monitored_condition_met": false
            }
          }
        ]
      }

Here the metric name is smartctl_device_statistics and label is <name:"statistic_name" value:"Vendor Specific" > label:<name:"statistic_table" value:"Vendor Specific Statistics" > gauge:<value:0 > for all three fields. You can see a warning generated for the latter two fields.

A possible solution is to skip the "Vendor Specific Statistics" table, for which I just created a pull request #28.

@baryluk
Copy link

baryluk commented Oct 8, 2021

I am having very similar issue with Samsung Exos X16. There is no guarantee that the value names are unique, (especially in this case), and that causes issues.

@keliansb
Copy link

keliansb commented Aug 9, 2022

I am facing the same issue in latest release 0.7.0. Let me know if you need more logs in order to debug this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants