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

Non standard device accessors such as -d cciss,N do not work #26

Open
sempervictus opened this issue Aug 3, 2021 · 27 comments · May be fixed by #107
Open

Non standard device accessors such as -d cciss,N do not work #26

sempervictus opened this issue Aug 3, 2021 · 27 comments · May be fixed by #107

Comments

@sempervictus
Copy link

When using HPSA controllers, smartctl needs to access devices via the -d cciss,<idx> parameter. However using the following:

smartctl_exporter:
  bind_to: 0.0.0.0:9243
  url_path: /metrics
  fake_json: no
  smartctl_location: /usr/sbin/smartctl
  collect_not_more_than_period: 120s
  devices:
  - "/dev/sda -d cciss,0"
  - "/dev/sda -d cciss,1"
  - "/dev/sda -d cciss,2"
  - "/dev/sda -d cciss,3"
  - "/dev/sda -d cciss,4"

results in

[Debug] Parsed options: {{0.0.0.0:9243 /metrics %!s(bool=false) /usr/sbin/smartctl 120s 2m0s [/dev/sda -d cciss,0 /dev/sda -d cciss,1 /dev/sda -d cciss,2 /dev/sda -d cciss,3 /dev/sda -d cciss,4]}}
[Error] Device /dev/sda -d cciss,0 unavialable
[Error] Device /dev/sda -d cciss,1 unavialable
[Error] Device /dev/sda -d cciss,2 unavialable
[Error] Device /dev/sda -d cciss,3 unavialable
[Error] Device /dev/sda -d cciss,4 unavialable
panic: runtime error: index out of range [0] with length 0

goroutine 38 [running]:
main.(*SMARTctlInfo).mineVersion(0xc000080eb8)
	/mnt/Sheridan/sheridan/sheridan/smartctl_exporter/smartctlinfo.go:46 +0x942
main.(*SMARTctlInfo).Collect(...)
	/mnt/Sheridan/sheridan/sheridan/smartctl_exporter/smartctlinfo.go:35
main.SMARTctlManagerCollector.Collect(0xc000264060)
	/mnt/Sheridan/sheridan/sheridan/smartctl_exporter/main.go:37 +0x1c1
github.com/prometheus/client_golang/prometheus.DescribeByCollect.func1(0xa20840, 0xdc8010, 0xc000264060)
	/mnt/Sheridan/sheridan/sheridan/smartctl_exporter/vendor/src/github.com/prometheus/client_golang/prometheus/collector.go:90 +0x3b
created by github.com/prometheus/client_golang/prometheus.DescribeByCollect
	/mnt/Sheridan/sheridan/sheridan/smartctl_exporter/vendor/src/github.com/prometheus/client_golang/prometheus/collector.go:89 +0x75

My Go-fu isn't great (Rust FTW! :-p), and there's a fair amount of indirection through which i need to dig to resolve that locally. If its not too much trouble, would it be possible for the functionality to be implemented upstream?

@jacqueslorentz
Copy link

Hello!
@sempervictus did you find a way to manage this issue?
I am facing the same problem.
Thanks!

@kfox1111
Copy link

I just hit the same issue on some dells. I need:
-d megaraid,0

guessing the go code passes the dev directly through as one argument. May need to add a separate flag for additional command line switches to pass to smartctl.

@sempervictus
Copy link
Author

@jacqueslorentz - no, we already have a solution which covers all of these edge cases written by the mighty @daviswr as part of our Zenoss environment. All of the invocation semantics are in his ZenPack code if anyone enjoys Go enough to muck through adaptation - if it ever becomes enough of an issue to allocate time on our end, i'll rewrite the functionality in Rust 😄.

@k0ste
Copy link
Contributor

k0ste commented Oct 14, 2022

@sempervictus, seems issue may be closed, anyway config file now is unsupported 🙂

@kfox1111
Copy link

Its still an issue. there is no command line switch that makes this work. Please reopen.

@sempervictus sempervictus reopened this Oct 14, 2022
@k0ste
Copy link
Contributor

k0ste commented Oct 14, 2022

@kfox1111 can you try with last version, add the debug logs, etc
The description of this issue very outdated for now

@ondrejmo
Copy link

ondrejmo commented Oct 22, 2022

