-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Metrics for SCSI devices(SMARTCTL PLUGIN) #15188
Comments
After fighting your JSON output from the previous issue I think this is your output: {
"json_format_version": [
1,
0
],
"smartctl": {
"version": [
7,
4
],
"pre_release": false,
"svn_revision": "6328",
"platform_info": "x86_64-linux-4.14.0-1-amd64",
"build_info": "(local build)",
"argv": [
"smartctl",
"--json",
"--all",
"/dev/sdaa",
"--device",
"scsi"
],
"exit_status": 0
},
"local_time": {
"time_t": 1712853808,
"asctime": "Thu Apr 11 16:43:28 2024 UTC"
},
"device": {
"name": "/dev/sdaa",
"info_name": "/dev/sdaa",
"type": "scsi",
"protocol": "SCSI"
},
"scsi_vendor": "XYZZZZZZ",
"scsi_product": "ST100000000",
"scsi_model_name": "SEAGATE ST0000000",
"scsi_revision": "RSL5",
"scsi_version": "SPC-5",
"user_capacity": {
"blocks": 26789019748,
"bytes": 13715978079776
},
"logical_block_size": 512,
"physical_block_size": 4096,
"scsi_protection_type": 2,
"scsi_protection_interval_bytes_per_lb": 8,
"scsi_lb_provisioning": {
"name": "fully provisioned",
"value": 0,
"management_enabled": {
"name": "LBPME",
"value": 0
},
"read_zeros": {
"name": "LBPRZ",
"value": 0
}
},
"rotation_rate": 7200,
"form_factor": {
"scsi_value": 2,
"name": "3.5 inches"
},
"logical_unit_id": "0x5000cb0847",
"serial_number": "XYZZZZ",
"device_type": {
"scsi_terminology": "Peripheral Device Type [PDT]",
"scsi_value": 0,
"name": "disk"
},
"scsi_transport_protocol": {
"name": "SAS (SPL-4)",
"value": 6
},
"smart_support": {
"available": true,
"enabled": true
},
"temperature_warning": {
"enabled": true
},
"smart_status": {
"passed": true
},
"temperature": {
"current": 24,
"drive_trip": 60
},
"power_on_time": {
"hours": 34222,
"minutes": 9
},
"scsi_start_stop_cycle_counter": {
"year_of_manufacture": "2019",
"week_of_manufacture": "35",
"specified_cycle_count_over_device_lifetime": 50000,
"accumulated_start_stop_cycles": 220,
"specified_load_unload_count_over_device_lifetime": 600000,
"accumulated_load_unload_cycles": 1606
},
"scsi_grown_defect_list": 0,
"seagate_farm_log": {
"supported": true
},
"scsi_error_counter_log": {
"read": {
"errors_corrected_by_eccfast": 0,
"errors_corrected_by_eccdelayed": 0,
"errors_corrected_by_rereads_rewrites": 0,
"total_errors_corrected": 0,
"correction_algorithm_invocations": 0,
"gigabytes_processed": "316009.846",
"total_uncorrected_errors": 0
},
"write": {
"errors_corrected_by_eccfast": 0,
"errors_corrected_by_eccdelayed": 0,
"errors_corrected_by_rereads_rewrites": 20,
"total_errors_corrected": 20,
"correction_algorithm_invocations": 20,
"gigabytes_processed": "132824.923",
"total_uncorrected_errors": 0
},
"verify": {
"errors_corrected_by_eccfast": 0,
"errors_corrected_by_eccdelayed": 0,
"errors_corrected_by_rereads_rewrites": 0,
"total_errors_corrected": 0,
"correction_algorithm_invocations": 0,
"gigabytes_processed": "1467.278",
"total_uncorrected_errors": 0
}
},
"scsi_self_test_0": {
"code": {
"value": 2,
"string": "Background long"
},
"result": {
"value": 0,
"string": "Completed"
},
"power_on_time": {
"hours": 90,
"aka": "accumulated_power_on_hours"
}
},
"scsi_self_test_1": {
"code": {
"value": 2,
"string": "Background long"
},
"result": {
"value": 0,
"string": "Completed"
},
"power_on_time": {
"hours": 66,
"aka": "accumulated_power_on_hours"
}
},
"scsi_self_test_2": {
"code": {
"value": 7,
"string": "Reserved(7)"
},
"result": {
"value": 0,
"string": "Completed"
},
"failed_segment": {
"value": 80,
"aka": "self_test_number"
},
"power_on_time": {
"hours": 5,
"aka": "accumulated_power_on_hours"
}
},
"scsi_self_test_3": {
"code": {
"value": 1,
"string": "Background short"
},
"result": {
"value": 0,
"string": "Completed"
},
"power_on_time": {
"hours": 2,
"aka": "accumulated_power_on_hours"
}
},
"scsi_extended_self_test_seconds": 80400
} |
Most of these seem acceptable, however, I have questions about these two:
Which comes from: "form_factor": {
"scsi_value": 2,
"name": "3.5 inches"
}, Why do you want the value and not the name?
That comes from the following JSON: "scsi_lb_provisioning": {
"name": "fully provisioned",
"value": 0,
"management_enabled": {
"name": "LBPME",
"value": 0
},
"read_zeros": {
"name": "LBPRZ",
"value": 0
}
}, What information is actually useful? |
I want to gather as much information as possible from the SCSI devices, so there is no particular reason in missing "name" "form_factor": { |
What is your output? The goal of the plugin is not to capture every bit of information or field, but instead the valuable metrics. |
@powersj My intension is to collect as much available information as possible from SCSI devices, to understand the behavior of the devices based on these information (metrices) on drives failure. |
And if you aren't going to answer my questions shall I close this?
|
my output: |
ok maybe my bad as there is a misunderstanding here. I am trying to understand what you are outputting the collected metrics to. As in, what your telegraf output is. |
@powersj this is my telegraf output: |
Use Case
@powAfter upgrading smartctl from 7.2 to 7.4 version as said, I was able to get some additional fields. However the fields that I am getting from the json command are not in telegraf. cmd: smartctl --json --all $DEVICE --device $TYPE
The fields that I am looking for:
Expected behavior
I would like to get the results from the json output (cmd: smartctl --json --all $DEVICE --device $TYPE)into telegraf
Actual behavior
only seeing this particular log: "scsi_error_counter_log":
Additional info
No response
The text was updated successfully, but these errors were encountered: