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

Added determining device type and use it at scrape data #205

Merged
merged 3 commits into from
May 7, 2024

Conversation

zxzharmlesszxz
Copy link
Contributor

Removed smartctl.device param - smartctl.device-include/smartctl.device-exclude fully covers this Added determining device type and use it at scrape data

Maybe fix issues:
#89
#26
And no need pr
#107

@anthonyeleven
Copy link

I might be missing something -- how does this cause smartctl -dmegaraid,N to be run?

@kfox1111
Copy link

kfox1111 commented Mar 1, 2024

through the -d flag I think, but its not clear to me how device type is determined?

@anthonyeleven
Copy link

I'm thinking that the PR description isn't quite what it does.

main.go Outdated Show resolved Hide resolved
smartctl.go Outdated Show resolved Hide resolved
@zxzharmlesszxz
Copy link
Contributor Author

zxzharmlesszxz commented Mar 1, 2024

I might be missing something -- how does this cause smartctl -dmegaraid,N to be run?

No need to set any devices.
You can set device-include/device-exclude with right regex
My variant uses discovery type of device and than use it in scrape

@anthonyeleven
Copy link

I might be missing something -- how does this cause smartctl -dmegaraid,N to be run?

No need to set any devices. You can set device-include/device-exclude with right regex My variant uses discovery type of device and than use it in scrape

There is no standalone /dev/xxx entry, though. Or are you saying that one would device-include like /dev/bus/0 -d megaraid,0 or d megaraid,0 /dev/sda? Which strictly speaking aren't devices as such but smartctl commands? It would seem that this strategy would place the onus of device discovery on the admin, who has to write code to handle local conditions? I'm not arguing, I want to understand the approach here.

Personally I despise HBA RAID but I have thousands of them that aren't going away anytime soon.

Dell's BOSS-N1, notably, lacks any way to pass through plain drives, it only exposes VDs to the system.

@zxzharmlesszxz
Copy link
Contributor Author

I might be missing something -- how does this cause smartctl -dmegaraid,N to be run?

No need to set any devices. You can set device-include/device-exclude with right regex My variant uses discovery type of device and than use it in scrape

There is no standalone /dev/xxx entry, though. Or are you saying that one would device-include like /dev/bus/0 -d megaraid,0 or d megaraid,0 /dev/sda? Which strictly speaking aren't devices as such but smartctl commands? It would seem that this strategy would place the onus of device discovery on the admin, who has to write code to handle local conditions? I'm not arguing, I want to understand the approach here.

Personally I despise HBA RAID but I have thousands of them that aren't going away anytime soon.

Dell's BOSS-N1, notably, lacks any way to pass through plain drives, it only exposes VDs to the system.

Rigth now? I have situation:


/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/sde -d scsi # /dev/sde, SCSI device
/dev/sdf -d scsi # /dev/sdf, SCSI device
/dev/sdg -d scsi # /dev/sdg, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
/dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
/dev/bus/0 -d megaraid,2 # /dev/bus/0 [megaraid_disk_02], SCSI device
/dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device
/dev/bus/0 -d megaraid,4 # /dev/bus/0 [megaraid_disk_04], SCSI device
/dev/bus/0 -d megaraid,5 # /dev/bus/0 [megaraid_disk_05], SCSI device
/dev/bus/0 -d megaraid,6 # /dev/bus/0 [megaraid_disk_06], SCSI device
/dev/bus/0 -d megaraid,7 # /dev/bus/0 [megaraid_disk_07], SCSI device

where:
/dev/sdg -d scsi # /dev/sdg, SCSI device is raid0 by
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device /dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
and /dev/sdg failing any scan, but successfully read metrics by /dev/bus/0 -d megaraid,0 and /dev/bus/0 -d megaraid,1 separately.
In my realization of exporter device(-d megaraid,0; -d cassis,0;etc) automaticaly adding to smartctl cmd

@anthonyeleven
Copy link

But I don't see code that adds "-d megaraid"

@zxzharmlesszxz
Copy link
Contributor Author

zxzharmlesszxz commented Mar 1, 2024

But I don't see code that adds "-d megaraid"

