-
Notifications
You must be signed in to change notification settings - Fork 95
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
Exploit the mining abstraction to normalize metrics #111
Comments
Hi @anthonyeleven, your request was a little hard to understand without examples. I went digging and found an example! This is for the same drive. While smartctl --json --info --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error /dev/sdg |
yq -o json '.ata_smart_attributes.table | with_entries(select(.[].name == "Airflow_Temperature_Cel"))' {
"13": {
"id": 190,
"name": "Airflow_Temperature_Cel",
"value": 72,
"worst": 48,
"thresh": 45,
"when_failed": "",
"flags": {
"value": 34,
"string": "-O---K ",
"prefailure": false,
"updated_online": true,
"performance": false,
"error_rate": false,
"event_count": false,
"auto_keep": true
},
"raw": {
"value": 471269404,
"string": "28 (Min/Max 23/28)"
}
}
} smartctl --json --info --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error /dev/sdg |
yq -o json '.ata_smart_attributes.table | with_entries(select(.[].name == "Temperature_Celsius"))' {
"14": {
"id": 194,
"name": "Temperature_Celsius",
"value": 28,
"worst": 52,
"thresh": 0,
"when_failed": "",
"flags": {
"value": 34,
"string": "-O---K ",
"prefailure": false,
"updated_online": true,
"performance": false,
"error_rate": false,
"event_count": false,
"auto_keep": true
},
"raw": {
"value": 34359738396,
"string": "28 (0 8 0 0 0)"
}
}
} smartctl --json --info --health --attributes --tolerance=verypermissive --nocheck=standby --format=brief --log=error /dev/sdg | yq -o json '.temperature' {
"current": 28
}
|
That's one example. To rephrase: SMART is not implemented very consistently. Some SSDs report, for example, lifetime remaining, while others report lifetime used. Some report a given attribute with a different numeric ID than others. So a tool that reports based on numeric attribute IDs will benefit from a bit of "correction" before emitting the prom exposition format.
The whole point of an exporter like this is to emit metrics that can be queried across a whole fleet, without having to craft the query differently for different drive models. I've attached a hacked-up script that I'm currently using via If we can ever get a usable HBA RAID enhancement merged, I'll contribute this sort of thing. I'm stuck with thousands of @#$@#%^!! RoC HBA VDs so a collector that can't handle them doesn't do anything for me. |
The exporter currently appears to expose two classes of metrics:
smartctl_device_attribute
metricssmartctl_device_percentage_used
The mining function paradigm has considerable potential beyond the way it is currently used. For example:
The text was updated successfully, but these errors were encountered: