2022-01-26

Seq 硬碟滿了處理方式

Seq 硬碟滿了處理方式

硬碟使用量100%時無法使用Web介面刪除紀錄

1.停止Seq container

docker stop seq

2.將docker掛載的data目錄過舊的資料刪除

cd /data/Stream
ls -lah|grep M|grep Dec|awk {'system("rm -f " $NF)'}

3.啟動Seq container

此時連線web會產生錯誤

// 20220126100328 
// http://192.168.30.245:5880/#/events
{
  "Error": "Seq is unavailable. Failed to initialize storage: Flare native 
storage failed (InternalError), data file 
`\"/data/Stream/stream.08d9cbdb889e7c00_08d9cbe81b451800.eeb0800c543741ada6e
96cbebcfc30a4.span\"` is missing." 
}

4.在docker中執行 修復

/bin/seq-server/Native/flaretl repair  /data/Stream/ 
#可能需要執行多次
#直到出現 No storage problems were found

5.重啟Seq

修復完成後沒重啟頁面依然會顯示錯誤

參考:

https://github.com/datalust/seq-tickets/discussions/1354 https://docs.datalust.co/docs/exporting-log-data

adsense