func readSMARTctl(logger log.Logger, device Device) (gjson.Result, bool) {
	start := time.Now()
	out, err := exec.Command(*smartctlPath, "--json", "--info", "--health", "--attributes", "--tolerance=verypermissive", "--nocheck=standby", "--format=brief", "--log=error", device.Name, "-d", device.Type).Output()

It's "-d", device.Type

@anthonyeleven
Copy link

LGTM but I suspect that someone with more privs will need to approve/merge.

You'll also need to sign-off the commits, see the Details link next to DCO above.

smartctl.go Outdated Show resolved Hide resolved
@anthonyeleven
Copy link

anthonyeleven commented Mar 5, 2024

/opt/index/sbin/smartctl --scan
[smartctl_exporter]# /opt/index/sbin/smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
/dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
/dev/bus/0 -d megaraid,2 # /dev/bus/0 [megaraid_disk_02], SCSI device
/dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device
[smartctl_exporter]#
./smartctl_exporter --help
[smartctl_exporter]# ./smartctl_exporter --help
usage: smartctl_exporter [<flags>]


Flags:
  -h, --[no-]help                Show context-sensitive help (also try --help-long and --help-man).
      --smartctl.path="/usr/sbin/smartctl"
                                 The path to the smartctl binary
      --smartctl.interval=60s    The interval between smartctl polls
      --smartctl.rescan=10m      The interval between rescanning for new/disappeared devices. If the interval is smaller than 1s no rescanning takes place. If any devices are configured with smartctl.device also no
                                 rescanning takes place.
      --smartctl.device=SMARTCTL.DEVICE ...
                                 The device to monitor (repeatable)
      --smartctl.device-exclude=""
                                 Regexp of devices to exclude from automatic scanning. (mutually exclusive to device-include)
      --smartctl.device-include=""
                                 Regexp of devices to exclude from automatic scanning. (mutually exclusive to device-exclude)
      --web.telemetry-path="/metrics"
                                 Path under which to expose metrics
      --[no-]web.systemd-socket  Use systemd socket activation listeners instead of port listeners (Linux only).
      --web.listen-address=:9633 ...
                                 Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
      --web.config.file=""       Path to configuration file that can enable TLS or authentication. See: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
      --log.level=info           Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt        Output format of log messages. One of: [logfmt, json]
      --[no-]version             Show application version.
./smartctl_exporter --smartctl.path=/opt/index/sbin/smartctl &
[smartctl_exporter]# ./smartctl_exporter --smartctl.path=/opt/index/sbin/smartctl &
[1] 3007283
[smartctl_exporter]# ts=2024-03-05T01:04:03.354Z caller=main.go:168 level=info msg="Starting smartctl_exporter" version="(version=0.11.0, branch=master, revision=89b1bb3989c18c8c7e8646fdbf3a8bd129e38a9b)"
ts=2024-03-05T01:04:03.354Z caller=main.go:169 level=info msg="Build context" build_context="(go=go1.22.0, platform=linux/amd64, user=root@xxx, date=20240305-01:02:17, tags=unknown)"
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name=/dev/sda
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name=/dev/sdb
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name=/dev/sdc
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name=/dev/sdd
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name="/dev/bus/0 [megaraid_disk_00]"
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name="/dev/bus/0 [megaraid_disk_01]"
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name="/dev/bus/0 [megaraid_disk_02]"
ts=2024-03-05T01:04:03.373Z caller=main.go:129 level=info msg="Found device" name="/dev/bus/0 [megaraid_disk_03]"
ts=2024-03-05T01:04:03.373Z caller=main.go:173 level=info msg="Number of devices found" count=8
ts=2024-03-05T01:04:03.373Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-03-05T01:04:03.373Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
MATCH: [/dev/sda /dev/ sda]
MATCH: [/dev/sdb /dev/ sdb]

[smartctl_exporter]# MATCH: [/dev/sdc /dev/ sdc]

[smartctl_exporter]# MATCH: [/dev/sdd /dev/ sdd]
MATCH: [/dev/bus/0 [megaraid_disk_00] [SAT] /dev/bus/0 [ megaraid_disk_00]

[smartctl_exporter]# MATCH: [/dev/bus/0 [megaraid_disk_01] [SAT] /dev/bus/0 [ megaraid_disk_01]
MATCH: [/dev/bus/0 [megaraid_disk_02] [SAT] /dev/bus/0 [ megaraid_disk_02]
MATCH: [/dev/bus/0 [megaraid_disk_03] [SAT] /dev/bus/0 [ megaraid_disk_03]
ts=2024-03-05T01:04:06.716Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9633
ts=2024-03-05T01:04:06.717Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9633```
curl http://localhost:9633/metrics
[smartctl_exporter]# curl http://localhost:9633/metrics
MATCH: [/dev/sda /dev/ sda]
MATCH: [/dev/sdb /dev/ sdb]
MATCH: [/dev/sdc /dev/ sdc]
MATCH: [/dev/sdd /dev/ sdd]
MATCH: [/dev/bus/0 [megaraid_disk_00] [SAT] /dev/bus/0 [ megaraid_disk_00]
MATCH: [/dev/bus/0 [megaraid_disk_01] [SAT] /dev/bus/0 [ megaraid_disk_01]
MATCH: [/dev/bus/0 [megaraid_disk_02] [SAT] /dev/bus/0 [ megaraid_disk_02]
MATCH: [/dev/bus/0 [megaraid_disk_03] [SAT] /dev/bus/0 [ megaraid_disk_03]
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 8
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.22.0"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 1.566608e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 1.566608e+06
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 8094
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 230
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 1.611576e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 1.566608e+06
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 3.35872e+06
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 4.17792e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 12783
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 3.35872e+06
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 7.53664e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 0
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 13013
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 48000
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 62400
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 106720
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 114240
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 1.569594e+06
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 786432
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 786432
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.1688976e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 10
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.01
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 262144
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 9
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 1.4249984e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.70960064249e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1.265364992e+09
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP smartctl_device Device info
# TYPE smartctl_device gauge
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ACS-3 T13/2161-D revision 5",device="megaraid_disk_00",firmware_version="G201DL2E",form_factor="2.5 inches",interface="sat+megaraid,0",model_family="Intel 730 and DC S35x0/3610/3700 Series SSDs",model_name="INTEL SSDSC2BX200G4R",protocol="ATA",sata_version="SATA 3.1",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTHC706208H1200TGN"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="megaraid_disk_01",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,1",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="47SEKXFYF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="megaraid_disk_02",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,2",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="47RFKIMJF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="megaraid_disk_03",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,3",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="47P9KLGOF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sda",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="47RFKIMJF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdb",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="47P9KLGOF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdc",firmware_version="",form_factor="2.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTHC706208H1200TGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdd",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="47SEKXFYF"} 1
# HELP smartctl_device_attribute Device attributes
# TYPE smartctl_device_attribute gauge
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_01"} 50
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_02"} 50
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_03"} 50
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="170",attribute_name="Available_Reservd_Space",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="170",attribute_name="Available_Reservd_Space",attribute_value_type="thresh",device="megaraid_disk_00"} 10
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="170",attribute_name="Available_Reservd_Space",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="170",attribute_name="Available_Reservd_Space",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="179",attribute_name="Used_Rsvd_Blk_Cnt_Tot",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="179",attribute_name="Used_Rsvd_Blk_Cnt_Tot",attribute_value_type="thresh",device="megaraid_disk_00"} 10
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="179",attribute_name="Used_Rsvd_Blk_Cnt_Tot",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="179",attribute_name="Used_Rsvd_Blk_Cnt_Tot",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="201",attribute_name="Unknown_SSD_Attribute",attribute_value_type="raw",device="megaraid_disk_00"} 1.237593428622e+12
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="201",attribute_name="Unknown_SSD_Attribute",attribute_value_type="thresh",device="megaraid_disk_00"} 10
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="201",attribute_name="Unknown_SSD_Attribute",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="201",attribute_name="Unknown_SSD_Attribute",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="232",attribute_name="Available_Reservd_Space",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="232",attribute_name="Available_Reservd_Space",attribute_value_type="thresh",device="megaraid_disk_00"} 10
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="232",attribute_name="Available_Reservd_Space",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="232",attribute_name="Available_Reservd_Space",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="raw",device="megaraid_disk_01"} 9
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="thresh",device="megaraid_disk_00"} 1
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="thresh",device="megaraid_disk_01"} 50
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="thresh",device="megaraid_disk_02"} 50
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="thresh",device="megaraid_disk_03"} 50
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="202",attribute_name="Unknown_SSD_Attribute",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="202",attribute_name="Unknown_SSD_Attribute",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="202",attribute_name="Unknown_SSD_Attribute",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="202",attribute_name="Unknown_SSD_Attribute",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="raw",device="megaraid_disk_01"} 4301
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="raw",device="megaraid_disk_02"} 4265
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="raw",device="megaraid_disk_03"} 4316
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="thresh",device="megaraid_disk_01"} 1
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="thresh",device="megaraid_disk_02"} 1
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="thresh",device="megaraid_disk_03"} 1
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="raw",device="megaraid_disk_01"} 1.67504838688e+11
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="raw",device="megaraid_disk_02"} 1.71799805986e+11
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="raw",device="megaraid_disk_03"} 1.71799871521e+11
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Internal",attribute_value_type="raw",device="megaraid_disk_00"} 28
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Internal",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Internal",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Internal",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="181",attribute_name="Program_Fail_Cnt_Total",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="181",attribute_name="Program_Fail_Cnt_Total",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="181",attribute_name="Program_Fail_Cnt_Total",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="181",attribute_name="Program_Fail_Cnt_Total",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="182",attribute_name="Erase_Fail_Count_Total",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="182",attribute_name="Erase_Fail_Count_Total",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="182",attribute_name="Erase_Fail_Count_Total",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="182",attribute_name="Erase_Fail_Count_Total",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="197",attribute_name="Current_Pending_Sector",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="197",attribute_name="Current_Pending_Sector",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="197",attribute_name="Current_Pending_Sector",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="197",attribute_name="Current_Pending_Sector",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="10",attribute_name="Spin_Retry_Count",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_00"} 32
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_01"} 30
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_02"} 30
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_03"} 29
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="174",attribute_name="Unsafe_Shutdown_Count",attribute_value_type="raw",device="megaraid_disk_00"} 30
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="174",attribute_name="Unsafe_Shutdown_Count",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="174",attribute_name="Unsafe_Shutdown_Count",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="174",attribute_name="Unsafe_Shutdown_Count",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="180",attribute_name="Unused_Rsvd_Blk_Cnt_Tot",attribute_value_type="raw",device="megaraid_disk_00"} 5453
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="180",attribute_name="Unused_Rsvd_Blk_Cnt_Tot",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="180",attribute_name="Unused_Rsvd_Blk_Cnt_Tot",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="180",attribute_name="Unused_Rsvd_Blk_Cnt_Tot",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="raw",device="megaraid_disk_01"} 28
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="raw",device="megaraid_disk_02"} 28
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="raw",device="megaraid_disk_03"} 27
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_01"} 31
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_02"} 31
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="raw",device="megaraid_disk_03"} 30
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="195",attribute_name="Hardware_ECC_Recovered",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="195",attribute_name="Hardware_ECC_Recovered",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="195",attribute_name="Hardware_ECC_Recovered",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="195",attribute_name="Hardware_ECC_Recovered",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="raw",device="megaraid_disk_01"} 9
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="raw",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="raw",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="raw",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="value",device="megaraid_disk_01"} 200
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="value",device="megaraid_disk_02"} 200
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="value",device="megaraid_disk_03"} 200
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="worst",device="megaraid_disk_01"} 200
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="worst",device="megaraid_disk_02"} 200
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="worst",device="megaraid_disk_03"} 200
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="225",attribute_name="Host_Writes_32MiB",attribute_value_type="raw",device="megaraid_disk_00"} 2.098411e+06
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="225",attribute_name="Host_Writes_32MiB",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="225",attribute_name="Host_Writes_32MiB",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="225",attribute_name="Host_Writes_32MiB",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="226",attribute_name="Workld_Media_Wear_Indic",attribute_value_type="raw",device="megaraid_disk_00"} 102400
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="226",attribute_name="Workld_Media_Wear_Indic",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="226",attribute_name="Workld_Media_Wear_Indic",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="226",attribute_name="Workld_Media_Wear_Indic",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="227",attribute_name="Workld_Host_Reads_Perc",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="227",attribute_name="Workld_Host_Reads_Perc",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="227",attribute_name="Workld_Host_Reads_Perc",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="227",attribute_name="Workld_Host_Reads_Perc",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="228",attribute_name="Workload_Minutes",attribute_value_type="raw",device="megaraid_disk_00"} 3.786170712e+09
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="228",attribute_name="Workload_Minutes",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="228",attribute_name="Workload_Minutes",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="228",attribute_name="Workload_Minutes",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="233",attribute_name="Media_Wearout_Indicator",attribute_value_type="raw",device="megaraid_disk_00"} 2.098411e+06
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="233",attribute_name="Media_Wearout_Indicator",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="233",attribute_name="Media_Wearout_Indicator",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="233",attribute_name="Media_Wearout_Indicator",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="234",attribute_name="Thermal_Throttle",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="234",attribute_name="Thermal_Throttle",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="234",attribute_name="Thermal_Throttle",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="234",attribute_name="Thermal_Throttle",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Host_Writes_32MiB",attribute_value_type="raw",device="megaraid_disk_00"} 2.098411e+06
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Host_Writes_32MiB",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Host_Writes_32MiB",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Host_Writes_32MiB",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="raw",device="megaraid_disk_01"} 1.71969129637e+11
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="raw",device="megaraid_disk_02"} 1.71746950708e+11
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="raw",device="megaraid_disk_03"} 1.2845495357e+11
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Host_Reads_32MiB",attribute_value_type="raw",device="megaraid_disk_00"} 16492
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Host_Reads_32MiB",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Host_Reads_32MiB",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Host_Reads_32MiB",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="raw",device="megaraid_disk_01"} 5.6547880518e+10
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="raw",device="megaraid_disk_02"} 5.5573654055e+10
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="raw",device="megaraid_disk_03"} 4.0735717142e+10
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="245",attribute_name="Unknown_Attribute",attribute_value_type="raw",device="megaraid_disk_00"} 97
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="245",attribute_name="Unknown_Attribute",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="245",attribute_name="Unknown_Attribute",attribute_value_type="value",device="megaraid_disk_00"} 97
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="245",attribute_name="Unknown_Attribute",attribute_value_type="worst",device="megaraid_disk_00"} 97
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="raw",device="megaraid_disk_01"} 31
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="raw",device="megaraid_disk_02"} 31
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="raw",device="megaraid_disk_03"} 30
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="value",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="value",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="value",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="worst",device="megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="worst",device="megaraid_disk_02"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="worst",device="megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="raw",device="megaraid_disk_00"} 48406
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="raw",device="megaraid_disk_01"} 48485
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="raw",device="megaraid_disk_02"} 48486
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="raw",device="megaraid_disk_03"} 48470
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="thresh",device="megaraid_disk_01"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="thresh",device="megaraid_disk_02"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="thresh",device="megaraid_disk_03"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="value",device="megaraid_disk_01"} 1
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="value",device="megaraid_disk_02"} 1
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="value",device="megaraid_disk_03"} 1
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="worst",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="worst",device="megaraid_disk_01"} 1
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="worst",device="megaraid_disk_02"} 1
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="worst",device="megaraid_disk_03"} 1
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate",attribute_flags_short="-OSR--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="raw",device="megaraid_disk_00"} 1.140703e+07
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate",attribute_flags_short="-OSR--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_00"} 39
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate",attribute_flags_short="-OSR--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="value",device="megaraid_disk_00"} 130
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate",attribute_flags_short="-OSR--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="worst",device="megaraid_disk_00"} 130
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count",attribute_flags_short="-OSRC-",attribute_id="13",attribute_name="Read_Soft_Error_Rate",attribute_value_type="raw",device="megaraid_disk_00"} 1.140703e+07
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count",attribute_flags_short="-OSRC-",attribute_id="13",attribute_name="Read_Soft_Error_Rate",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count",attribute_flags_short="-OSRC-",attribute_id="13",attribute_name="Read_Soft_Error_Rate",attribute_value_type="value",device="megaraid_disk_00"} 130
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count",attribute_flags_short="-OSRC-",attribute_id="13",attribute_name="Read_Soft_Error_Rate",attribute_value_type="worst",device="megaraid_disk_00"} 130
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="raw",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="thresh",device="megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="value",device="megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="worst",device="megaraid_disk_00"} 100
# HELP smartctl_device_block_size Device block size
# TYPE smartctl_device_block_size gauge
smartctl_device_block_size{blocks_type="logical",device="megaraid_disk_00"} 512
smartctl_device_block_size{blocks_type="logical",device="megaraid_disk_01"} 512
smartctl_device_block_size{blocks_type="logical",device="megaraid_disk_02"} 512
smartctl_device_block_size{blocks_type="logical",device="megaraid_disk_03"} 512
smartctl_device_block_size{blocks_type="logical",device="sda"} 512
smartctl_device_block_size{blocks_type="logical",device="sdb"} 512
smartctl_device_block_size{blocks_type="logical",device="sdc"} 512
smartctl_device_block_size{blocks_type="logical",device="sdd"} 512
smartctl_device_block_size{blocks_type="physical",device="megaraid_disk_00"} 4096
smartctl_device_block_size{blocks_type="physical",device="megaraid_disk_01"} 512
smartctl_device_block_size{blocks_type="physical",device="megaraid_disk_02"} 512
smartctl_device_block_size{blocks_type="physical",device="megaraid_disk_03"} 512
smartctl_device_block_size{blocks_type="physical",device="sda"} 0
smartctl_device_block_size{blocks_type="physical",device="sdb"} 0
smartctl_device_block_size{blocks_type="physical",device="sdc"} 4096
smartctl_device_block_size{blocks_type="physical",device="sdd"} 0
# HELP smartctl_device_capacity_blocks Device capacity in blocks
# TYPE smartctl_device_capacity_blocks gauge
smartctl_device_capacity_blocks{device="megaraid_disk_00"} 3.90721968e+08
smartctl_device_capacity_blocks{device="megaraid_disk_01"} 1.953525168e+09
smartctl_device_capacity_blocks{device="megaraid_disk_02"} 1.953525168e+09
smartctl_device_capacity_blocks{device="megaraid_disk_03"} 1.953525168e+09
smartctl_device_capacity_blocks{device="sda"} 1.953525168e+09
smartctl_device_capacity_blocks{device="sdb"} 1.953525168e+09
smartctl_device_capacity_blocks{device="sdc"} 3.90721968e+08
smartctl_device_capacity_blocks{device="sdd"} 1.953525168e+09
# HELP smartctl_device_capacity_bytes Device capacity in bytes
# TYPE smartctl_device_capacity_bytes gauge
smartctl_device_capacity_bytes{device="megaraid_disk_00"} 2.00049647616e+11
smartctl_device_capacity_bytes{device="megaraid_disk_01"} 1.000204886016e+12
smartctl_device_capacity_bytes{device="megaraid_disk_02"} 1.000204886016e+12
smartctl_device_capacity_bytes{device="megaraid_disk_03"} 1.000204886016e+12
smartctl_device_capacity_bytes{device="sda"} 1.000204886016e+12
smartctl_device_capacity_bytes{device="sdb"} 1.000204886016e+12
smartctl_device_capacity_bytes{device="sdc"} 2.00049647616e+11
smartctl_device_capacity_bytes{device="sdd"} 1.000204886016e+12
# HELP smartctl_device_error_log_count Device SMART error log count
# TYPE smartctl_device_error_log_count gauge
smartctl_device_error_log_count{device="megaraid_disk_00",error_log_type="summary"} 0
smartctl_device_error_log_count{device="megaraid_disk_01",error_log_type="summary"} 0
smartctl_device_error_log_count{device="megaraid_disk_02",error_log_type="summary"} 0
smartctl_device_error_log_count{device="megaraid_disk_03",error_log_type="summary"} 0
# HELP smartctl_device_interface_speed Device interface speed, bits per second
# TYPE smartctl_device_interface_speed gauge
smartctl_device_interface_speed{device="megaraid_disk_00",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_00",speed_type="max"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_01",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_01",speed_type="max"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_02",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_02",speed_type="max"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_03",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="megaraid_disk_03",speed_type="max"} 6e+09
# HELP smartctl_device_power_cycle_count Device power cycle count
# TYPE smartctl_device_power_cycle_count counter
smartctl_device_power_cycle_count{device="megaraid_disk_00"} 32
smartctl_device_power_cycle_count{device="megaraid_disk_01"} 30
smartctl_device_power_cycle_count{device="megaraid_disk_02"} 30
smartctl_device_power_cycle_count{device="megaraid_disk_03"} 29
# HELP smartctl_device_power_on_seconds Device power on seconds
# TYPE smartctl_device_power_on_seconds counter
smartctl_device_power_on_seconds{device="megaraid_disk_00"} 1.742616e+08
smartctl_device_power_on_seconds{device="megaraid_disk_01"} 1.74546e+08
smartctl_device_power_on_seconds{device="megaraid_disk_02"} 1.745496e+08
smartctl_device_power_on_seconds{device="megaraid_disk_03"} 1.74492e+08
# HELP smartctl_device_rotation_rate Device rotation rate
# TYPE smartctl_device_rotation_rate gauge
smartctl_device_rotation_rate{device="megaraid_disk_01"} 7200
smartctl_device_rotation_rate{device="megaraid_disk_02"} 7200
smartctl_device_rotation_rate{device="megaraid_disk_03"} 7200
smartctl_device_rotation_rate{device="sda"} 7200
smartctl_device_rotation_rate{device="sdb"} 7200
smartctl_device_rotation_rate{device="sdd"} 7200
# HELP smartctl_device_smart_status General smart status
# TYPE smartctl_device_smart_status gauge
smartctl_device_smart_status{device="megaraid_disk_00"} 1
smartctl_device_smart_status{device="megaraid_disk_01"} 1
smartctl_device_smart_status{device="megaraid_disk_02"} 1
smartctl_device_smart_status{device="megaraid_disk_03"} 1
smartctl_device_smart_status{device="sda"} 1
smartctl_device_smart_status{device="sdb"} 1
smartctl_device_smart_status{device="sdc"} 1
smartctl_device_smart_status{device="sdd"} 1
# HELP smartctl_device_smartctl_exit_status Exit status of smartctl on device
# TYPE smartctl_device_smartctl_exit_status gauge
smartctl_device_smartctl_exit_status{device="megaraid_disk_00"} 0
smartctl_device_smartctl_exit_status{device="megaraid_disk_01"} 0
smartctl_device_smartctl_exit_status{device="megaraid_disk_02"} 0
smartctl_device_smartctl_exit_status{device="megaraid_disk_03"} 0
smartctl_device_smartctl_exit_status{device="sda"} 0
smartctl_device_smartctl_exit_status{device="sdb"} 0
smartctl_device_smartctl_exit_status{device="sdc"} 0
smartctl_device_smartctl_exit_status{device="sdd"} 0
# HELP smartctl_device_temperature Device temperature celsius
# TYPE smartctl_device_temperature gauge
smartctl_device_temperature{device="megaraid_disk_00",temperature_type="current"} 28
smartctl_device_temperature{device="megaraid_disk_01",temperature_type="current"} 32
smartctl_device_temperature{device="megaraid_disk_02",temperature_type="current"} 34
smartctl_device_temperature{device="megaraid_disk_03",temperature_type="current"} 33
smartctl_device_temperature{device="sda",temperature_type="current"} 34
smartctl_device_temperature{device="sdb",temperature_type="current"} 33
smartctl_device_temperature{device="sdc",temperature_type="current"} 28
smartctl_device_temperature{device="sdd",temperature_type="current"} 32
# HELP smartctl_devices Number of devices configured or dynamically discovered
# TYPE smartctl_devices gauge
smartctl_devices 8
# HELP smartctl_version smartctl version
# TYPE smartctl_version gauge
smartctl_version{build_info="(local build)",json_format_version="1.0",smartctl_version="7.3",svn_revision="5338"} 1

@anthonyeleven
Copy link

anthonyeleven commented Mar 5, 2024

# /opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show
CLI Version = 007.2408.0000.0000 Nov 15, 2022
Operating system = Linux 5.18.15-1.el8.elrepo.x86_64
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.


Drive Information :
=================

----------------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model                Sp Type
----------------------------------------------------------------------------------
32:0      0 JBOD  -  186.310 GB SATA SSD N   N  512B INTEL SSDSC2BX200G4R U  -
32:1      1 JBOD  -  931.512 GB SATA HDD N   N  512B TOSHIBA MG03ACA100   U  -
32:2      2 JBOD  -  931.512 GB SATA HDD N   N  512B TOSHIBA MG03ACA100   U  -
32:3      3 JBOD  -  931.512 GB SATA HDD N   N  512B TOSHIBA MG03ACA100   U  -
----------------------------------------------------------------------------------


# /opt/index/sbin/smartctl -a -dmegaraid,0 /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.18.15-1.el8.elrepo.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Intel 730 and DC S35x0/3610/3700 Series SSDs
Device Model:     INTEL SSDSC2BX200G4R
Serial Number:    BTHC706208H1200TGN
LU WWN Device Id: 5 5cd2e4 14da4858f
Add. Product Id:  DELL(tm)
Firmware Version: G201DL2E
User Capacity:    200,049,647,616 bytes [200 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Mar  5 01:20:36 2024 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: ATA return descriptor not supported by controller firmware
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

General SMART Values:
Offline data collection status:  (0x02)	Offline data collection activity
					was completed without error.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever
					been run.
Total time to complete Offline
data collection: 		(    2) seconds.
Offline data collection
capabilities: 			 (0x79) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 (  60) minutes.
Conveyance self-test routine
recommended polling time: 	 (  60) minutes.
SCT capabilities: 	       (0x003d)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000e   130   130   039    Old_age   Always       -       11408566
  5 Reallocated_Sector_Ct   0x0033   100   100   001    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       48407
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       32
 13 Read_Soft_Error_Rate    0x001e   130   130   000    Old_age   Always       -       11408566
170 Available_Reservd_Space 0x0033   100   100   010    Pre-fail  Always       -       0
174 Unsafe_Shutdown_Count   0x0032   100   100   000    Old_age   Always       -       30
179 Used_Rsvd_Blk_Cnt_Tot   0x0033   100   100   010    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0032   100   100   000    Old_age   Always       -       5453
181 Program_Fail_Cnt_Total  0x003a   100   100   000    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x003a   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   000    Old_age   Always       -       0
194 Temperature_Internal    0x0022   100   100   000    Old_age   Always       -       28
195 Hardware_ECC_Recovered  0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
201 Unknown_SSD_Attribute   0x0033   100   100   010    Pre-fail  Always       -       1237594477198
202 Unknown_SSD_Attribute   0x0027   100   100   000    Pre-fail  Always       -       0
225 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       2098414
226 Workld_Media_Wear_Indic 0x0032   100   100   000    Old_age   Always       -       102400
227 Workld_Host_Reads_Perc  0x0032   100   100   000    Old_age   Always       -       0
228 Workload_Minutes        0x0032   100   100   000    Old_age   Always       -       3786170728
232 Available_Reservd_Space 0x0033   100   100   010    Pre-fail  Always       -       0
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age   Always       -       2098414
234 Thermal_Throttle        0x0032   100   100   000    Old_age   Always       -       0/0
241 Host_Writes_32MiB       0x0032   100   100   000    Old_age   Always       -       2098414
242 Host_Reads_32MiB        0x0032   100   100   000    Old_age   Always       -       16492
245 Unknown_Attribute       0x0032   097   097   000    Old_age   Always       -       97

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%         3         -
# 2  Extended offline    Completed without error       00%         1         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

@NiceGuyIT
Copy link
Member

@zxzharmlesszxz Before this can be merged, you will need to sign all commits. Visit the checks tab and follow the instructions.

To help with testing, can you provide the output of smartctl --scan --json? Put the output in spoilers to improve readability.

How long time to wait merge?

We are all volunteers. Please be patient with the review and merge process.

@zxzharmlesszxz zxzharmlesszxz changed the title Added determining device type and use it at scrape data Signed-off-by: Denys <zxzharmlesszxz@gmail.com> Added determining device type and use it at scrape data Mar 5, 2024
@zxzharmlesszxz zxzharmlesszxz changed the title Signed-off-by: Denys <zxzharmlesszxz@gmail.com> Added determining device type and use it at scrape data Added determining device type and use it at scrape data Mar 5, 2024
@robbat2
Copy link
Contributor

robbat2 commented Mar 6, 2024

@zxzharmlesszxz something that @NiceGuyIT didn't say, but would make the process MUCH easier is rebasing this onto the upstream master, to one or more logically separate commits.

#168 is an example where I fixed the SCSI/SAS metrics & labels.

I'm going to include more comments inline to your most recent changes.

main.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@NiceGuyIT
Copy link
Member

/opt/index/sbin/smartctl --scan
./smartctl_exporter --help
./smartctl_exporter --smartctl.path=/opt/index/sbin/smartctl &
curl http://localhost:9633/metrics

Hi @anthonyeleven, I added spoilers to your comment to reduce the scrolling.

@NiceGuyIT
Copy link
Member

@zxzharmlesszxz something that @NiceGuyIT didn't say, but would make the process MUCH easier is rebasing this onto the upstream master, to one or more logically separate commits.

#168 is an example where I fixed the SCSI/SAS metrics & labels.

I'm going to include more comments inline to your most recent changes.

Thank you @robbat2 for mentoring @zxzharmlesszxz with this PR.

@zxzharmlesszxz It may seem daunting to submit changes to a project when you're not an experienced developer; stick with it and the result will be worth it. As you saw in PR #107, this is not an easy fix. Other people's comments are to make sure we don't break X when fixing Y. Keep with it. 👍 You'll get there.

@anthonyeleven
Copy link

spoiler
Ack, I'd not known that was a thing.

@zxzharmlesszxz
Copy link
Contributor Author

@zxzharmlesszxz something that @NiceGuyIT didn't say, but would make the process MUCH easier is rebasing this onto the upstream master, to one or more logically separate commits.
#168 is an example where I fixed the SCSI/SAS metrics & labels.
I'm going to include more comments inline to your most recent changes.

Thank you @robbat2 for mentoring @zxzharmlesszxz with this PR.

@zxzharmlesszxz It may seem daunting to submit changes to a project when you're not an experienced developer; stick with it and the result will be worth it. As you saw in PR #107, this is not an easy fix. Other people's comments are to make sure we don't break X when fixing Y. Keep with it. 👍 You'll get there.

In PR #107 method to specify type only for one device but how to make this for multiple?
In this PR #205 I made changes for auto discover types of devices and than use it in scraping.
Today I made little bit fixes of code.
Please give me more information about what I must do now

@anthonyeleven
Copy link

anthonyeleven commented May 4, 2024 via email

Signed-off-by: David Randall <David@NiceGuyIT.biz>
@NiceGuyIT
Copy link
Member

@anthonyeleven Completely understand the lack of time. This PR is ready to merge unless you find something.

@anthonyeleven
Copy link

System with PERC H330 (LSI) HBA and 4x passthrough drives, using OS's smartmontools 7.1
[root@prom-test smartctl_exporter]# ./smartctl_exporter
ts=2024-05-06T17:38:23.627Z caller=main.go:167 level=info msg="Starting smartctl_exporter" version="(version=0.12.0, branch=master, revision=391aae38e4c93eadadf51cf20379af71c9251714)"
ts=2024-05-06T17:38:23.627Z caller=main.go:168 level=info msg="Build context" build_context="(go=go1.22.2, platform=linux/amd64, user=root@prom-test.tor3.indexww.com, date=20240506-17:36:24, tags=unknown)"
ts=2024-05-06T17:38:23.681Z caller=main.go:128 level=info msg="Found device" name=sda
...
ts=2024-05-06T17:38:23.682Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_00
...
ts=2024-05-06T17:38:23.682Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_03
ts=2024-05-06T17:38:23.682Z caller=main.go:172 level=info msg="Number of devices found" count=8
ts=2024-05-06T17:38:23.682Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-05-06T17:38:23.682Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-06T17:38:25.114Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_00
ts=2024-05-06T17:38:25.114Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_00
ts=2024-05-06T17:38:25.255Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_01
ts=2024-05-06T17:38:25.255Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_01
ts=2024-05-06T17:38:25.395Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_02
ts=2024-05-06T17:38:25.395Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_02
ts=2024-05-06T17:38:25.535Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_03
ts=2024-05-06T17:38:25.535Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_03
ts=2024-05-06T17:38:25.538Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9633
ts=2024-05-06T17:38:25.538Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9633
^C
[root@prom-test smartctl_exporter]# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
..
/dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device
  
Above system using smartmontools 7.3
[root@prom-test smartctl_exporter]# ./smartctl_exporter --smartctl.path=/opt/index/sbin/smartctl &
[1] 1536866
[root@prom-test smartctl_exporter]# ts=2024-05-06T17:49:30.825Z caller=main.go:167 level=info msg="Starting smartctl_exporter" version="(version=0.12.0, branch=master, revision=391aae38e4c93eadadf51cf20379af71c9251714)"
ts=2024-05-06T17:49:30.825Z caller=main.go:168 level=info msg="Build context" build_context="(go=go1.22.2, platform=linux/amd64, user=root@prom-test.tor3.indexww.com, date=20240506-17:36:24, tags=unknown)"
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=sda
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=sdb
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=sdc
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=sdd
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_00
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_01
ts=2024-05-06T17:49:30.856Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_02
ts=2024-05-06T17:49:30.857Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_03
ts=2024-05-06T17:49:30.857Z caller=main.go:172 level=info msg="Number of devices found" count=8
ts=2024-05-06T17:49:30.857Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-05-06T17:49:30.857Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-06T17:49:32.604Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9633
ts=2024-05-06T17:49:32.604Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9633

[root@prom-test smartctl_exporter]# curl http://localhost:9633/metrics
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
...
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP smartctl_device Device info
# TYPE smartctl_device gauge
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_00",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,0",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIVAF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_01",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,1",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H3K3RTF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_02",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,2",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H2K9TRF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_03",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,3",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIV0F"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sda",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIVAF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdb",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIV0F"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdc",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H3K3RTF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdd",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H2K9TRF"} 1
# HELP smartctl_device_attribute Device attributes
# TYPE smartctl_device_attribute gauge
smartctl_device_attribute{attribute_flags_long="event_count,auto_keep",attribute_flags_short="----CK",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="2",attribute_name="Throughput_Performance",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="performance",attribute_flags_short="--S---",attribute_id="8",attribute_name="Seek_Time_Performance",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="worst",device="bus_0_megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="3",attribute_name="Spin_Up_Time",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 4276
...
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 1.63209740316e+11
...
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate",attribute_flags_short="-O-R--",attribute_id="7",attribute_name="Seek_Error_Rate",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="12",attribute_name="Power_Cycle_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 58
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 56
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="192",attribute_name="Power-Off_Retract_Count",attribute_value_type="worst",device="bus_0_megaraid_disk_03"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="193",attribute_name="Load_Cycle_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 59
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="196",attribute_name="Reallocated_Event_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="199",attribute_name="UDMA_CRC_Error_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_01"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="241",attribute_name="Total_LBAs_Written",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 2.39021285364e+11
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="4",attribute_name="Start_Stop_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 58
...
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="worst",device="bus_0_megaraid_disk_03"} 1
# HELP smartctl_device_block_size Device block size

smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_00"} 512
..
smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_03"} 512
smartctl_device_block_size{blocks_type="logical",device="sda"} 512
..
smartctl_device_block_size{blocks_type="logical",device="sdd"} 512
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_00"} 512
..
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_03"} 512
...
smartctl_device_block_size{blocks_type="physical",device="sdd"} 0
# HELP smartctl_device_capacity_blocks Device capacity in blocks

smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_00"} 1.953525168e+09
..
smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_03"} 1.953525168e+09
smartctl_device_capacity_blocks{device="sda"} 1.953525168e+09
..
smartctl_device_capacity_blocks{device="sdd"} 1.953525168e+09
# HELP smartctl_device_capacity_bytes Device capacity in bytes

smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_00"} 1.000204886016e+12
..
smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_03"} 1.000204886016e+12
smartctl_device_capacity_bytes{device="sda"} 1.000204886016e+12
..
smartctl_device_capacity_bytes{device="sdd"} 1.000204886016e+12
# HELP smartctl_device_error_log_count Device SMART error log count

smartctl_device_error_log_count{device="bus_0_megaraid_disk_00",error_log_type="summary"} 0
..
smartctl_device_error_log_count{device="bus_0_megaraid_disk_03",error_log_type="summary"} 0
# HELP smartctl_device_interface_speed Device interface speed, bits per second

smartctl_device_interface_speed{device="bus_0_megaraid_disk_00",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="bus_0_megaraid_disk_00",speed_type="max"} 6e+09
..
# HELP smartctl_device_power_cycle_count Device power cycle count

smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_00"} 58
..
smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_03"} 60
# HELP smartctl_device_power_on_seconds Device power on seconds

smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_00"} 2.242188e+08
..
# HELP smartctl_device_rotation_rate Device rotation rate

smartctl_device_rotation_rate{device="bus_0_megaraid_disk_00"} 7200
..
smartctl_device_rotation_rate{device="bus_0_megaraid_disk_03"} 7200
smartctl_device_rotation_rate{device="sda"} 7200
..
smartctl_device_rotation_rate{device="sdd"} 7200
# HELP smartctl_device_smart_status General smart status

smartctl_device_smart_status{device="bus_0_megaraid_disk_00"} 1
..
smartctl_device_smart_status{device="bus_0_megaraid_disk_03"} 1
smartctl_device_smart_status{device="sda"} 1
..
smartctl_device_smart_status{device="sdd"} 1
# HELP smartctl_device_smartctl_exit_status Exit status of smartctl on device

smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_00"} 0
..
smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_03"} 0
smartctl_device_smartctl_exit_status{device="sda"} 0
...
smartctl_device_smartctl_exit_status{device="sdd"} 0
# HELP smartctl_device_temperature Device temperature celsius

smartctl_device_temperature{device="bus_0_megaraid_disk_00",temperature_type="current"} 28
..
smartctl_device_temperature{device="bus_0_megaraid_disk_03",temperature_type="current"} 27
smartctl_device_temperature{device="sda",temperature_type="current"} 28
..
smartctl_device_temperature{device="sdd",temperature_type="current"} 28
# HELP smartctl_devices Number of devices configured or dynamically discovered
...
smartctl_devices 8
# HELP smartctl_version smartctl version

smartctl_version{build_info="(local build)",json_format_version="1.0",smartctl_version="7.3",svn_revision="5338"} 1
[root@prom-test smartctl_exporter]#
System with PERC H740P mini (LSI) HBA, 2x VD drives, NVMe drives
[root@pro-va-1 tmp]# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
/dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device
..
/dev/nvme5 -d nvme # /dev/nvme5, NVMe device
[root@pro-va-1 tmp]# ./smartctl_exporter
ts=2024-05-06T17:43:48.948Z caller=main.go:167 level=info msg="Starting smartctl_exporter" version="(version=0.12.0, branch=master, revision=391aae38e4c93eadadf51cf20379af71c9251714)"
ts=2024-05-06T17:43:48.948Z caller=main.go:168 level=info msg="Build context" build_context="(go=go1.22.2, platform=linux/amd64, user=root@prom-test.tor3.indexww.com, date=20240506-17:36:24, tags=unknown)"
ts=2024-05-06T17:43:48.977Z caller=main.go:128 level=info msg="Found device" name=sda
ts=2024-05-06T17:43:48.977Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_00
ts=2024-05-06T17:43:48.977Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_01
ts=2024-05-06T17:43:48.978Z caller=main.go:128 level=info msg="Found device" name=nvme0
ts=2024-05-06T17:43:48.978Z caller=main.go:128 level=info msg="Found device" name=nvme1
ts=2024-05-06T17:43:48.978Z caller=main.go:128 level=info msg="Found device" name=nvme2
ts=2024-05-06T17:43:48.978Z caller=main.go:128 level=info msg="Found device" name=nvme3
ts=2024-05-06T17:43:48.978Z caller=main.go:128 level=info msg="Found device" name=nvme4
ts=2024-05-06T17:43:48.978Z caller=main.go:128 level=info msg="Found device" name=nvme5
ts=2024-05-06T17:43:48.978Z caller=main.go:172 level=info msg="Number of devices found" count=9
ts=2024-05-06T17:43:48.978Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-05-06T17:43:48.978Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-06T17:43:49.078Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_00
ts=2024-05-06T17:43:49.078Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_00
ts=2024-05-06T17:43:49.120Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_01
ts=2024-05-06T17:43:49.120Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_01
ts=2024-05-06T17:43:49.281Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9633
ts=2024-05-06T17:43:49.281Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9633


[root@pro-va-1 tmp]# curl http://localhost:9633/metrics
ts=2024-05-06T17:46:42.477Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_00
ts=2024-05-06T17:46:42.478Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_00
ts=2024-05-06T17:46:42.509Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_01
ts=2024-05-06T17:46:42.509Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_01
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.


# HELP smartctl_device Device info

smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ACS-3 T13/2161-D revision 5",device="bus_0_megaraid_disk_00",firmware_version="XCV1DL69",form_factor="2.5 inches",interface="sat+megaraid,0",model_family="Dell Certified Intel S4x00/D3-S4x10 Series SSDs",model_name="SSDSC2KG240G8R",protocol="ATA",sata_version="SATA 3.2",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTYG915601ZV240AGN"} 1
...
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme5",firmware_version="VDV1DP25",form_factor="",interface="nvme",model_family="unknown",model_name="Dell Express Flash NVMe P4610 1.6TB SFF",protocol="NVMe",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTLN92130F2P1P6AGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sda",firmware_version="",form_factor="",interface="scsi",model_family="unknown",model_name="DELL PERC H740P Mini",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="SPC-3",serial_number="003dea0629570fcb2400ac3470f098cd"} 1
# HELP smartctl_device_attribute Device attributes
# TYPE smartctl_device_attribute gauge
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="235",attribute_name="Unknown_Attribute",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 3.867284e+06
...
smartctl_device_attribute{attribute_flags_long="updated_online,auto_keep",attribute_flags_short="-O---K",attribute_id="194",attribute_name="Temperature_Celsius",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="181",attribute_name="Program_Fail_Cnt_Total",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="182",attribute_name="Erase_Fail_Count_Total",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="173",attribute_name="Unknown_Attribute",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 96
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="175",attribute_name="Program_Fail_Count_Chip",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 426

...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="197",attribute_name="Current_Pending_Sector",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="174",attribute_name="Unsafe_Shutdown_Count",attribute_value_type="raw",device="bus_0_megaraid_disk_01"} 23
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="195",attribute_name="Uncorrectable_Error_Cnt",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="233",attribute_name="Total_LBAs_Written",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 3.867284e+06
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="234",attribute_name="Thermal_Throttle_Status",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100

...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="242",attribute_name="Total_LBAs_Read",attribute_value_type="worst",device="bus_0_megaraid_disk_00"} 100
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="9",attribute_name="Power_On_Hours",attribute_value_type="thresh",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate",attribute_flags_short="-OSR--",attribute_id="1",attribute_name="Raw_Read_Error_Rate",attribute_value_type="value",device="bus_0_megaraid_disk_01"} 130
...
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count",attribute_flags_short="-OSRC-",attribute_id="13",attribute_name="Read_Soft_Error_Rate",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 80
...
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="worst",device="bus_0_megaraid_disk_00"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
# HELP smartctl_device_available_spare Normalized percentage (0 to 100%) of the remaining spare capacity available

smartctl_device_available_spare{device="nvme0"} 100
...
smartctl_device_available_spare{device="nvme5"} 100
# HELP smartctl_device_available_spare_threshold When the Available Spare falls below the threshold indicated in this field, an asynchronous event completion may occur. The value is indicated as a normalized percentage (0 to 100%)

smartctl_device_available_spare_threshold{device="nvme0"} 10
...
smartctl_device_available_spare_threshold{device="nvme5"} 10
# HELP smartctl_device_block_size Device block size

smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_00"} 512
smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_01"} 512
smartctl_device_block_size{blocks_type="logical",device="nvme0"} 512
...
smartctl_device_block_size{blocks_type="logical",device="nvme5"} 512
smartctl_device_block_size{blocks_type="logical",device="sda"} 512
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_00"} 4096

smartctl_device_block_size{blocks_type="physical",device="nvme0"} 0
...
smartctl_device_block_size{blocks_type="physical",device="nvme5"} 0
smartctl_device_block_size{blocks_type="physical",device="sda"} 0
# HELP smartctl_device_bytes_read

smartctl_device_bytes_read{device="nvme0"} 9.498565006848e+15
...
smartctl_device_bytes_read{device="nvme5"} 1.441513101824e+15
# HELP smartctl_device_bytes_written

smartctl_device_bytes_written{device="nvme0"} 8.198106437632e+15
...
smartctl_device_bytes_written{device="nvme5"} 1.418306366976e+15
# HELP smartctl_device_capacity_blocks Device capacity in blocks

smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_00"} 4.68862128e+08

smartctl_device_capacity_blocks{device="nvme0"} 3.125627568e+09
...
smartctl_device_capacity_blocks{device="nvme5"} 3.125627568e+09
smartctl_device_capacity_blocks{device="sda"} 4.67664896e+08
# HELP smartctl_device_capacity_bytes Device capacity in bytes

smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_00"} 2.40057409536e+11

smartctl_device_capacity_bytes{device="nvme0"} 1.600321314816e+12
...
smartctl_device_capacity_bytes{device="nvme5"} 1.600321314816e+12
smartctl_device_capacity_bytes{device="sda"} 2.39444426752e+11
# HELP smartctl_device_critical_warning This field indicates critical warnings for the state of the controller

smartctl_device_critical_warning{device="nvme0"} 0
...
smartctl_device_critical_warning{device="nvme5"} 0
# HELP smartctl_device_interface_speed Device interface speed, bits per second

smartctl_device_interface_speed{device="bus_0_megaraid_disk_00",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="bus_0_megaraid_disk_00",speed_type="max"} 6e+09
...
# HELP smartctl_device_media_errors Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field

smartctl_device_media_errors{device="nvme0"} 0
...
smartctl_device_media_errors{device="nvme5"} 0
# HELP smartctl_device_num_err_log_entries Contains the number of Error Information log entries over the life of the controller

smartctl_device_num_err_log_entries{device="nvme0"} 0
...
smartctl_device_num_err_log_entries{device="nvme5"} 0
# HELP smartctl_device_nvme_capacity_bytes NVMe device total capacity bytes

smartctl_device_nvme_capacity_bytes{device="nvme0"} 1.600321314816e+12
...
smartctl_device_nvme_capacity_bytes{device="nvme5"} 1.600321314816e+12
# HELP smartctl_device_percentage_used Device write percentage used

smartctl_device_percentage_used{device="nvme0"} 42
...
smartctl_device_percentage_used{device="nvme5"} 7
# HELP smartctl_device_power_cycle_count Device power cycle count

smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_00"} 27
smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_01"} 27
smartctl_device_power_cycle_count{device="nvme0"} 27
...
smartctl_device_power_cycle_count{device="nvme5"} 17
# HELP smartctl_device_power_on_seconds Device power on seconds

smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_00"} 1.497888e+08
smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_01"} 1.497888e+08
smartctl_device_power_on_seconds{device="nvme0"} 1.508832e+08
...
smartctl_device_power_on_seconds{device="nvme5"} 1.290744e+08
# HELP smartctl_device_smart_status General smart status

smartctl_device_smart_status{device="bus_0_megaraid_disk_00"} 1
smartctl_device_smart_status{device="bus_0_megaraid_disk_01"} 1
smartctl_device_smart_status{device="nvme0"} 1
...
smartctl_device_smart_status{device="nvme5"} 1
smartctl_device_smart_status{device="sda"} 0
# HELP smartctl_device_smartctl_exit_status Exit status of smartctl on device

smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_00"} 4
smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_01"} 4
smartctl_device_smartctl_exit_status{device="nvme0"} 0
....
smartctl_device_smartctl_exit_status{device="nvme5"} 0
smartctl_device_smartctl_exit_status{device="sda"} 0
# HELP smartctl_device_temperature Device temperature celsius

smartctl_device_temperature{device="bus_0_megaraid_disk_00",temperature_type="current"} 22
smartctl_device_temperature{device="bus_0_megaraid_disk_01",temperature_type="current"} 24
smartctl_device_temperature{device="nvme0",temperature_type="current"} 31
...
smartctl_device_temperature{device="nvme5",temperature_type="current"} 32
smartctl_device_temperature{device="sda",temperature_type="current"} 0
smartctl_device_temperature{device="sda",temperature_type="drive_trip"} 0
# HELP smartctl_devices Number of devices configured or dynamically discovered

smartctl_devices 9
# HELP smartctl_version smartctl version

smartctl_version{build_info="(local build)",json_format_version="1.0",smartctl_version="7.0",svn_revision="4883"} 1
Above system specifying smartmontools 7.3
[root@pro-va-1 tmp]# ./smartctl_exporter --smartctl.path=/opt/index/sbin/smartctl &
[1] 2647541
[root@pro-va-1 tmp]# ts=2024-05-06T18:00:01.942Z caller=main.go:167 level=info msg="Starting smartctl_exporter" version="(version=0.12.0, branch=master, revision=391aae38e4c93eadadf51cf20379af71c9251714)"
ts=2024-05-06T18:00:01.942Z caller=main.go:168 level=info msg="Build context" build_context="(go=go1.22.2, platform=linux/amd64, user=root@prom-test.tor3.indexww.com, date=20240506-17:36:24, tags=unknown)"
ts=2024-05-06T18:00:01.967Z caller=main.go:128 level=info msg="Found device" name=sda
ts=2024-05-06T18:00:01.967Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_00
ts=2024-05-06T18:00:01.967Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_01
ts=2024-05-06T18:00:01.967Z caller=main.go:128 level=info msg="Found device" name=nvme0
...
ts=2024-05-06T18:00:01.968Z caller=main.go:128 level=info msg="Found device" name=nvme5
ts=2024-05-06T18:00:01.968Z caller=main.go:172 level=info msg="Number of devices found" count=9
ts=2024-05-06T18:00:01.968Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-05-06T18:00:01.968Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-06T18:00:02.083Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_00
ts=2024-05-06T18:00:02.083Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_00
ts=2024-05-06T18:00:02.122Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_01
ts=2024-05-06T18:00:02.122Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_01
ts=2024-05-06T18:00:02.300Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9633
ts=2024-05-06T18:00:02.301Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9633



[root@pro-va-1 tmp]# curl http://localhost:9633/metrics
ts=2024-05-06T18:02:01.495Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_00
ts=2024-05-06T18:02:01.495Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_00
ts=2024-05-06T18:02:01.523Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=bus_0_megaraid_disk_01
ts=2024-05-06T18:02:01.523Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=bus_0_megaraid_disk_01
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0.000186845

...
# HELP smartctl_device Device info
# TYPE smartctl_device gauge
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ACS-3 T13/2161-D revision 5",device="bus_0_megaraid_disk_00",firmware_version="XCV1DL69",form_factor="2.5 inches",interface="sat+megaraid,0",model_family="Dell Certified Intel S4x00/D3-S4x10 Series SSDs",model_name="SSDSC2KG240G8R",protocol="ATA",sata_version="SATA 3.2",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTYG915601ZV240AGN"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ACS-3 T13/2161-D revision 5",device="bus_0_megaraid_disk_01",firmware_version="XCV1DL69",form_factor="2.5 inches",interface="sat+megaraid,1",model_family="Dell Certified Intel S4x00/D3-S4x10 Series SSDs",model_name="SSDSC2KG240G8R",protocol="ATA",sata_version="SATA 3.2",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTYG915600AV240AGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme0",firmware_version="VDV10140",form_factor="",interface="nvme",model_family="unknown",model_name="INTEL SSDPE2KE016T8",protocol="NVMe",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTLN906605ST1P6AGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme1",firmware_version="VDV10140",form_factor="",interface="nvme",model_family="unknown",model_name="INTEL SSDPE2KE016T8",protocol="NVMe",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTLN906604LH1P6AGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme2",firmware_version="VDV1DP25",form_factor="",interface="nvme",model_family="unknown",model_name="Dell Express Flash NVMe P4610 1.6TB ...
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="nvme5",firmware_version="VDV1DP25",form_factor="",interface="nvme",model_family="unknown",model_name="Dell Express Flash NVMe P4610 1.6TB SFF",protocol="NVMe",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="BTLN92130F2P1P6AGN"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sda",firmware_version="",form_factor="",interface="scsi",model_family="unknown",model_name="DELL PERC H740P Mini",protocol="SCSI",sata_version="",scsi_product="PERC H740P Mini",scsi_revision="5.16",scsi_vendor="DELL",scsi_version="SPC-3",serial_number="003dea0629570fcb2400ac3470f098cd"} 1
# HELP smartctl_device_attribute Device attributes
# TYPE smartctl_device_attribute gauge
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="event_count",attribute_flags_short="----C-",attribute_id="198",attribute_name="Offline_Uncorrectable",attribute_value_type="worst",device="bus_0_megaraid_disk_00"} 100

smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="235",attribute_name="Unknown_Attribute",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 3.867304e+06
...
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,error_rate",attribute_flags_short="PO-R--",attribute_id="235",attribute_name="Unknown_Attribute",attribute_value_type="worst",device="bus_0_megaraid_disk_00"} 100

...
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,event_count,auto_keep",attribute_flags_short="PO--CK",attribute_id="5",attribute_name="Reallocated_Sector_Ct",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0
...
smartctl_device_attribute{attribute_flags_long="prefailure,updated_online,performance,auto_keep",attribute_flags_short="POS--K",attribute_id="202",attribute_name="End_of_Life",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 3624

...
smartctl_device_attribute{attribute_flags_long="updated_online,error_rate,event_count,auto_keep",attribute_flags_short="-O-RCK",attribute_id="182",attribute_name="Erase_Fail_Count_Total",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count",attribute_flags_short="-O--C-",attribute_id="173",attribute_name="Unknown_Attribute",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 432
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="180",attribute_name="Unused_Rsvd_Blk_Cnt_Tot",attribute_value_type="thresh",device="bus_0_megaraid_disk_00"} 0
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="180",attribute_name="Unused_Rsvd_Blk_Cnt_Tot",attribute_value_type="thresh",device="bus_0_megaraid_disk_01"} 0
...
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="184",attribute_name="End-to-End_Error",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
smartctl_device_attribute{attribute_flags_long="updated_online,event_count,auto_keep",attribute_flags_short="-O--CK",attribute_id="195",attribute_name="Uncorrectable_Error_Cnt",attribute_value_type="raw",device="bus_0_megaraid_disk_00"} 0

...

smartctl_device_attribute{attribute_flags_long="updated_online,performance,error_rate,event_count,auto_keep",attribute_flags_short="-OSRCK",attribute_id="199",attribute_name="CRC_Error_Count",attribute_value_type="worst",device="bus_0_megaraid_disk_01"} 100
# HELP smartctl_device_available_spare Normalized percentage (0 to 100%) of the remaining spare capacity available
# TYPE smartctl_device_available_spare counter
smartctl_device_available_spare{device="nvme0"} 100
...
smartctl_device_available_spare{device="nvme5"} 100
# HELP smartctl_device_available_spare_threshold When the Available Spare falls below the threshold indicated in this field, an asynchronous event completion may occur. The value is indicated as a normalized percentage (0 to 100%)

smartctl_device_available_spare_threshold{device="nvme0"} 10
...
smartctl_device_available_spare_threshold{device="nvme4"} 10
smartctl_device_available_spare_threshold{device="nvme5"} 10
# HELP smartctl_device_block_size Device block size

smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_00"} 512
smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_01"} 512
smartctl_device_block_size{blocks_type="logical",device="nvme0"} 512
...
smartctl_device_block_size{blocks_type="logical",device="nvme5"} 512
smartctl_device_block_size{blocks_type="logical",device="sda"} 512
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_00"} 4096
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_01"} 4096
smartctl_device_block_size{blocks_type="physical",device="nvme0"} 0
...
smartctl_device_block_size{blocks_type="physical",device="nvme5"} 0
smartctl_device_block_size{blocks_type="physical",device="sda"} 0
# HELP smartctl_device_bytes_read

smartctl_device_bytes_read{device="nvme0"} 9.498606716928e+15
...
smartctl_device_bytes_read{device="nvme5"} 1.441513101824e+15
# HELP smartctl_device_bytes_written

smartctl_device_bytes_written{device="nvme0"} 8.198134975488e+15
...
smartctl_device_bytes_written{device="nvme5"} 1.418306366976e+15
# HELP smartctl_device_capacity_blocks Device capacity in blocks

smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_00"} 4.68862128e+08
smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_01"} 4.68862128e+08
smartctl_device_capacity_blocks{device="nvme0"} 3.125627568e+09
...
smartctl_device_capacity_blocks{device="nvme5"} 3.125627568e+09
smartctl_device_capacity_blocks{device="sda"} 4.67664896e+08
# HELP smartctl_device_capacity_bytes Device capacity in bytes

smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_00"} 2.40057409536e+11
smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_01"} 2.40057409536e+11
smartctl_device_capacity_bytes{device="nvme0"} 1.600321314816e+12
...
smartctl_device_capacity_bytes{device="nvme5"} 1.600321314816e+12
smartctl_device_capacity_bytes{device="sda"} 2.39444426752e+11
# HELP smartctl_device_critical_warning This field indicates critical warnings for the state of the controller

smartctl_device_critical_warning{device="nvme0"} 0
...
smartctl_device_critical_warning{device="nvme5"} 0
# HELP smartctl_device_interface_speed Device interface speed, bits per second

smartctl_device_interface_speed{device="bus_0_megaraid_disk_00",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="bus_0_megaraid_disk_00",speed_type="max"} 6e+09
smartctl_device_interface_speed{device="bus_0_megaraid_disk_01",speed_type="current"} 6e+09
smartctl_device_interface_speed{device="bus_0_megaraid_disk_01",speed_type="max"} 6e+09
# HELP smartctl_device_media_errors Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field

smartctl_device_media_errors{device="nvme0"} 0
smartctl_device_media_errors{device="nvme1"} 0
smartctl_device_media_errors{device="nvme2"} 0
smartctl_device_media_errors{device="nvme3"} 0
smartctl_device_media_errors{device="nvme4"} 0
smartctl_device_media_errors{device="nvme5"} 0
# HELP smartctl_device_num_err_log_entries Contains the number of Error Information log entries over the life of the controller

smartctl_device_num_err_log_entries{device="nvme0"} 0
...
smartctl_device_num_err_log_entries{device="nvme5"} 0
# HELP smartctl_device_nvme_capacity_bytes NVMe device total capacity bytes

smartctl_device_nvme_capacity_bytes{device="nvme0"} 1.600321314816e+12
...
smartctl_device_nvme_capacity_bytes{device="nvme5"} 1.600321314816e+12
# HELP smartctl_device_percentage_used Device write percentage used

smartctl_device_percentage_used{device="nvme0"} 42
...
smartctl_device_percentage_used{device="nvme4"} 11
smartctl_device_percentage_used{device="nvme5"} 7
# HELP smartctl_device_power_cycle_count Device power cycle count

smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_00"} 27
smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_01"} 27
smartctl_device_power_cycle_count{device="nvme0"} 27
...
smartctl_device_power_cycle_count{device="nvme5"} 17
# HELP smartctl_device_power_on_seconds Device power on seconds

smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_00"} 1.497924e+08
smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_01"} 1.497924e+08
smartctl_device_power_on_seconds{device="nvme0"} 1.508832e+08
...
smartctl_device_power_on_seconds{device="nvme5"} 1.290744e+08
# HELP smartctl_device_smart_status General smart status

smartctl_device_smart_status{device="bus_0_megaraid_disk_00"} 1
smartctl_device_smart_status{device="bus_0_megaraid_disk_01"} 1
smartctl_device_smart_status{device="nvme0"} 1
...
smartctl_device_smart_status{device="nvme5"} 1
smartctl_device_smart_status{device="sda"} 0
# HELP smartctl_device_smartctl_exit_status Exit status of smartctl on device

smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_00"} 4
smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_01"} 4
smartctl_device_smartctl_exit_status{device="nvme0"} 0
...
smartctl_device_smartctl_exit_status{device="nvme5"} 0
smartctl_device_smartctl_exit_status{device="sda"} 0
# HELP smartctl_device_temperature Device temperature celsius

smartctl_device_temperature{device="bus_0_megaraid_disk_00",temperature_type="current"} 22
smartctl_device_temperature{device="bus_0_megaraid_disk_01",temperature_type="current"} 25
smartctl_device_temperature{device="nvme0",temperature_type="current"} 31
...
smartctl_device_temperature{device="nvme5",temperature_type="current"} 33
smartctl_device_temperature{device="sda",temperature_type="current"} 0
# HELP smartctl_devices Number of devices configured or dynamically discovered

smartctl_devices 9
# HELP smartctl_version smartctl version

smartctl_version{build_info="(local build)",json_format_version="1.0",smartctl_version="7.3",svn_revision="5338"} 1
system with 2x LSI HBAs, various HBA VDs
[root@dw24 ~]# /opt/MegaRAID/storcli/storcli64 /c0 show
Generating detailed summary of the adapter, it may take a while to complete.



Product Name = PERC H330 Mini



TOPOLOGY :
========

-----------------------------------------------------------------------------
DG Arr Row EID:Slot DID Type  State BT       Size PDC  PI SED DS3  FSpace TR
-----------------------------------------------------------------------------
 0 -   -   -        -   RAID1 Optl  N  278.875 GB dflt N  N   dflt N      N
 0 0   -   -        -   RAID1 Optl  N  278.875 GB dflt N  N   dflt N      N
 0 0   0   32:0     0   DRIVE Onln  N  278.875 GB dflt N  N   dflt -      N
 0 0   1   32:1     1   DRIVE Onln  N  278.875 GB dflt N  N   dflt -      N
-----------------------------------------------------------------------------


Virtual Drives = 1

VD LIST :
=======

---------------------------------------------------------------
DG/VD TYPE  State Access Consist Cache Cac sCC       Size Name
---------------------------------------------------------------
0/0   RAID1 Optl  RW     Yes     NRWTD -   OFF 278.875 GB
---------------------------------------------------------------

Physical Drives = 2

PD LIST :
=======

------------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model            Sp Type
------------------------------------------------------------------------------
32:0      0 Onln   0 278.875 GB SAS  HDD N   N  512B ST300MP0005      U  -
32:1      1 Onln   0 278.875 GB SAS  HDD N   N  512B ST300MP0005      U  -
------------------------------------------------------------------------------

Enclosures = 1

Enclosure LIST :
==============

--------------------------------------------------------------------
EID State Slots PD PS Fans TSs Alms SIM Port# ProdID VendorSpecific
--------------------------------------------------------------------
 32 OK        4  2  0    0   0    0   0 00 x1 BP13G+ 6CF004F
--------------------------------------------------------------------





[root@dw24 ~]# /opt/MegaRAID/storcli/storcli64 /c1 show
Generating detailed summary of the adapter, it may take a while to complete.


Product Name = PERC H830 Adapter


TOPOLOGY :
========

-----------------------------------------------------------------------------
DG Arr Row EID:Slot DID Type  State BT       Size PDC  PI SED DS3  FSpace TR
-----------------------------------------------------------------------------
 0 -   -   -        -   RAID6 Optl  N   89.096 TB dflt N  N   dflt N      N
 0 0   -   -        -   RAID6 Optl  N   89.096 TB dflt N  N   dflt N      N
 0 0   0   0:0      7   DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N
 0 0   1   0:1      5   DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N

...
 3 0   10  27:10    43  DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N
 3 0   11  27:11    52  DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N
 4 -   -   -        -   RAID6 Optl  N   89.096 TB dflt N  N   dflt N      N
 4 0   -   -        -   RAID6 Optl  N   89.096 TB dflt N  N   dflt N      N
 4 0   0   40:0     29  DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N
...
 4 0   10  40:10    38  DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N
 4 0   11  40:11    37  DRIVE Onln  N    8.909 TB dflt N  N   dflt -      N
-----------------------------------------------------------------------------


Virtual Drives = 5

VD LIST :
=======

----------------------------------------------------------------
DG/VD TYPE  State Access Consist Cache Cac sCC       Size Name
----------------------------------------------------------------
2/0   RAID6 Optl  RW     Yes     RWTD  -   OFF  89.096 TB data1
...
1/8   RAID6 Optl  RW     Yes     RWTD  -   OFF 106.918 TB data5


Physical Drives = 60

PD LIST :
=======

-----------------------------------------------------------------------------
EID:Slt DID State DG      Size Intf Med SED PI SeSz Model            Sp Type
-----------------------------------------------------------------------------
0:0       7 Onln   0  8.909 TB SAS  HDD N   N  512B HUH721010AL5200  U  -
...
64:11    65 Onln   1 10.691 TB SAS  HDD N   N  512B HUH721212AL5200  U  -
-----------------------------------------------------------------------------



Enclosures = 5

Enclosure LIST :
==============

--------------------------------------------------------------------
EID State Slots PD PS Fans TSs Alms SIM Port# ProdID VendorSpecific
--------------------------------------------------------------------
  0 OK       12 12  2    4   7    0   2 01 x4 MD1400
...
 64 OK       12 12  2    4   7    0   2 01 x4 MD1400
--------------------------------------------------------------------

EID=Enclosure Device ID | PD=Physical drive count | PS=Power Supply count
TSs=Temperature sensor count | Alms=Alarm count | SIM=SIM Count | ProdID=Product ID


BBU_Info :
========

--------------------------------------------
Model State RetentionTime Temp Mode MfgDate
--------------------------------------------
BBU   Dgd   0 hour(s)     57C  -    0/00/00
--------------------------------------------
[root@dw24 tmp]# ./smartctl_exporter --smartctl.path=/opt/index/sbin/smartctl &
[1] 102001
[root@dw24 tmp]# ts=2024-05-06T18:07:47.455Z caller=main.go:167 level=info msg="Starting smartctl_exporter" version="(version=0.12.0, branch=master, revision=391aae38e4c93eadadf51cf20379af71c9251714)"
ts=2024-05-06T18:07:47.455Z caller=main.go:168 level=info msg="Build context" build_context="(go=go1.22.2, platform=linux/amd64, user=root@prom-test.tor3.indexww.com, date=20240506-17:36:24, tags=unknown)"
ts=2024-05-06T18:07:47.494Z caller=main.go:128 level=info msg="Found device" name=sda
...
ts=2024-05-06T18:07:47.495Z caller=main.go:128 level=info msg="Found device" name=sdf
ts=2024-05-06T18:07:47.495Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_00
...
ts=2024-05-06T18:07:47.495Z caller=main.go:128 level=info msg="Found device" name=bus_11_megaraid_disk_04
...
ts=2024-05-06T18:07:47.501Z caller=main.go:128 level=info msg="Found device" name=bus_11_megaraid_disk_63
ts=2024-05-06T18:07:47.501Z caller=main.go:128 level=info msg="Found device" name=bus_11_megaraid_disk_65
ts=2024-05-06T18:07:47.501Z caller=main.go:172 level=info msg="Number of devices found" count=68
ts=2024-05-06T18:07:47.501Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-05-06T18:07:47.501Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-06T18:08:24.635Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9633
ts=2024-05-06T18:08:24.635Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9633
ts=2024-05-06T18:17:47.537Z caller=main.go:82 level=info msg="Rescanning for devices"
ts=2024-05-06T18:17:47.572Z caller=main.go:128 level=info msg="Found device" name=sda
...
ts=2024-05-06T18:17:47.572Z caller=main.go:128 level=info msg="Found device" name=sdf
ts=2024-05-06T18:17:47.573Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_00
ts=2024-05-06T18:17:47.573Z caller=main.go:128 level=info msg="Found device" name=bus_0_megaraid_disk_01
ts=2024-05-06T18:17:47.573Z caller=main.go:128 level=info msg="Found device" name=bus_11_megaraid_disk_02
...
ts=2024-05-06T18:17:47.577Z caller=main.go:128 level=info msg="Found device" name=bus_11_megaraid_disk_61
...
ts=2024-05-06T18:17:47.577Z caller=main.go:128 level=info msg="Found device" name=bus_11_megaraid_disk_65

[root@dw24 tmp]# curl http://localhost:9633/metrics
...

# HELP smartctl_device Device info
# TYPE smartctl_device gauge
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="bus_0_megaraid_disk_00",firmware_version="",form_factor="2.5 inches",interface="megaraid,0",model_family="unknown",model_name="SEAGATE ST300MP0005",protocol="SCSI",sata_version="",scsi_product="ST300MP0005",scsi_revision="VT33",scsi_vendor="SEAGATE",scsi_version="SPC-4",serial_number="S7K1W1AX"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="bus_0_megaraid_disk_01",firmware_version="",form_factor="2.5 inches",interface="megaraid,1",model_family="unknown",model_name="SEAGATE ST300MP0005",protocol="SCSI",sata_version="",scsi_product="ST300MP0005",scsi_revision="VT33",scsi_vendor="SEAGATE",scsi_version="SPC-4",serial_number="S7K1W1H8"} 1

...
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="bus_11_megaraid_disk_42",firmware_version="",form_factor="3.5 inches",interface="megaraid,42",model_family="unknown",model_name="HGST HUH721010AL5200",protocol="SCSI",sata_version="",scsi_product="HUH721010AL5200",scsi_revision="LS21",scsi_vendor="HGST",scsi_version="SPC-4",serial_number="7PJ28K8G"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="bus_11_megaraid_disk_65",firmware_version="",form_factor="3.5 inches",interface="megaraid,65",model_family="unknown",model_name="HGST HUH721212AL5200",protocol="SCSI",sata_version="",scsi_product="HUH721212AL5200",scsi_revision="NS10",scsi_vendor="HGST",scsi_version="SPC-4",serial_number="8DGYKX5H"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sda",firmware_version="",form_factor="",interface="scsi",model_family="unknown",model_name="DELL PERC H330 Mini",protocol="SCSI",sata_version="",scsi_product="PERC H330 Mini",scsi_revision="4.30",scsi_vendor="DELL",scsi_version="SPC-3",serial_number="00ea35490f75fd2e2000b0cb9aa06d86"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdb",firmware_version="",form_factor="",interface="scsi",model_family="unknown",model_name="DELL PERC H830 Adp",protocol="SCSI",sata_version="",scsi_product="PERC H830 Adp",scsi_revision="4.30",scsi_vendor="DELL",scsi_version="SPC-3",serial_number="00b20f5506a5d9682200009199a06d86"} 1
...
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdf",firmware_version="",form_factor="",interface="scsi",model_family="unknown",model_name="DELL PERC H830 Adp",protocol="SCSI",sata_version="",scsi_product="PERC H830 Adp",scsi_revision="4.30",scsi_vendor="DELL",scsi_version="SPC-3",serial_number="005ea3da07fe1d612200009199a06d86"} 1
# HELP smartctl_device_block_size Device block size
# TYPE smartctl_device_block_size gauge
smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_00"} 512
smartctl_device_block_size{blocks_type="logical",device="bus_0_megaraid_disk_01"} 512
smartctl_device_block_size{blocks_type="logical",device="bus_11_megaraid_disk_02"} 512
...

smartctl_device_block_size{blocks_type="logical",device="sda"} 512
...
smartctl_device_block_size{blocks_type="logical",device="sdf"} 512
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_00"} 0
smartctl_device_block_size{blocks_type="physical",device="bus_0_megaraid_disk_01"} 0
smartctl_device_block_size{blocks_type="physical",device="bus_11_megaraid_disk_02"} 4096
...
smartctl_device_block_size{blocks_type="physical",device="bus_11_megaraid_disk_65"} 4096
smartctl_device_block_size{blocks_type="physical",device="sda"} 0
smartctl_device_block_size{blocks_type="physical",device="sdb"} 4096
...
smartctl_device_block_size{blocks_type="physical",device="sdf"} 4096
# HELP smartctl_device_capacity_blocks Device capacity in blocks
# TYPE smartctl_device_capacity_blocks gauge
smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_00"} 5.859375e+08
smartctl_device_capacity_blocks{device="bus_0_megaraid_disk_01"} 5.859375e+08
smartctl_device_capacity_blocks{device="bus_11_megaraid_disk_02"} 1.9134414848e+10

...
smartctl_device_capacity_blocks{device="bus_11_megaraid_disk_63"} 2.2961717248e+10
smartctl_device_capacity_blocks{device="bus_11_megaraid_disk_65"} 2.2961717248e+10
smartctl_device_capacity_blocks{device="sda"} 5.84843264e+08
...
smartctl_device_capacity_blocks{device="sdf"} 2.2960668672e+11
# HELP smartctl_device_capacity_bytes Device capacity in bytes

smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_00"} 3e+11
smartctl_device_capacity_bytes{device="bus_0_megaraid_disk_01"} 3e+11
smartctl_device_capacity_bytes{device="bus_11_megaraid_disk_02"} 9.796820402176e+12
smartctl_device_capacity_bytes{device="bus_11_megaraid_disk_03"} 9.796820402176e+12
...

smartctl_device_capacity_bytes{device="bus_11_megaraid_disk_65"} 1.1756399230976e+13
smartctl_device_capacity_bytes{device="sda"} 2.99439751168e+11
...
smartctl_device_capacity_bytes{device="sdf"} 1.1755862360064e+14
# HELP smartctl_device_power_cycle_count Device power cycle count

smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_00"} 47
smartctl_device_power_cycle_count{device="bus_0_megaraid_disk_01"} 47
smartctl_device_power_cycle_count{device="bus_11_megaraid_disk_02"} 7
...

smartctl_device_power_cycle_count{device="bus_11_megaraid_disk_65"} 5
# HELP smartctl_device_power_on_seconds Device power on seconds

smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_00"} 2.2662996e+08
smartctl_device_power_on_seconds{device="bus_0_megaraid_disk_01"} 2.2662972e+08
smartctl_device_power_on_seconds{device="bus_11_megaraid_disk_02"} 1.187982e+07
...

# HELP smartctl_device_rotation_rate Device rotation rate

smartctl_device_rotation_rate{device="bus_0_megaraid_disk_00"} 15000
smartctl_device_rotation_rate{device="bus_0_megaraid_disk_01"} 15000
...
smartctl_device_rotation_rate{device="bus_11_megaraid_disk_62"} 7200
smartctl_device_rotation_rate{device="bus_11_megaraid_disk_65"} 7200
# HELP smartctl_device_smart_status General smart status

smartctl_device_smart_status{device="bus_0_megaraid_disk_00"} 1
smartctl_device_smart_status{device="bus_0_megaraid_disk_01"} 1
...
smartctl_device_smart_status{device="bus_11_megaraid_disk_62"} 1

smartctl_device_smart_status{device="sda"} 0
...
smartctl_device_smart_status{device="sdf"} 0
# HELP smartctl_device_smartctl_exit_status Exit status of smartctl on device

smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_00"} 0
smartctl_device_smartctl_exit_status{device="bus_0_megaraid_disk_01"} 0
smartctl_device_smartctl_exit_status{device="bus_11_megaraid_disk_02"} 0
...

smartctl_device_smartctl_exit_status{device="bus_11_megaraid_disk_65"} 0
smartctl_device_smartctl_exit_status{device="sda"} 0
...
smartctl_device_smartctl_exit_status{device="sdf"} 0
# HELP smartctl_device_temperature Device temperature celsius

smartctl_device_temperature{device="bus_0_megaraid_disk_00",temperature_type="current"} 38
smartctl_device_temperature{device="bus_0_megaraid_disk_00",temperature_type="drive_trip"} 60
smartctl_device_temperature{device="bus_0_megaraid_disk_01",temperature_type="current"} 36
...

smartctl_device_temperature{device="bus_11_megaraid_disk_65",temperature_type="drive_trip"} 50
smartctl_device_temperature{device="sda",temperature_type="current"} 0
smartctl_device_temperature{device="sdb",temperature_type="current"} 0
smartctl_device_temperature{device="sdc",temperature_type="current"} 0
smartctl_device_temperature{device="sdd",temperature_type="current"} 0
smartctl_device_temperature{device="sde",temperature_type="current"} 0
smartctl_device_temperature{device="sdf",temperature_type="current"} 0
# HELP smartctl_devices Number of devices configured or dynamically discovered

smartctl_devices 68
# HELP smartctl_version smartctl version

smartctl_version{build_info="(local build)",json_format_version="1.0",smartctl_version="7.3",svn_revision="5338"} 1
[root@dw24 tmp]#

@NiceGuyIT
Copy link
Member

Thanks for the feedback @anthonyeleven!

@zxzharmlesszxz Thank you for your contribution! Sorry for the long delay; the checks and balances are complete.

@NiceGuyIT NiceGuyIT merged commit 2cc2249 into prometheus-community:master May 7, 2024
5 checks passed
@pokab
Copy link

pokab commented May 9, 2024

Thank you for your contribution.
I've had a weird issue with the new --device= flag passed to smartctl.

--json --scan output part for /dev/sdi:

    {
      "name": "/dev/sdi",
      "info_name": "/dev/sdi",
      "type": "scsi",
      "protocol": "SCSI"
    },

Then, with the new --device=scsi parameter, smartctl returns error code 4 without proper data. The disk itself is a SATA disk. When given --device=auto or without --device, everything is working again.

@k0ste
Copy link
Contributor

k0ste commented May 9, 2024

Thank you for your contribution. I've had a weird issue with the new --device= flag passed to smartctl.

--json --scan output part for /dev/sdi:

    {
      "name": "/dev/sdi",
      "info_name": "/dev/sdi",
      "type": "scsi",
      "protocol": "SCSI"
    },

Then, with the new --device=scsi parameter, smartctl returns error code 4 without proper data. The disk itself is a SATA disk. When given --device=auto or without --device, everything is working again.

Yes, the current code is adapted for Dell hardware. If your hardware is not a Dell, then your SATA hdd is not work anymore. So it's ok because that's what this patch was trying to achieve, isn't it?

@pokab
Copy link

pokab commented May 10, 2024

Thank you for your contribution. I've had a weird issue with the new --device= flag passed to smartctl.
--json --scan output part for /dev/sdi:

    {
      "name": "/dev/sdi",
      "info_name": "/dev/sdi",
      "type": "scsi",
      "protocol": "SCSI"
    },

Then, with the new --device=scsi parameter, smartctl returns error code 4 without proper data. The disk itself is a SATA disk. When given --device=auto or without --device, everything is working again.

Yes, the current code is adapted for Dell hardware. If your hardware is not a Dell, then your SATA hdd is not work anymore. So it's ok because that's what this patch was trying to achieve, isn't it?

I'm sure I do not understand something, I didn't read every single message in this pull request.
You're saying this change is not intended for non-Dell hardware. It's already merged into master, which (for me) means that it should generally work for everything. But it does not work for everything, as you (and me) are stating.

I also didn't find any option to get the old behavior. That is, forcing calling smartctl without --device or force --device=auto or something like this.

Background:
I've been working/waiting on issue #197 and due to this change getting merged into the master branch, my pull request needed to be rebased. So I rebased my changes onto the new master, tried out my resulting code, and saw the weird failures on only two of my SATA disks. Previously (before this got merged), this was not the case.

@anthonyeleven
Copy link

I agree, out of the box it shouldn't break.

Also, I got errors even on Dell HW, see above.

@k0ste
Copy link
Contributor

k0ste commented May 10, 2024

You're saying this change is not intended for non-Dell hardware. It's already merged into master, which (for me) means that it should generally work for everything. But it does not work for everything, as you (and me) are stating.

Actually, this was merged, but not released

I also didn't find any option to get the old behavior. That is, forcing calling smartctl without --device or force --device=auto or something like this.

It's not exist. Currently, this is breaking change


Let me try to explain, if you are not read all messages. Here is 4 devices

[root@prom-test smartctl_exporter]# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
..
/dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device

But actually for smartctl_exporter now is a 8 devices in total

smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_00",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,0",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIVAF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_01",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,1",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H3K3RTF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_02",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,2",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H2K9TRF"} 1
smartctl_device{ata_additional_product_id="DELL(tm)",ata_version="ATA8-ACS (minor revision not indicated)",device="bus_0_megaraid_disk_03",firmware_version="FL2H",form_factor="3.5 inches",interface="sat+megaraid,3",model_family="Toshiba 3.5\" MG03ACAxxx(Y) Enterprise HDD",model_name="TOSHIBA MG03ACA100",protocol="ATA",sata_version="SATA 3.0",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIV0F"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sda",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIVAF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdb",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H7KIV0F"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdc",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H3K3RTF"} 1
smartctl_device{ata_additional_product_id="unknown",ata_version="",device="sdd",firmware_version="",form_factor="3.5 inches",interface="scsi",model_family="unknown",model_name="unknown",protocol="SCSI",sata_version="",scsi_product="",scsi_revision="",scsi_vendor="",scsi_version="",serial_number="56H2K9TRF"} 1

If some PromQL makes a join by serial_number label, the Prometheus return many-to-many error

So, we need to think first about design of exporter, then release the new code


My suggestions is:

  1. Adding the --megaraid option. With this option the new megaraid logic is enabled. The non-megaraid devices should be filtered by administrator via regex filter, for example --smartctl.device-exclude="^/dev/sd[a-z]+"
  2. Adding the --megaraid-only option. This tell exporter to use only megaraid devices. This will fix the doubled devices
  3. Don't adding the new options, but add new device_type logic only for megaraid devices, so it's omit the device_type option to smartmontools by default, - the current exporter behavior. In this case, administrator should filter megaraid devices by hand via regex filter. Actually, we use this filter for all exporter deployments, to avoid non-disk devices in device counter
[root@infra1:/]# cat /etc/conf.d/smartctl_exporter
OPTIONS="--smartctl.interval=600s --smartctl.device-exclude=^/dev/bus/[0-9]+$ --web.listen-address=192.168.102.254:9633
  1. Another variant...

Hope this helped clear things up 🙏

@anthonyeleven
Copy link

anthonyeleven commented May 10, 2024 via email

@k0ste
Copy link
Contributor

k0ste commented May 10, 2024

Drives that are passed through on an LSI HBA

How it works with Broadcom HBA 9500-16i

3b:00.0 Serial Attached SCSI controller: Broadcom / LSI Fusion-MPT 12GSAS/PCIe Secure SAS38xx
        Subsystem: Broadcom / LSI 9500-16i Tri-Mode HBA
smartctl_exporter 0.12.0
ts=2024-05-10T17:36:51.045Z caller=main.go:140 level=info msg="Starting smartctl_exporter" version="(version=0.12.0, branch=master, revision=1.el8)"
ts=2024-05-10T17:36:51.045Z caller=main.go:141 level=info msg="Build context" build_context="(go=go1.21.7 (Red Hat 1.21.7-1.module_el8+960+4060efbe), platform=linux/amd64, user=mockbuild@mockbuild, date=20240304, tags=unknown)"
ts=2024-05-10T17:36:51.045Z caller=main.go:147 level=info msg="No devices specified, trying to load them automatically"
ts=2024-05-10T17:36:51.046Z caller=readjson.go:79 level=debug msg="Scanning for devices"
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sda
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdb
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdc
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdd
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sde
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdf
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdg
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdh
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdi
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdj
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdk
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdl
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdm
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdn
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdo
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdp
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdq
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdr
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sds
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdt
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdu
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdv
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdw
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/sdx
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/nvme0
ts=2024-05-10T17:36:51.065Z caller=main.go:120 level=info msg="Found device" name=/dev/nvme1
ts=2024-05-10T17:36:51.065Z caller=main.go:149 level=info msg="Number of devices found" count=26
ts=2024-05-10T17:36:51.065Z caller=main.go:158 level=info msg="Start background scan process"
ts=2024-05-10T17:36:51.065Z caller=main.go:159 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-10T17:36:51.351Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sda duration=286.192113ms
ts=2024-05-10T17:36:51.351Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sda family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:51.635Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdb duration=282.917796ms
ts=2024-05-10T17:36:51.636Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdb family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:51.703Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdc duration=65.960245ms
ts=2024-05-10T17:36:51.703Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdc family=unknown model=WUS721010ALE6L4
ts=2024-05-10T17:36:52.148Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdd duration=444.575557ms
ts=2024-05-10T17:36:52.148Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdd family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:52.184Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sde duration=34.875406ms
ts=2024-05-10T17:36:52.185Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sde family=unknown model=WUS721010ALE6L4
ts=2024-05-10T17:36:52.220Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdf duration=34.298321ms
ts=2024-05-10T17:36:52.220Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdf family=unknown model="WDC  WUS721010ALE6L4"
ts=2024-05-10T17:36:52.251Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdg duration=30.437211ms
ts=2024-05-10T17:36:52.251Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdg family="Toshiba MG06ACA... Enterprise Capacity HDD" model="TOSHIBA MG06ACA10TE"
ts=2024-05-10T17:36:52.550Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdh duration=297.92271ms
ts=2024-05-10T17:36:52.550Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdh family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:52.831Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdi duration=279.672304ms
ts=2024-05-10T17:36:52.831Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdi family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:53.126Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdj duration=292.331348ms
ts=2024-05-10T17:36:53.126Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdj family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:53.399Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdk duration=272.004944ms
ts=2024-05-10T17:36:53.399Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdk family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:53.692Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdl duration=291.55157ms
ts=2024-05-10T17:36:53.692Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdl family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:53.724Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 64" device=/dev/sdm
ts=2024-05-10T17:36:53.724Z caller=readjson.go:140 level=warn msg="The device error log contains records of errors" device=/dev/sdm
ts=2024-05-10T17:36:53.724Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdm duration=31.055839ms
ts=2024-05-10T17:36:53.724Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdm family="Toshiba MG06ACA... Enterprise Capacity HDD" model="TOSHIBA MG06ACA10TE"
ts=2024-05-10T17:36:54.012Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdn duration=286.293623ms
ts=2024-05-10T17:36:54.012Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdn family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:54.325Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdo duration=312.568885ms
ts=2024-05-10T17:36:54.325Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdo family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:54.624Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdp duration=297.93094ms
ts=2024-05-10T17:36:54.624Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdp family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:54.906Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdq duration=280.451251ms
ts=2024-05-10T17:36:54.906Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdq family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:55.186Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 64" device=/dev/sdr
ts=2024-05-10T17:36:55.186Z caller=readjson.go:140 level=warn msg="The device error log contains records of errors" device=/dev/sdr
ts=2024-05-10T17:36:55.186Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdr duration=279.37659ms
ts=2024-05-10T17:36:55.186Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdr family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:55.468Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sds duration=280.076152ms
ts=2024-05-10T17:36:55.468Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sds family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:55.760Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdt duration=291.624193ms
ts=2024-05-10T17:36:55.760Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdt family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:56.050Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 64" device=/dev/sdu
ts=2024-05-10T17:36:56.050Z caller=readjson.go:140 level=warn msg="The device error log contains records of errors" device=/dev/sdu
ts=2024-05-10T17:36:56.050Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdu duration=287.490146ms
ts=2024-05-10T17:36:56.050Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdu family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:56.319Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdv duration=267.760124ms
ts=2024-05-10T17:36:56.319Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdv family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:56.596Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdw duration=276.673288ms
ts=2024-05-10T17:36:56.597Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdw family="Toshiba X300" model="TOSHIBA HDWE160"
ts=2024-05-10T17:36:56.632Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/sdx duration=34.654125ms
ts=2024-05-10T17:36:56.632Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=sdx family=unknown model="WDC  WUS721010ALE6L4"
ts=2024-05-10T17:36:56.653Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/nvme0 duration=19.965395ms
ts=2024-05-10T17:36:56.653Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=nvme0 family=unknown model=Micron_7300_MTFDHBE3T2TDG
ts=2024-05-10T17:36:56.674Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=/dev/nvme1 duration=20.415503ms
ts=2024-05-10T17:36:56.674Z caller=smartctl.go:75 level=debug msg="Collecting metrics from" device=nvme1 family=unknown model=Micron_7300_MTFDHBE3T2TDG
ts=2024-05-10T17:36:56.674Z caller=tls_config.go:313 level=info msg="Listening on" address=192.168.100.26:9630
ts=2024-05-10T17:36:56.674Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=192.168.100.26:9630

And the same server with the current master

smartctl_exporter master
ts=2024-05-10T17:29:14.439Z caller=main.go:167 level=info msg="Starting smartctl_exporter" version="(version=, branch=, revision=2cc2249821d6417fcfff8ef8d302205d7b37b44c)"
ts=2024-05-10T17:29:14.439Z caller=main.go:168 level=info msg="Build context" build_context="(go=go1.22.2, platform=linux/amd64, user=, date=, tags=unknown)"
ts=2024-05-10T17:29:14.439Z caller=readjson.go:79 level=debug msg="Scanning for devices"
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sda
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdb
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdc
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdd
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sde
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdf
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdg
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdh
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdi
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdj
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdk
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdl
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdm
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdn
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdo
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdp
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdq
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdr
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sds
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdt
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdu
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdv
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdw
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=sdx
ts=2024-05-10T17:29:14.459Z caller=main.go:128 level=info msg="Found device" name=nvme0
ts=2024-05-10T17:29:14.460Z caller=main.go:128 level=info msg="Found device" name=nvme1
ts=2024-05-10T17:29:14.460Z caller=main.go:172 level=info msg="Number of devices found" count=26
ts=2024-05-10T17:29:14.460Z caller=main.go:185 level=info msg="Start background scan process"
ts=2024-05-10T17:29:14.460Z caller=main.go:186 level=info msg="Rescanning for devices every" rescanInterval=10m0s
ts=2024-05-10T17:29:16.305Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sda
ts=2024-05-10T17:29:16.305Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sda
ts=2024-05-10T17:29:16.305Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sda duration=1.845341351s
ts=2024-05-10T17:29:16.305Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sda family=unknown model=unknown
ts=2024-05-10T17:29:18.691Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdb
ts=2024-05-10T17:29:18.691Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdb
ts=2024-05-10T17:29:18.691Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdb duration=2.385952698s
ts=2024-05-10T17:29:18.691Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdb family=unknown model=unknown
ts=2024-05-10T17:29:18.905Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdc
ts=2024-05-10T17:29:18.905Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdc
ts=2024-05-10T17:29:18.905Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdc duration=213.069916ms
ts=2024-05-10T17:29:18.905Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdc family=unknown model=unknown
ts=2024-05-10T17:29:20.765Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdd
ts=2024-05-10T17:29:20.765Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdd
ts=2024-05-10T17:29:20.765Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdd duration=1.859711938s
ts=2024-05-10T17:29:20.765Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdd family=unknown model=unknown
ts=2024-05-10T17:29:21.001Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sde
ts=2024-05-10T17:29:21.001Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sde
ts=2024-05-10T17:29:21.001Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sde duration=235.850279ms
ts=2024-05-10T17:29:21.001Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sde family=unknown model=unknown
ts=2024-05-10T17:29:21.214Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdf
ts=2024-05-10T17:29:21.214Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdf
ts=2024-05-10T17:29:21.214Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdf duration=212.474777ms
ts=2024-05-10T17:29:21.214Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdf family=unknown model=unknown
ts=2024-05-10T17:29:21.264Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdg
ts=2024-05-10T17:29:21.264Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdg
ts=2024-05-10T17:29:21.264Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdg duration=50.259454ms
ts=2024-05-10T17:29:21.264Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdg family=unknown model=unknown
ts=2024-05-10T17:29:23.189Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdh
ts=2024-05-10T17:29:23.190Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdh
ts=2024-05-10T17:29:23.190Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdh duration=1.924845225s
ts=2024-05-10T17:29:23.190Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdh family=unknown model=unknown
ts=2024-05-10T17:29:25.497Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdi
ts=2024-05-10T17:29:25.497Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdi
ts=2024-05-10T17:29:25.497Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdi duration=2.306888866s
ts=2024-05-10T17:29:25.497Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdi family=unknown model=unknown
ts=2024-05-10T17:29:27.620Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdj
ts=2024-05-10T17:29:27.620Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdj
ts=2024-05-10T17:29:27.620Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdj duration=2.12262608s
ts=2024-05-10T17:29:27.620Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdj family=unknown model=unknown
ts=2024-05-10T17:29:29.708Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdk
ts=2024-05-10T17:29:29.708Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdk
ts=2024-05-10T17:29:29.708Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdk duration=2.087567042s
ts=2024-05-10T17:29:29.708Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdk family=unknown model=unknown
ts=2024-05-10T17:29:31.733Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdl
ts=2024-05-10T17:29:31.733Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdl
ts=2024-05-10T17:29:31.733Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdl duration=2.024666633s
ts=2024-05-10T17:29:31.733Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdl family=unknown model=unknown
ts=2024-05-10T17:29:31.782Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdm
ts=2024-05-10T17:29:31.782Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdm
ts=2024-05-10T17:29:31.782Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdm duration=48.867196ms
ts=2024-05-10T17:29:31.782Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdm family=unknown model=unknown
ts=2024-05-10T17:29:33.753Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdn
ts=2024-05-10T17:29:33.753Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdn
ts=2024-05-10T17:29:33.753Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdn duration=1.971290324s
ts=2024-05-10T17:29:33.754Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdn family=unknown model=unknown
ts=2024-05-10T17:29:35.801Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdo
ts=2024-05-10T17:29:35.801Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdo
ts=2024-05-10T17:29:35.801Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdo duration=2.047568673s
ts=2024-05-10T17:29:35.802Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdo family=unknown model=unknown
ts=2024-05-10T17:29:38.040Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdp
ts=2024-05-10T17:29:38.040Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdp
ts=2024-05-10T17:29:38.040Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdp duration=2.238011978s
ts=2024-05-10T17:29:38.040Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdp family=unknown model=unknown
ts=2024-05-10T17:29:39.906Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdq
ts=2024-05-10T17:29:39.906Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdq
ts=2024-05-10T17:29:39.906Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdq duration=1.865314904s
ts=2024-05-10T17:29:39.906Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdq family=unknown model=unknown
ts=2024-05-10T17:29:41.750Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdr
ts=2024-05-10T17:29:41.750Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdr
ts=2024-05-10T17:29:41.750Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdr duration=1.843800894s
ts=2024-05-10T17:29:41.750Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdr family=unknown model=unknown
ts=2024-05-10T17:29:43.605Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sds
ts=2024-05-10T17:29:43.605Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sds
ts=2024-05-10T17:29:43.605Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sds duration=1.854622712s
ts=2024-05-10T17:29:43.605Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sds family=unknown model=unknown
ts=2024-05-10T17:29:45.986Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdt
ts=2024-05-10T17:29:45.987Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdt
ts=2024-05-10T17:29:45.987Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdt duration=2.381171388s
ts=2024-05-10T17:29:45.987Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdt family=unknown model=unknown
ts=2024-05-10T17:29:48.147Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdu
ts=2024-05-10T17:29:48.147Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdu
ts=2024-05-10T17:29:48.147Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdu duration=2.16028676s
ts=2024-05-10T17:29:48.147Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdu family=unknown model=unknown
ts=2024-05-10T17:29:49.998Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdv
ts=2024-05-10T17:29:49.998Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdv
ts=2024-05-10T17:29:49.998Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdv duration=1.850612186s
ts=2024-05-10T17:29:49.998Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdv family=unknown model=unknown
ts=2024-05-10T17:29:51.899Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdw
ts=2024-05-10T17:29:51.899Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdw
ts=2024-05-10T17:29:51.899Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdw duration=1.900320681s
ts=2024-05-10T17:29:51.899Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdw family=unknown model=unknown
ts=2024-05-10T17:29:52.276Z caller=readjson.go:69 level=warn msg="S.M.A.R.T. output reading" err="exit status 4" device=sdx
ts=2024-05-10T17:29:52.276Z caller=readjson.go:128 level=warn msg="Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure" device=sdx
ts=2024-05-10T17:29:52.276Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=sdx duration=377.361725ms
ts=2024-05-10T17:29:52.276Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=sdx family=unknown model=unknown
ts=2024-05-10T17:29:52.296Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=nvme0 duration=19.676399ms
ts=2024-05-10T17:29:52.296Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=nvme0 family=unknown model=Micron_7300_MTFDHBE3T2TDG
ts=2024-05-10T17:29:52.317Z caller=readjson.go:74 level=debug msg="Collected S.M.A.R.T. json data" device=nvme1 duration=20.107618ms
ts=2024-05-10T17:29:52.317Z caller=smartctl.go:100 level=debug msg="Collecting metrics from" device=nvme1 family=unknown model=Micron_7300_MTFDHBE3T2TDG
ts=2024-05-10T17:29:52.317Z caller=tls_config.go:313 level=info msg="Listening on" address=192.168.100.26:9630
ts=2024-05-10T17:29:52.317Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=192.168.100.26:9630
[root@host]# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/sde -d scsi # /dev/sde, SCSI device
/dev/sdf -d scsi # /dev/sdf, SCSI device
/dev/sdg -d scsi # /dev/sdg, SCSI device
/dev/sdh -d scsi # /dev/sdh, SCSI device
/dev/sdi -d scsi # /dev/sdi, SCSI device
/dev/sdj -d scsi # /dev/sdj, SCSI device
/dev/sdk -d scsi # /dev/sdk, SCSI device
/dev/sdl -d scsi # /dev/sdl, SCSI device
/dev/sdm -d scsi # /dev/sdm, SCSI device
/dev/sdn -d scsi # /dev/sdn, SCSI device
/dev/sdo -d scsi # /dev/sdo, SCSI device
/dev/sdp -d scsi # /dev/sdp, SCSI device
/dev/sdq -d scsi # /dev/sdq, SCSI device
/dev/sdr -d scsi # /dev/sdr, SCSI device
/dev/sds -d scsi # /dev/sds, SCSI device
/dev/sdt -d scsi # /dev/sdt, SCSI device
/dev/sdu -d scsi # /dev/sdu, SCSI device
/dev/sdv -d scsi # /dev/sdv, SCSI device
/dev/sdw -d scsi # /dev/sdw, SCSI device
/dev/sdx -d scsi # /dev/sdx, SCSI device
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device
/dev/nvme1 -d nvme # /dev/nvme1, NVMe device

@anthonyeleven
Copy link

anthonyeleven commented May 10, 2024 via email

@NiceGuyIT
Copy link
Member

This change is not going to be released until it's fixed (preferred) or reverted.

@k0ste or @robbat2, would one of you mind being a maintainer to help test changes like this? I don't have a system to test advanced drive setups and #227 needs implementing before I can use the smartctl --json output others have provided. I would hate for this project to suffer due to my lack of hardware.

@anthonyeleven
Copy link

anthonyeleven commented May 11, 2024 via email

@pokab
Copy link

pokab commented May 11, 2024

My suggestions is:

  1. Adding the --megaraid option. With this option the new megaraid logic is enabled. The non-megaraid devices should be filtered by administrator via regex filter, for example --smartctl.device-exclude="^/dev/sd[a-z]+"
  2. Adding the --megaraid-only option. This tell exporter to use only megaraid devices. This will fix the doubled devices
  3. Don't adding the new options, but add new device_type logic only for megaraid devices, so it's omit the device_type option to smartmontools by default, - the current exporter behavior. In this case, administrator should filter megaraid devices by hand via regex filter. Actually, we use this filter for all exporter deployments, to avoid non-disk devices in device counter
[root@infra1:/]# cat /etc/conf.d/smartctl_exporter
OPTIONS="--smartctl.interval=600s --smartctl.device-exclude=^/dev/bus/[0-9]+$ --web.listen-address=192.168.102.254:9633
  1. Another variant...

Could I suggest sticking with the 3rd solution? Because the whole design rationale of this PR seems to be that it does not require any new flags and automatically detects everything. The first and second options would break this. The third variant would only behave differently (compared to the old version) if smartctl does report a megaraid type device.

Hope this helped clear things up 🙏

Indeed, thank you.

@anthonyeleven
Copy link

anthonyeleven commented May 12, 2024 via email

@k0ste
Copy link
Contributor

k0ste commented May 12, 2024

Would that handle systems with more than one HBA?

Of course

That would be ideal of course, but “do the desired thing in all kinds of scenarios” often is by far the hardest to implement.

This is not difficult to implement, this is the 4th variant - when scan find the megaraid devices in list, - enable the logic specifically for these devices (if megaraid: ...). As I described above, we need to understand what the design should be so that we can immediately write code that will be merged

@Ranler
Copy link

Ranler commented May 13, 2024

Please support cciss(Compaq Smart Array Controller) device type, we can get deivces by smartctl -a -d cciss,1 /dev/sg1, but it will not be scan automatically.

@tacerus
Copy link

tacerus commented May 25, 2024

I think this patch should be reverted. It completely disengages the --smartctl.device option causing involuntary scanning of all devices.

@Informatic
Copy link

Informatic commented Jul 14, 2024

OK, seems like this also breaks SATA device scraping?

I have a bunch of SATA drives connected directly to AMD X470 chipset built-in SATA controller. smartctl --scan always lists these drives as -d scsi (even when passed -d sat to force SATA discovery) - however using that when actually calling smartctl returns SMART support is: Unavailable - device lacks SMART capability..

scsi-data.json
sata-data.json

edit: should've probably read the thread first... 🤦

@k0ste
Copy link
Contributor

k0ste commented Jul 14, 2024

OK, seems like this also breaks SATA device scraping?

Definitely

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 this pull request may close these issues.

10 participants