I had a similar issue with v0.8.0, it is not cause by the exporter itself, rather by smartmontools which are unable to correctly detect some irregular disk controllers. It would help if the exporter configuration allowed to add parameters to the smartctl ... commands, ideally on per drive basis. I temporarily bypassed the issue by patching readjson.go and building a custom binary/image. Just in case it helps someone, here is the patch and the Dockerfile:

FROM docker.io/library/golang:bullseye as builder

ARG SMARTCTL_EXPORTER_VERSION=0.9.0

WORKDIR /tmp

RUN git clone --branch v${SMARTCTL_EXPORTER_VERSION} --depth 1 --single-branch https://github.com/prometheus-community/smartctl_exporter.git
COPY smartctl.patch /tmp/smartctl.patch

RUN apt-get -y update && apt-get -y install --no-install-recommends \
    patch && \
    rm -rf /var/lib/apt/lists/*

RUN cd /tmp/smartctl_exporter && \
    patch readjson.go < /tmp/smartctl.patch && \
    make build && \
    mv /tmp/smartctl_exporter/smartctl_exporter /usr/local/bin/smartctl_exporter && \
    chmod +x /usr/local/bin/smartctl_exporter

FROM docker.io/library/debian:bullseye-slim

RUN apt-get -y update && apt-get -y install --no-install-recommends \
    smartmontools && \
    rm -rf /var/lib/apt/lists/*

COPY --from=builder --chown=root:root /usr/local/bin/smartctl_exporter /usr/local/bin/smartctl_exporter

EXPOSE 9633

ENTRYPOINT [ "/usr/local/bin/smartctl_exporter" ]
CMD [ "--version" ]
--- org	2022-10-21 13:01:40.379579891 +0200
+++ fix	2022-10-21 13:02:27.198645801 +0200
@@ -63,7 +63,7 @@
 // Get json from smartctl and parse it
 func readSMARTctl(logger log.Logger, device string) (gjson.Result, bool) {
 	level.Debug(logger).Log("msg", "Collecting S.M.A.R.T. counters", "device", device)
-	out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", device).Output()
+	out, err := exec.Command(*smartctlPath, "--device=sat", "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", device).Output()
 	if err != nil {
 		level.Warn(logger).Log("msg", "S.M.A.R.T. output reading", "err", err)
 	}
@@ -75,7 +75,7 @@
 
 func readSMARTctlDevices(logger log.Logger) gjson.Result {
 	level.Debug(logger).Log("msg", "Scanning for devices")
-	out, err := exec.Command(*smartctlPath, "--json", "--scan").Output()
+	out, err := exec.Command(*smartctlPath, "--device=sat", "--json", "--scan").Output()
 	if exiterr, ok := err.(*exec.ExitError); ok {
 		level.Debug(logger).Log("msg", "Exit Status", "exit_code", exiterr.ExitCode())
 		// The smartctl command returns 2 if devices are sleeping, ignore this error.

@SuperQ
Copy link
Contributor

SuperQ commented Oct 22, 2022

Part of my refactoring for the flag controls was to allow for easier adjustment of flags to the various smartctl commands.

@josefzahner
Copy link

josefzahner commented Nov 25, 2022

I'm facing probably the same issue? We do have HPSA RAID controller and we need to pass some arguments to be able to read the physical disc with smartctl.

Is it really not possible to execute the following command in smartctl-exporter? I can't believe that... any help would be really appreciated!

smartctl_output

@marciglesias
Copy link

Hello,

Any news? I need to monitor the disks behind the RAID Hardware controller, what would be the arguments to define the disks. In my case, I can see smartctl results with the following command.

smartctl -a -d megaraid,0 /dev/sg0

Thank you,

@josefzahner
Copy link

josefzahner commented Dec 16, 2022

I heard nothing and I gave up on this issue. I don't know why such an elementary issue will not be solved or even addressed.
We switched over to the "telegraf" agent with the "input exec" plugin. Below a config example for people in the same boat... I know it's another agent and a bit hacky, but it works as expected (and we had telegraf already in place).

# Read metrics from one or more commands that can output to stdout
[[inputs.exec]]
  ## Commands array
  commands = [
    "sh -c \"sudo smartctl --all --json --nocheck=never --device cciss,0 /dev/sda | jq '{\"root\": .}'\"",
    "sh -c \"sudo smartctl --all --json --nocheck=never --device cciss,1 /dev/sdb | jq '{\"root\": .}'\""
  ]

  ## Environment variables
  ## Array of "key=value" pairs to pass as environment variables
  ## e.g. "KEY=value", "USERNAME=John Doe",
  ## "LD_LIBRARY_PATH=/opt/custom/lib64:/usr/local/libs"
  # environment = []

  ## Timeout for each command to complete.
  timeout = "5s"

  interval = "120s"

  ## measurement name suffix (for separating different commands)
  # name_suffix = "_testsuffix"

  ## Data format to consume.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "json_v2"
  [[inputs.exec.json_v2]]
      measurement_name = "telegraf_smartctl"
      [[inputs.exec.json_v2.object]]
          path = "root"
          tags = ["device_name"]
          excluded_keys = ["device_info_name","device_protocol","device_type","device_type_name","device_type_scsi_terminology","form_factor_name","local_time_asctime","logical_unit_id","scsi_lb_provisioning_management_enabled_name","scsi_lb_provisioning_name","scsi_lb_provisioning_read_zeros_name","scsi_model_name"]
          [inputs.exec.json_v2.object.fields]
              scsi_start_stop_cycle_counter_week_of_manufacture = "int"
              scsi_start_stop_cycle_counter_year_of_manufacture = "int"
              scsi_error_counter_log_read_gigabytes_processed = "float"
              scsi_error_counter_log_write_gigabytes_processed = "float"
              smartctl_svn_revision = "int"

Btw. the Github issue here #89 reflects to a related problem...

@SuperQ
Copy link
Contributor

SuperQ commented Dec 17, 2022

@josefzahner This is a community project, nobody gets paid to fix this. You're welcome to open a PR to improve things.

@josefzahner
Copy link

josefzahner commented Dec 19, 2022

@SuperQ I fully get this. But please understand as well my disappointment, this thing is called "smartctl exporter" and it doesn't support a very important smartctl use case (RAID controllers with -d flag). It has multiple bugtickets here regarding this topic on github and it seems that it will be ignored since more than a year. This project and the community can do whatever they want and because of that we switched to a solution which works (telegraf). Sorry but I'm not familiar with Go, so I can't support the project here, that's why I posted the telegraf config above.

@k0ste
Copy link
Contributor

k0ste commented Dec 19, 2022

it doesn't support a very important smartctl use case (RAID controllers with -d flag)

Why you do think this is important? All RAID's for many companies decades on Linux Multi Drive - and this supported on node_exporter. For this case much important that RAW devices such a SATA & NVMe are also supported

@josefzahner
Copy link

josefzahner commented Dec 19, 2022

You are referencing to linux md (aka software RAID) right? I'm referencing to hardware RAID which doesn't use MD at all. Please check my command above, we have eg. HP RAID controllers and the disk can't be read with smartctl exporter due to the lack of the supported "-d" feature. The smartctl scan options doesn't show anything without the -d flag.

@kfox1111
Copy link

(some?) Dell controllers, even when just passing the drive through, don't work without manually specifying the -d flag to smartctl. I can't get them to work with prometheus-smartctl-exporter as is.

@k0ste
Copy link
Contributor

k0ste commented Dec 19, 2022

Dell controllers flawless work in HBA mode, for example

Product Name = PERC H330 Mini
Serial Number = 8153784
SAS Address =  5588a5a0eb40f400
PCI Address = 00:03:00:00
System Time = 12/20/2022 02:08:59
Mfg. Date = 01/09/18
Controller Time = 12/19/2022 19:08:21
FW Package Build = 25.5.9.0001
BIOS Version = 6.33.01.0_4.19.08.00_0x06120304
FW Version = 4.300.01-8369
Driver Name = megaraid_sas
Driver Version = 07.719.03.00-rh1
Current Personality = HBA-Mode
Vendor Id = 0x1000
Device Id = 0x5F
SubVendor Id = 0x1028
SubDevice Id = 0x1F4B
Host Interface = PCI-E
Device Interface = SAS-12G
Bus Number = 3
Device Number = 0
Function Number = 0
Domain ID = 0
Security Protocol = None
JBOD Drives = 13

The drives

[root@host]# lsscsi
[0:0:0:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sda
[0:0:1:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdb
[0:0:2:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdc
[0:0:3:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdd
[0:0:4:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sde
[0:0:5:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdf
[0:0:6:0]    disk    ATA      TOSHIBA HDWR160  0603  /dev/sdg
[0:0:7:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdh
[0:0:8:0]    disk    ATA      TOSHIBA HDWR160  0603  /dev/sdi
[0:0:9:0]    disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdj
[0:0:10:0]   disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdk
[0:0:11:0]   disk    ATA      TOSHIBA HDWE160  FS2A  /dev/sdl
[0:0:13:0]   disk    ATA      ADATA SP600      2.9   /dev/sdm
[0:0:32:0]   enclosu DP       BP13G+EXP        3.35  -
[N:0:0:1]    disk    INTEL SSDPEDMD400G4__1                     /dev/nvme0n1
[N:1:35:1]   disk    HUSMR7632BHP301__1                         /dev/nvme1n1
[N:2:0:1]    disk    INTEL SSDPEDMD400G4__1                     /dev/nvme2n1
[N:3:35:1]   disk    HUSMR7632BHP301__1                         /dev/nvme3n1
[N:4:35:1]   disk    HUSMR7632BHP301__1                         /dev/nvme4n1

The work of smartctl_exporter

[root@host /]# curl -Ss http://localhost:9633/metrics | grep smartctl_device\{ -c
18

@josefzahner
Copy link

That's really nice that it works on your example @k0ste . I tells us that some hardware RAIDs do work without the "-d" flag and some not.
Do you wanna say that the "-d" flag of smartctl is useless? I guess not... my HP RAID controllers doesn't show anything without the "-d" flag, so we don't get ANY output with the exporter. And it seems at least the controller of @kfox1111 as well not.
Whatever this project does, I don't care anymore, we do have another working solution in place for our servers.

@josefzahner
Copy link

josefzahner commented Dec 19, 2022

Btw your output doesn't proof a fully working solution. We have 2 SSDs, and we get the following output:

[user@mymachine ~]$ curl -Ss http://mymachine:9273/metrics | grep telegraf_smartctl.*{ -c
78

just think about it.

@kfox1111
Copy link

some cards do work without the '-d' flag. Not all combinations of firmware,card,kernel do though. It seems like -d needs to be supported by smartctl-exporter in order for maximum compatibility.

@k0ste
Copy link
Contributor

k0ste commented Dec 19, 2022

Btw your output doesn't proof a fully working solution. We have 2 SSDs, and we get the following output:

[user@mymachine ~]$ curl -Ss http://mymachine:9273/metrics | grep telegraf_smartctl.*{ -c
78

just think about it.

All for you 🙂

smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme0",firmware_version="8DV101H0",form_factor="",interface="nvme",model_family="",model_name="INTEL SSDPEDMD400G4",protocol="NVMe",sata_version="",serial_number="CVFT7206004H400LGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme1",firmware_version="KNGNP100",form_factor="",interface="nvme",model_family="",model_name="HUSMR7632BHP301",protocol="NVMe",sata_version="",serial_number="SDM0000211CD"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme2",firmware_version="8DV101H0",form_factor="",interface="nvme",model_family="",model_name="INTEL SSDPEDMD400G4",protocol="NVMe",sata_version="",serial_number="CVFT4324002Q400BGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme3",firmware_version="KNGND100",form_factor="",interface="nvme",model_family="",model_name="HUSMR7632BHP301",protocol="NVMe",sata_version="",serial_number="SDM00003A532"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme4",firmware_version="KNGND100",form_factor="",interface="nvme",model_family="",model_name="HUSMR7632BHP301",protocol="NVMe",sata_version="",serial_number="SDM00003A513"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ACS-2 (minor revision not indicated)",device="sdm",firmware_version="2.9",form_factor="< 1.8 inches",interface="sat",model_family="JMicron based SSDs",model_name="ADATA SP600",protocol="ATA",sata_version="SATA 3.1",serial_number="7F1020004374"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ACS-3 T13/2161-D revision 5",device="sdg",firmware_version="0603",form_factor="3.5 inches",interface="sat",model_family="",model_name="TOSHIBA HDWR160",protocol="ATA",sata_version="SATA 3.3",serial_number="90C0A045FDKG"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ACS-3 T13/2161-D revision 5",device="sdi",firmware_version="0603",form_factor="3.5 inches",interface="sat",model_family="",model_name="TOSHIBA HDWR160",protocol="ATA",sata_version="SATA 3.3",serial_number="9090A0AUFBNG"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sda",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="773XK11MF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdb",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="Z79BK3HTF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdc",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="X7C3KCF3F56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdd",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="X7F2KFTXF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sde",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="774DK00EF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdf",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="778YK17DF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdh",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="7747Y06LF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdj",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="X7G2KFUJF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdk",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="X7HFK5AIF56D"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="ATA8-ACS (minor revision not indicated)",device="sdl",firmware_version="FS2A",form_factor="3.5 inches",interface="sat",model_family="Toshiba X300",model_name="TOSHIBA HDWE160",protocol="ATA",sata_version="SATA 3.0",serial_number="X7HAKD5ZF56D"} 1

@josefzahner
Copy link

josefzahner commented Dec 19, 2022

Hm, your output lacks of anything which is important for us. No temperature, no failure logs, no power on time, nothing. Here is the output of smartctl (one disk)

[user@mymachine ~]$ sudo smartctl --all --nocheck=never --device cciss,0 /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-3.10.0-957.27.2.el7.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SAMSUNG
Product:              MZILT960HAHQ/007
Revision:             GXF0
Compliance:           SPC-5
User Capacity:        960,197,124,096 bytes [960 GB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Logical Unit id:      0x5002538b08c03fe0
Serial number:        S49RNY0KC00052
Device type:          disk
Transport protocol:   SAS (SPL-4)
Local Time is:        Mon Dec 19 21:25:46 2022 CET
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled
Power mode is:        ACTIVE

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

Percentage used endurance indicator: 0%
Current Drive Temperature:     31 C
Drive Trip Temperature:        70 C

Accumulated power on time, hours:minutes 14703:26
Manufactured in week 47 of year 2018
Accumulated start-stop cycles:  15
Specified load-unload count over device lifetime:  0
Accumulated load-unload cycles:  0
Elements in grown defect list: 0

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        420.584           0
write:         0        0         0         0          0        354.055           0

Non-medium error count:      974

  Pending defect count:0 Pending Defects
No Self-tests have been logged

and here the prometheus output:

telegraf_smartctl_form_factor_scsi_value{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 3
telegraf_smartctl_form_factor_scsi_value{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 3
telegraf_smartctl_local_time_time_t{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1.67147973e+09
telegraf_smartctl_local_time_time_t{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1.67147973e+09
telegraf_smartctl_logical_block_size{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 512
telegraf_smartctl_logical_block_size{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 512
telegraf_smartctl_physical_block_size{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 4096
telegraf_smartctl_physical_block_size{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 4096
telegraf_smartctl_power_on_time_hours{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 14702
telegraf_smartctl_power_on_time_hours{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 18045
telegraf_smartctl_power_on_time_minutes{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 55
telegraf_smartctl_power_on_time_minutes{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 35
telegraf_smartctl_rotation_rate{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_rotation_rate{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_correction_algorithm_invocations{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_correction_algorithm_invocations{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_errors_corrected_by_eccdelayed{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_errors_corrected_by_eccdelayed{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_errors_corrected_by_eccfast{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_errors_corrected_by_eccfast{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_errors_corrected_by_rereads_rewrites{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_errors_corrected_by_rereads_rewrites{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_gigabytes_processed{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 420.249
telegraf_smartctl_scsi_error_counter_log_read_gigabytes_processed{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 284.998
telegraf_smartctl_scsi_error_counter_log_read_total_errors_corrected{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_total_errors_corrected{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_total_uncorrected_errors{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_read_total_uncorrected_errors{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_correction_algorithm_invocations{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_correction_algorithm_invocations{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_errors_corrected_by_eccdelayed{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_errors_corrected_by_eccdelayed{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_errors_corrected_by_eccfast{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_errors_corrected_by_eccfast{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_errors_corrected_by_rereads_rewrites{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_errors_corrected_by_rereads_rewrites{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_gigabytes_processed{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 353.887
telegraf_smartctl_scsi_error_counter_log_write_gigabytes_processed{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 300.732
telegraf_smartctl_scsi_error_counter_log_write_total_errors_corrected{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_total_errors_corrected{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_total_uncorrected_errors{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_error_counter_log_write_total_uncorrected_errors{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_grown_defect_list{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_grown_defect_list{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_lb_provisioning_management_enabled_value{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1
telegraf_smartctl_scsi_lb_provisioning_management_enabled_value{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1
telegraf_smartctl_scsi_lb_provisioning_read_zeros_value{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1
telegraf_smartctl_scsi_lb_provisioning_read_zeros_value{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1
telegraf_smartctl_scsi_lb_provisioning_value{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1
telegraf_smartctl_scsi_lb_provisioning_value{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1
telegraf_smartctl_scsi_pending_defects_count{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_pending_defects_count{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_percentage_used_endurance_indicator{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_percentage_used_endurance_indicator{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_start_stop_cycle_counter_accumulated_load_unload_cycles{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_start_stop_cycle_counter_accumulated_load_unload_cycles{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_start_stop_cycle_counter_accumulated_start_stop_cycles{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 15
telegraf_smartctl_scsi_start_stop_cycle_counter_accumulated_start_stop_cycles{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 23
telegraf_smartctl_scsi_start_stop_cycle_counter_specified_load_unload_count_over_device_lifetime{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_start_stop_cycle_counter_specified_load_unload_count_over_device_lifetime{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_scsi_start_stop_cycle_counter_week_of_manufacture{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 47
telegraf_smartctl_scsi_start_stop_cycle_counter_week_of_manufacture{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 49
telegraf_smartctl_scsi_start_stop_cycle_counter_year_of_manufacture{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 2018
telegraf_smartctl_scsi_start_stop_cycle_counter_year_of_manufacture{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 2018
telegraf_smartctl_scsi_transport_protocol_value{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 6
telegraf_smartctl_scsi_transport_protocol_value{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 6
telegraf_smartctl_smartctl_exit_status{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_smartctl_exit_status{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 0
telegraf_smartctl_smartctl_svn_revision{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 5338
telegraf_smartctl_smartctl_svn_revision{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 5338
telegraf_smartctl_temperature_current{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 31
telegraf_smartctl_temperature_current{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 33
telegraf_smartctl_temperature_drive_trip{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 70
telegraf_smartctl_temperature_drive_trip{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 73
telegraf_smartctl_user_capacity_blocks{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1.875385008e+09
telegraf_smartctl_user_capacity_blocks{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 1.5002931888e+10
telegraf_smartctl_user_capacity_bytes{device_name="/dev/sda",host="mymachine",scsi_product="MZILT960HAHQ/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49RNY0KC00052",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 9.60197124096e+11
telegraf_smartctl_user_capacity_bytes{device_name="/dev/sdb",host="mymachine",scsi_product="MZILT7T6HMLA/007",scsi_revision="GXF0",scsi_transport_protocol_name="SAS (SPL-4)",scsi_vendor="SAMSUNG",scsi_version="SPC-5",serial_number="S49KNY0KC00044",smartctl_build_info="(local build)",smartctl_platform_info="x86_64-linux-3.10.0-957.27.2.el7.x86_64"} 7.681501126656e+12

I don't know what the requirements of other people are, but we wanna see as much as possible output from smartctl. This doesn't seem to be the case in your example.

@kfox1111
Copy link

args:
- --smartctl.path=/usr/sbin/smartctl
- --smartctl.interval=120s
- --smartctl.device=/dev/sda
- --web.listen-address=0.0.0.0:9633
- --web.telemetry-path=/metrics
- --log.level=debug

pod wont stay running:

[kfox@zathras ~]$ kubectl logs -n prometheus-operator kfox-test
ts=2022-12-19T20:36:08.589Z caller=main.go:94 level=info msg="Starting systemd_exporter" version="(version=0.8.0, branch=HEAD, revision=babef4a7582b2305a501db91ec9e80498251b667)"
ts=2022-12-19T20:36:08.590Z caller=main.go:95 level=info msg="Build context" build_context="(go=go1.18.7, user=root@7575c70f925c, date=20221005-16:27:40)"
ts=2022-12-19T20:36:08.590Z caller=readjson.go:66 level=debug msg="Collecting S.M.A.R.T. counters" device=/dev/sda
ts=2022-12-19T20:36:10.393Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 2"
ts=2022-12-19T20:36:10.393Z caller=readjson.go:122 level=error msg="Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode"
ts=2022-12-19T20:36:10.393Z caller=readjson.go:154 level=error msg="Smartctl open device: /dev/sda failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'"
ts=2022-12-19T20:36:10.393Z caller=main.go:57 level=error msg="Error collecting SMART data" err="smartctl returned bad data for device /dev/sda"
panic: runtime error: index out of range [0] with length 0

goroutine 12 [running]:
main.(*SMARTctlInfo).mineVersion(0xc0000b7e08)
	/app/smartctlinfo.go:59 +0xb99
main.(*SMARTctlInfo).Collect(...)
	/app/smartctlinfo.go:48
main.SMARTctlManagerCollector.Collect({{0x0, 0x0}, 0x0, {0xc0000bd130, 0x1, 0x1}, {0xa4c320, 0xc0000ee640}}, 0xc00002a1e0?)
	/app/main.go:60 +0xd2
github.com/prometheus/client_golang/prometheus.DescribeByCollect.func1()
	/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/collector.go:90 +0x2b
created by github.com/prometheus/client_golang/prometheus.DescribeByCollect
	/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/collector.go:89 +0x9c

I'm guessing the device isn't in hba mode (I didn't change it), but not sure switching that is desirable in my  case either.

@josefzahner
Copy link

Ok, that explains it - the most funny thing is that smartctl tells you to try the "-d" option :-D. So I think you got the point. I showed above what we would expect - today we are far away from that with smartctl-exporter. In our case the exporter doesn't crash, it just shows nothing

@kfox1111
Copy link

So, what needs to happen to get the -d option supported?

@SuperQ
Copy link
Contributor

SuperQ commented Jan 10, 2023

Someone needs to open a feature PR to extend the command line flags passed in various parts of the exporter.

SuperQ added a commit that referenced this issue Jan 10, 2023
Allow passing a custom `-d` / `--device=` flag to smartctl. The default
is the same (`auto`) as upstream smartctl.

Fixes: #26

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ linked a pull request Jan 10, 2023 that will close this issue
@anthonyeleven
Copy link

anthonyeleven commented Feb 27, 2023

I added some notes to the above PR. As it currently stands I do not think it completely addresses this issue.

it doesn't support a very important smartctl use case (RAID controllers with -d flag)
Why you do think this is important? All RAID's for many companies decades on Linux Multi Drive - and this supported on node_exporter. For this case much important that RAW devices such a SATA & NVMe are also supported

I personally do favor software RAID over HBA/embedded RAID, but that doesn't change the fact that many of us are stuck with legacy HP, LSI, Adaptec, Areca, etc. HBA RAID volumes.

Here's the comment I left on the above PR:

Followup to @darxriggs ' notes above:

It is entirely possible and not that uncommon for a given system to present both LSI HBA virtual devices and passed-through individual drives.

Eg. the first two drives are mirrored with the HBA and need -d megaraid,0, -d megaraid,1, but the balance of drives are passed through and are accessed as /dev/sdXX.

On at least some HBAs with some personality / mode settings, any physical drives that aren't part of a VD are passed through.

While I personally am not a fan of HBA RAID or RoC HBAs in general, we're still stuck with legacies, and some organizations embrace HBA RAID.

Ideally the exporter would iterate smartctl invocations over the results from smartctl --scan, invoking as necessary for each entry. Having to hardcode devices and access flags in a config file or on the commandline would be rather inconvenient and prone to errors -- that would require external scripting to discover devices and keep that mapping updated across inventory changes.

To the note about adding a type label for, let's call them occulted devices, I get where the suggested scheme is coming from. I don't think that's the ideal approach, though. type as a label is IMHO a misnomer, this isn't a type but rather a subunit in the vein of a LUN. I'd rather see something like device=sda,0 or device=sda.0 or device=megaraid0.0. It would be awkward to have to correlate labels for some but not all metrics, or to have to devices complex relabeling rules at Prometheus ingest.

Notes:

Dell's PERC HBAs are rebadged LSI.
A system may contain multiple HBAs of the same or different type, one might argue that metrics should reflect the HBA to which a drive is attached.

jakubgs added a commit to status-im/infra-nimbus that referenced this issue May 15, 2023
The service fails on InnovaHosting servers due to HBA controller:
prometheus-community/smartctl_exporter#26

Signed-off-by: Jakub Sokołowski <jakub@status.im>
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

Successfully merging a pull request may close this issue.

9 participants