diff --git a/zabbix_scripts/check_stor_dev_sudo b/zabbix_scripts/check_stor_dev_sudo index b4d33de..10daca8 100644 --- a/zabbix_scripts/check_stor_dev_sudo +++ b/zabbix_scripts/check_stor_dev_sudo @@ -107,9 +107,11 @@ if ($offline = get_smart_attr($data, 'Offline_Uncorrectable')){ $json->{offline_uncorrectable} = $offline->{raw}->{value}; } -if ($remain = get_smart_attr($data, 'Percent_Lifetime_Remain') || get_smart_attr($data, 'SSD_Life_Left')){ +if ($remain = get_smart_attr($data, 'Percent_Lifetime_Remain')){ $json->{percent_lifetime_remain} = $remain->{value}; -} elsif ($remain = get_smart_attr($data, 'Wear_Leveling_Count')) { +} elsif ($remain = get_smart_attr($data, 'SSD_Life_Left')){ + $json->{percent_lifetime_remain} = $remain->{raw}->{value}; +} elsif ($remain = get_smart_attr($data, 'Wear_Leveling_Count')){ $json->{percent_lifetime_remain} = $remain->{value}; } elsif (defined $data->{nvme_smart_health_information_log}->{percentage_used}){ # NMVe sometime report the estimated life used, instead of the remaining