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

Another case of "was collected before with the same name and label values" #233

Open
SckyzO opened this issue Jun 13, 2024 · 8 comments
Open

Comments

@SckyzO
Copy link

SckyzO commented Jun 13, 2024

Hi

I use this exporter so many time, but today, i installed a new jbod supermicro, and I have disks which can"t work with this exporter.
I use smartmontools 7.1, and i've update the drivedb.h too.

The errors are currently with the same disk model : SEAGATE ST4000NM025B

example with /dev/sdj

smartctl --json --xall /dev/sdj
  Pending defect count:{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      1
    ],
    "svn_revision": "5022",
    "platform_info": "x86_64-linux-4.18.0-513.18.1.el8_9.x86_64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--json",
      "--xall",
      "/dev/sdj"
    ],
    "exit_status": 0
  },
  "device": {
    "name": "/dev/sdj",
    "info_name": "/dev/sdj",
    "type": "scsi",
    "protocol": "SCSI"
  },
  "vendor": "SEAGATE",
  "product": "ST4000NM025B",
  "model_name": "SEAGATE ST4000NM025B",
  "revision": "E003",
  "scsi_version": "SPC-5",
  "user_capacity": {
    "blocks": 7814037168,
    "bytes": 4000787030016
  },
  "logical_block_size": 512,
  "physical_block_size": 4096,
  "rotation_rate": 7200,
  "form_factor": {
    "scsi_value": 2,
    "name": "3.5 inches"
  },
  "serial_number": "WQB045610000E23374ZH",
  "device_type": {
    "scsi_value": 0,
    "name": "disk"
  },
  "local_time": {
    "time_t": 1718239233,
    "asctime": "Thu Jun 13 02:40:33 2024 CEST"
  },
  "smart_status": {
    "passed": true
  },
  "temperature": {
    "current": 33,
    "drive_trip": 60
  },
  "scsi_grown_defect_list": 0,
  "power_on_time": {
    "hours": 1551,
    "minutes": 32
  },
  "scsi_error_counter_log": {
    "read": {
      "errors_corrected_by_eccfast": 0,
      "errors_corrected_by_eccdelayed": 0,
      "errors_corrected_by_rereads_rewrites": 0,
      "total_errors_corrected": 0,
      "correction_algorithm_invocations": 0,
      "gigabytes_processed": "0.002",
      "total_uncorrected_errors": 0
    },
    "write": {
      "errors_corrected_by_eccfast": 0,
      "errors_corrected_by_eccdelayed": 0,
      "errors_corrected_by_rereads_rewrites": 0,
      "total_errors_corrected": 0,
      "correction_algorithm_invocations": 0,
      "gigabytes_processed": "0.121",
      "total_uncorrected_errors": 0
    }
  },
  "pending_defects": {
    "count": 0
  }
}

is this type of disk supported by smartctl exporter?

Regards,

@k0ste
Copy link
Contributor

k0ste commented Jun 13, 2024

Seems your JSON doesn't have smart attributes table
You should check, enabled SMART support for your drive or not. You can determine it via simple smartctl -a /dev/sdj

@SckyzO
Copy link
Author

SckyzO commented Jun 13, 2024

Yes, it is :

