AnalogJ / scrutiny

Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
MIT License
4.71k stars 154 forks source link

[BUG] record data can't update after replace disk use same device id #629

Open xinmans opened 2 months ago

xinmans commented 2 months ago

i have replace a hdd disk for my NAS,but the record data not update。 i delete the device on table devices from sqlite db,and re-run collect to work-aroud to fix it。will you fix it?

the fix step as below:


scrutiny/config# sqlite3 scrutiny.db 
sqlite> .tables devices
devices
sqlite> .schema devices
sqlite> select * from devices where host_id like  '%woniu%';
sqlite> delete from devices where device_name = 'sde' and  host_id like '%woniu%';
sqlite> select * from devices where host_id like '%woniu%';

sudo docker exec scrutiny-collector /opt/scrutiny/bin/scrutiny-collector-metrics run