[root@mngt ~]$ smartctl -a /dev/sdj
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.18.0-513.18.1.el8_9.x86_64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SEAGATE
Product:              ST4000NM025B
Revision:             E003
Compliance:           SPC-5
User Capacity:        4,000,787,030,016 bytes [4.00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000c500ee546983
Serial number:        WQB045610000E23374ZH
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Thu Jun 13 11:48:45 2024 CEST
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Grown defects during certification <not available>
Total blocks reassigned during format <not available>
Total new blocks reassigned <not available>
Power on minutes since format <not available>
Current Drive Temperature:     32 C
Drive Trip Temperature:        60 C

Accumulated power on time, hours:minutes 1560:40
Manufactured in week 10 of year 2022
Specified cycle count over device lifetime:  50000
Accumulated start-stop cycles:  5
Specified load-unload count over device lifetime:  600000
Accumulated load-unload cycles:  6664
Elements in grown defect list: 0

Vendor (Seagate Cache) information
  Blocks sent to initiator = 4384
  Blocks received from initiator = 0
  Blocks read from cache and sent to initiator = 413892
  Number of read and write commands whose size <= segment size = 9
  Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information
  number of hours powered up = 1560.67
  number of minutes until next internal SMART test = 56

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0         0         0          0          0.002           0
write:         0        0         0         0          0          0.158           0

Non-medium error count:        0

  Pending defect count:0 Pending Defects

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
No Self-tests have been logged

@k0ste
Copy link
Contributor

k0ste commented Jun 13, 2024

Yes, it is :

[root@mngt ~]$ smartctl -a /dev/sdj
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.18.0-513.18.1.el8_9.x86_64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SEAGATE
Product:              ST4000NM025B
Revision:             E003
Compliance:           SPC-5
User Capacity:        4,000,787,030,016 bytes [4.00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000c500ee546983
Serial number:        WQB045610000E23374ZH
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Thu Jun 13 11:48:45 2024 CEST
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Grown defects during certification <not available>
Total blocks reassigned during format <not available>
Total new blocks reassigned <not available>
Power on minutes since format <not available>
Current Drive Temperature:     32 C
Drive Trip Temperature:        60 C

Accumulated power on time, hours:minutes 1560:40
Manufactured in week 10 of year 2022
Specified cycle count over device lifetime:  50000
Accumulated start-stop cycles:  5
Specified load-unload count over device lifetime:  600000
Accumulated load-unload cycles:  6664
Elements in grown defect list: 0

Vendor (Seagate Cache) information
  Blocks sent to initiator = 4384
  Blocks received from initiator = 0
  Blocks read from cache and sent to initiator = 413892
  Number of read and write commands whose size <= segment size = 9
  Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information
  number of hours powered up = 1560.67
  number of minutes until next internal SMART test = 56

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0         0         0          0          0.002           0
write:         0        0         0         0          0          0.158           0

Non-medium error count:        0

  Pending defect count:0 Pending Defects

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
No Self-tests have been logged

Do you see here SMART table? I'm not

@SckyzO
Copy link
Author

SckyzO commented Jun 13, 2024

No, I don't see any SMART Table :)

But isn't it possible to see statuses like VENDOR, FW, Proctuct, SMART Health Status, Current Drive Temperature?

I use it to monitor my system and I would like to be able to use it even to retrieve the basic status of disks. Do you think it is possible ?

@k0ste
Copy link
Contributor

k0ste commented Jun 13, 2024

Do you think it is possible ?

Good start to debug will be output of command smartctl --scan --json

@SckyzO
Copy link
Author

SckyzO commented Jun 13, 2024

Thanks for your help :)

$ sudo smartctl --scan --json
{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      1
    ],
    "svn_revision": "5022",
    "platform_info": "x86_64-linux-4.18.0-513.18.1.el8_9.x86_64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "--json"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdb",
      "info_name": "/dev/sdb",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdc",
      "info_name": "/dev/sdc",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdd",
      "info_name": "/dev/sdd",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sde",
      "info_name": "/dev/sde",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdf",
      "info_name": "/dev/sdf",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdg",
      "info_name": "/dev/sdg",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdh",
      "info_name": "/dev/sdh",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdi",
      "info_name": "/dev/sdi",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdj",
      "info_name": "/dev/sdj",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdk",
      "info_name": "/dev/sdk",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdl",
      "info_name": "/dev/sdl",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdm",
      "info_name": "/dev/sdm",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdn",
      "info_name": "/dev/sdn",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdo",
      "info_name": "/dev/sdo",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdp",
      "info_name": "/dev/sdp",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdq",
      "info_name": "/dev/sdq",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdr",
      "info_name": "/dev/sdr",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sds",
      "info_name": "/dev/sds",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdt",
      "info_name": "/dev/sdt",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdu",
      "info_name": "/dev/sdu",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdv",
      "info_name": "/dev/sdv",
      "type": "scsi",
      "protocol": "SCSI"
    }
  ]
}

@k0ste
Copy link
Contributor

k0ste commented Jun 13, 2024

Thanks for your help :)

May be your interface really SCSI, not SATA

You can try smartctl -x --json --device=scsi /dev/sdj, and will see for a SMART table

@nathanlcarlson
Copy link
Contributor

nathanlcarlson commented Aug 9, 2024

I've found this invalid JSON issue as well and found this patch https://www.smartmontools.org/changeset/5283 is included in 7.3+ of smartmontools to address it. Would it be worthwhile putting a workaround for this into the smartctl_exporter JSON parsing to better support 7.1 and 7.2 of smartmontools? Worst case the Pending defect count: isn't present and an attempt to trim it from the output is a noop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants