主頁
論壇
新帖
日曆
每月
每週
議程
檔案室
最新消息
新帖
個人空間資訊
最新動態
聊天室
0
登錄
註冊
最新消息
新帖
菜單
登錄
註冊
安裝應用
安裝
論壇
Lilyandy休閒資訊網
Synology NAS 技術分享
Synology NAS 進階教學:如何將 S.M.A.R.T. 視覺化?學習佈署 Scrutiny。
禁用JavaScript。為了獲得更好的體驗,請在運行之前啟用流覽器中的JavaScript。
您正在使用一款已經過時的流覽器!部分功能不能正常使用。
請嘗試升級或使用
其他流覽器
。
回復主題
信息
<blockquote data-quote="Lilyandy" data-source="post: 25" data-attributes="member: 1"><p>Synology NAS 進階教學:如何將 S.M.A.R.T. 視覺化?學習佈署 Scrutiny。</p><p></p><p>由於DSM 7起,移除了 S.M.A.R.T. 詳細資訊,</p><p>因此若需要查看 S.M.A.R.T. 有幾種方式:</p><p>①SSH指令查看。</p><p>②指令碼匯出檔案查看。</p><p>③佈署Scrutiny視覺化介面。</p><p></p><p>這裏以『佈署Scrutiny視覺化介面』為例,</p><p>不過,使用前,必需是 Plus 等級以上機型,</p><p>因為需要使用 Docker(Container Manager)佈署,</p><p>因此若非 Plus 以上機型,請放棄此法!</p><p>非 Plus 以上之機型,只能使用①②法囉~</p><p></p><p>首先請先安裝 Container Manager,</p><p>接下來,請在 docker 目錄,建立以下目錄結構:</p><p></p><p>docker┼Scrutiny┐</p><p> ├config──┬collector.yaml</p><p> │ └scrutiny.yaml</p><p> ├influxdb</p><p> ├run</p><p> └docker-compose.yml</p><p></p><p>檔名不能修改,如圖所示:</p><p>[ATTACH=full]152[/ATTACH]</p><p></p><p>[ATTACH=full]153[/ATTACH]接下來編輯『docker-compose.yml』佈署安裝檔,</p><p>=====================================================</p><p>[CODE]version: '3.5'</p><p></p><p>services:</p><p> scrutiny:</p><p> restart: unless-stopped</p><p> container_name: scrutiny</p><p> image: ghcr.io/analogj/scrutiny:master-omnibus</p><p> deploy:</p><p> resources:</p><p> limits:</p><p> # memory: 256M # 限制最多使用 256MB 記憶體(非必備)</p><p> cap_add:</p><p> - SYS_RAWIO</p><p> - SYS_ADMIN</p><p> ports:</p><p> - "8080:8080" # webapp【前面是本機Port,可自訂;後面是容器Port,不可改。】</p><p> - "8086:8086" # influxDB admin</p><p> volumes:</p><p> - /run/udev:/run/udev:ro</p><p> - /volume1/docker/Scrutiny/config:/opt/scrutiny/config</p><p> - /volume1/docker/Scrutiny/influxdb:/opt/scrutiny/influxdb</p><p> devices:</p><p> - /dev/sda:/dev/sda</p><p> - /dev/sdb:/dev/sdb</p><p># - /dev/sdc:/dev/sdc</p><p># - /dev/sdd:/dev/sdd</p><p> - /dev/sdi:/dev/sdi</p><p> - /dev/sdj:/dev/sdj</p><p># - /dev/nvme0n1:/dev/nvme0n1</p><p># - /dev/nvme1n1:/dev/nvme1n1</p><p># - /dev/usb1:/dev/usb1</p><p># - /dev/usb2:/dev/usb2</p><p> environment:</p><p> # - SCRUTINY_WEB_INFLUXDB_TOKEN= #任意長字串(非必要)</p><p> # - SCRUTINY_WEB_INFLUXDB_INIT_USERNAME= 用戶名(非必要)</p><p> # - SCRUTINY_WEB_INFLUXDB_INIT_PASSWORD=密碼 #至少8字元的密碼(非必要)</p><p> - TIMEZONE=Asia/Taipei</p><p> security_opt:</p><p> - no-new-privileges:true[/CODE]</p><p>=====================================================</p><p>【修改後,放在容器目錄下!如前截圖。】</p><p><a href="https://xf.lilyandy.com/attachments/170/?hash=82ea82ae272e33143dd6cc818da194f3" target="_blank">按我下載docker-compose.yml範例檔</a></p><p></p><p>請注意,不能照搬唷!這是筆者使用的設定檔!</p><p>並不代表你也可以使用,因此需要先SSH查詢正確的裝置位置!</p><p>SSH查詢指令:</p><p>smartctl --scan</p><p>若你不熟悉SSH指令,可將它直接加入『任務排程表』,</p><p>新增→排程任務→使用者定義指令碼,如圖所示:</p><p>【請注意,必需是管理員帳號!】</p><p>[ATTACH=full]155[/ATTACH]</p><p>[ATTACH=full]156[/ATTACH]</p><p>[ATTACH=full]157[/ATTACH]</p><p></p><p>建立完成後,先執行它,接下來收信!</p><p>只要電郵是有效的,會得到以下類似的結果,</p><p>[ATTACH=full]159[/ATTACH]</p><p>這就是您目前的裝置,請記下!</p><p>並且修改 docker-compose.yml 檔,</p><p>需修改成目前已搜尋到的裝置,</p><p>不存在的請勿輸入或『#』註解掉,</p><p>否則會佈署失敗!請留意!</p><p>以後若有增減裝置,則必需重新佈署唷!</p><p>以下,看圖說說故事,依序佈署之~~</p><p>[ATTACH=full]160[/ATTACH]</p><p>[ATTACH=full]161[/ATTACH]</p><p>[ATTACH=full]162[/ATTACH]</p><p>[ATTACH=full]163[/ATTACH]</p><p>[ATTACH=full]164[/ATTACH]</p><p>[ATTACH=full]165[/ATTACH]</p><p>[ATTACH=full]166[/ATTACH]</p><p></p><p>佈署成功後,在網址列輸入:</p><p>NAS IP<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick out tongue :p" loading="lazy" data-shortname=":p" />ort</p><p>範例:</p><p>192.168.1.115:9090</p><p>即出現以下畫面,代表成功了!</p><p>[ATTACH=full]167[/ATTACH]</p><p></p><p>若出現以下畫面,代表截取資料失敗!</p><p>[ATTACH=full]168[/ATTACH]</p><p></p><p>此時需要額外設定『collector.yaml』</p><p></p><p>=====================================================</p><p>[CODE]# Commented Scrutiny Configuration File</p><p>#</p><p># The default location for this file is /opt/scrutiny/config/collector.yaml.</p><p># In some cases to improve clarity default values are specified,</p><p># uncommented. Other example values are commented out.</p><p>#</p><p># When this file is parsed by Scrutiny, all configuration file keys are</p><p># lowercased automatically. As such, Configuration keys are case-insensitive,</p><p># and should be lowercase in this file to be consistent with usage.</p><p></p><p></p><p>######################################################################</p><p># Version</p><p>#</p><p># version specifies the version of this configuration file schema, not</p><p># the scrutiny binary. There is only 1 version available at the moment</p><p>version: 1</p><p></p><p># The host id is a label used for identifying groups of disks running on the same host</p><p># Primiarly used for hub/spoke deployments (can be left empty if using all-in-one image).</p><p>host:</p><p> id: ""</p><p></p><p></p><p># This block allows you to override/customize the settings for devices detected by</p><p># Scrutiny via `smartctl --scan`</p><p># See the "--device=TYPE" section of https://linux.die.net/man/8/smartctl</p><p># type can be a 'string' or a 'list'</p><p>devices:</p><p> - device: /dev/sda</p><p> type: 'sat'</p><p> - device: /dev/sdb</p><p> type: 'sat'</p><p># - device: /dev/sdc</p><p># type: 'sat'</p><p># - device: /dev/sdd</p><p># type: 'sat'</p><p> - device: /dev/sde</p><p> type: 'sat'</p><p> - device: /dev/sdf</p><p> type: 'sat'</p><p># - device: /dev/nvme0n1</p><p># type: 'nvme'</p><p># - device: /dev/nvme1n1</p><p># type: 'nvme'</p><p># - device: /dev/usb1</p><p># type: 'sat'</p><p># - device: /dev/usb2</p><p># type: 'sat'</p><p></p><p># # example for forcing device type detection for a single disk</p><p># - device: /dev/sda</p><p># type: 'sat'</p><p>#</p><p># # example for using `-d sat,auto`, notice the square brackets (workaround for #418)</p><p># - device: /dev/sda</p><p># type: ['sat,auto']</p><p>#</p><p># # example to show how to ignore a specific disk/device.</p><p># - device: /dev/sda</p><p># ignore: true</p><p>#</p><p># # examples showing how to force smartctl to detect disks inside a raid array/virtual disk</p><p># - device: /dev/bus/0</p><p># type:</p><p># - megaraid,14</p><p># - megaraid,15</p><p># - megaraid,18</p><p># - megaraid,19</p><p># - megaraid,20</p><p># - megaraid,21</p><p>#</p><p># - device: /dev/twa0</p><p># type:</p><p># - 3ware,0</p><p># - 3ware,1</p><p># - 3ware,2</p><p># - 3ware,3</p><p># - 3ware,4</p><p># - 3ware,5</p><p>#</p><p># # example to show how to override the smartctl command args (per device), see below for how to override these globally.</p><p># - device: /dev/sda</p><p># commands:</p><p># metrics_info_args: '--info --json -T permissive' # used to determine device unique ID & register device with Scrutiny</p><p># metrics_smart_args: '--xall --json -T permissive' # used to retrieve smart data for each device.</p><p></p><p></p><p>#log:</p><p># file: '' #absolute or relative paths allowed, eg. web.log</p><p># level: INFO</p><p>#</p><p>#api:</p><p># endpoint: 'http://localhost:8080'</p><p># endpoint: 'http://localhost:8080/custombasepath'</p><p># if you need to use a custom base path (for a reverse proxy), you can add a suffix to the endpoint.</p><p># See docs/TROUBLESHOOTING_REVERSE_PROXY.md for more info,</p><p></p><p># example to show how to override the smartctl command args globally</p><p>#commands:</p><p># metrics_info_args: '--info --json -d ata'</p><p># metrics_smart_args: '--xall --json -d ata'</p><p># metrics_smartctl_bin: 'smartctl' # change to provide custom `smartctl` binary path, eg. `/usr/sbin/smartctl`</p><p># metrics_scan_args: '--scan --json' # used to detect devices</p><p># metrics_info_args: '--info --json' # used to determine device unique ID & register device with Scrutiny</p><p># metrics_smart_args: '--xall --json' # used to retrieve smart data for each device.</p><p># metrics_smartctl_wait: 0 # time to wait in seconds between each disk's check</p><p></p><p></p><p>########################################################################################################################</p><p># FEATURES COMING SOON</p><p>#</p><p># The following commented out sections are a preview of additional configuration options that will be available soon.</p><p>#</p><p>########################################################################################################################</p><p></p><p>#collect:</p><p># long:</p><p># enable: false</p><p># command: ''</p><p># short:</p><p># enable: false</p><p># command: ''[/CODE]</p><p>=====================================================</p><p><a href="https://xf.lilyandy.com/attachments/169/?hash=b41cb5b24f8018c37174a85e5f027a14" target="_blank">按我下載collector.yaml範例檔</a></p><p></p><p>請找到 <span style="color: rgb(226, 80, 65)">devices:</span> ,並修改正確的裝置,</p><p>例如:</p><p><span style="color: rgb(226, 80, 65)"> - device: /dev/sda</span></p><p><span style="color: rgb(226, 80, 65)"> type: 'sat'</span></p><p>這兩行為一組裝置參數,依此類推,</p><p>需與『docker-compose.yml』安裝佈署檔上的裝置一致,</p><p>設定完畢後,別急著啟動,請先至 <span style="color: rgb(44, 130, 201)">config</span> 目錄下,</p><p>找到 <span style="color: rgb(41, 105, 176)">scrutiny.db</span> 刪除,並重新佈署,即可正常刷新。</p><p></p><p>以上,只要修改設定檔,就必需刪除該容器,再重新佈署唷!</p></blockquote><p></p>
[QUOTE="Lilyandy, post: 25, member: 1"] Synology NAS 進階教學:如何將 S.M.A.R.T. 視覺化?學習佈署 Scrutiny。 由於DSM 7起,移除了 S.M.A.R.T. 詳細資訊, 因此若需要查看 S.M.A.R.T. 有幾種方式: ①SSH指令查看。 ②指令碼匯出檔案查看。 ③佈署Scrutiny視覺化介面。 這裏以『佈署Scrutiny視覺化介面』為例, 不過,使用前,必需是 Plus 等級以上機型, 因為需要使用 Docker(Container Manager)佈署, 因此若非 Plus 以上機型,請放棄此法! 非 Plus 以上之機型,只能使用①②法囉~ 首先請先安裝 Container Manager, 接下來,請在 docker 目錄,建立以下目錄結構: docker┼Scrutiny┐ ├config──┬collector.yaml │ └scrutiny.yaml ├influxdb ├run └docker-compose.yml 檔名不能修改,如圖所示: [ATTACH type="full" alt="2026-02-19_124358.png"]152[/ATTACH] [ATTACH type="full" alt="2026-02-19_124420.png"]153[/ATTACH]接下來編輯『docker-compose.yml』佈署安裝檔, ===================================================== [CODE]version: '3.5' services: scrutiny: restart: unless-stopped container_name: scrutiny image: ghcr.io/analogj/scrutiny:master-omnibus deploy: resources: limits: # memory: 256M # 限制最多使用 256MB 記憶體(非必備) cap_add: - SYS_RAWIO - SYS_ADMIN ports: - "8080:8080" # webapp【前面是本機Port,可自訂;後面是容器Port,不可改。】 - "8086:8086" # influxDB admin volumes: - /run/udev:/run/udev:ro - /volume1/docker/Scrutiny/config:/opt/scrutiny/config - /volume1/docker/Scrutiny/influxdb:/opt/scrutiny/influxdb devices: - /dev/sda:/dev/sda - /dev/sdb:/dev/sdb # - /dev/sdc:/dev/sdc # - /dev/sdd:/dev/sdd - /dev/sdi:/dev/sdi - /dev/sdj:/dev/sdj # - /dev/nvme0n1:/dev/nvme0n1 # - /dev/nvme1n1:/dev/nvme1n1 # - /dev/usb1:/dev/usb1 # - /dev/usb2:/dev/usb2 environment: # - SCRUTINY_WEB_INFLUXDB_TOKEN= #任意長字串(非必要) # - SCRUTINY_WEB_INFLUXDB_INIT_USERNAME= 用戶名(非必要) # - SCRUTINY_WEB_INFLUXDB_INIT_PASSWORD=密碼 #至少8字元的密碼(非必要) - TIMEZONE=Asia/Taipei security_opt: - no-new-privileges:true[/CODE] ===================================================== 【修改後,放在容器目錄下!如前截圖。】 [URL='https://xf.lilyandy.com/attachments/170/?hash=82ea82ae272e33143dd6cc818da194f3']按我下載docker-compose.yml範例檔[/URL] 請注意,不能照搬唷!這是筆者使用的設定檔! 並不代表你也可以使用,因此需要先SSH查詢正確的裝置位置! SSH查詢指令: smartctl --scan 若你不熟悉SSH指令,可將它直接加入『任務排程表』, 新增→排程任務→使用者定義指令碼,如圖所示: 【請注意,必需是管理員帳號!】 [ATTACH type="full" alt="2026-02-19_134348.png"]155[/ATTACH] [ATTACH type="full" alt="2026-02-19_134629.png"]156[/ATTACH] [ATTACH type="full" alt="2026-02-19_134802.png"]157[/ATTACH] 建立完成後,先執行它,接下來收信! 只要電郵是有效的,會得到以下類似的結果, [ATTACH type="full" alt="2026-02-19_135254.png"]159[/ATTACH] 這就是您目前的裝置,請記下! 並且修改 docker-compose.yml 檔, 需修改成目前已搜尋到的裝置, 不存在的請勿輸入或『#』註解掉, 否則會佈署失敗!請留意! 以後若有增減裝置,則必需重新佈署唷! 以下,看圖說說故事,依序佈署之~~ [ATTACH type="full" alt="2026-02-19_124511.png"]160[/ATTACH] [ATTACH type="full" alt="2026-02-19_124609.png"]161[/ATTACH] [ATTACH type="full" alt="2026-02-19_124649.png"]162[/ATTACH] [ATTACH type="full" alt="2026-02-19_125029.png"]163[/ATTACH] [ATTACH type="full" alt="2026-02-19_125044.png"]164[/ATTACH] [ATTACH type="full" alt="2026-02-19_125455.png"]165[/ATTACH] [ATTACH type="full" alt="2026-02-19_125522.png"]166[/ATTACH] 佈署成功後,在網址列輸入: NAS IP:port 範例: 192.168.1.115:9090 即出現以下畫面,代表成功了! [ATTACH type="full" alt="2026-02-19_131501.png"]167[/ATTACH] 若出現以下畫面,代表截取資料失敗! [ATTACH type="full" alt="2026-02-14_133207.png"]168[/ATTACH] 此時需要額外設定『collector.yaml』 ===================================================== [CODE]# Commented Scrutiny Configuration File # # The default location for this file is /opt/scrutiny/config/collector.yaml. # In some cases to improve clarity default values are specified, # uncommented. Other example values are commented out. # # When this file is parsed by Scrutiny, all configuration file keys are # lowercased automatically. As such, Configuration keys are case-insensitive, # and should be lowercase in this file to be consistent with usage. ###################################################################### # Version # # version specifies the version of this configuration file schema, not # the scrutiny binary. There is only 1 version available at the moment version: 1 # The host id is a label used for identifying groups of disks running on the same host # Primiarly used for hub/spoke deployments (can be left empty if using all-in-one image). host: id: "" # This block allows you to override/customize the settings for devices detected by # Scrutiny via `smartctl --scan` # See the "--device=TYPE" section of https://linux.die.net/man/8/smartctl # type can be a 'string' or a 'list' devices: - device: /dev/sda type: 'sat' - device: /dev/sdb type: 'sat' # - device: /dev/sdc # type: 'sat' # - device: /dev/sdd # type: 'sat' - device: /dev/sde type: 'sat' - device: /dev/sdf type: 'sat' # - device: /dev/nvme0n1 # type: 'nvme' # - device: /dev/nvme1n1 # type: 'nvme' # - device: /dev/usb1 # type: 'sat' # - device: /dev/usb2 # type: 'sat' # # example for forcing device type detection for a single disk # - device: /dev/sda # type: 'sat' # # # example for using `-d sat,auto`, notice the square brackets (workaround for #418) # - device: /dev/sda # type: ['sat,auto'] # # # example to show how to ignore a specific disk/device. # - device: /dev/sda # ignore: true # # # examples showing how to force smartctl to detect disks inside a raid array/virtual disk # - device: /dev/bus/0 # type: # - megaraid,14 # - megaraid,15 # - megaraid,18 # - megaraid,19 # - megaraid,20 # - megaraid,21 # # - device: /dev/twa0 # type: # - 3ware,0 # - 3ware,1 # - 3ware,2 # - 3ware,3 # - 3ware,4 # - 3ware,5 # # # example to show how to override the smartctl command args (per device), see below for how to override these globally. # - device: /dev/sda # commands: # metrics_info_args: '--info --json -T permissive' # used to determine device unique ID & register device with Scrutiny # metrics_smart_args: '--xall --json -T permissive' # used to retrieve smart data for each device. #log: # file: '' #absolute or relative paths allowed, eg. web.log # level: INFO # #api: # endpoint: 'http://localhost:8080' # endpoint: 'http://localhost:8080/custombasepath' # if you need to use a custom base path (for a reverse proxy), you can add a suffix to the endpoint. # See docs/TROUBLESHOOTING_REVERSE_PROXY.md for more info, # example to show how to override the smartctl command args globally #commands: # metrics_info_args: '--info --json -d ata' # metrics_smart_args: '--xall --json -d ata' # metrics_smartctl_bin: 'smartctl' # change to provide custom `smartctl` binary path, eg. `/usr/sbin/smartctl` # metrics_scan_args: '--scan --json' # used to detect devices # metrics_info_args: '--info --json' # used to determine device unique ID & register device with Scrutiny # metrics_smart_args: '--xall --json' # used to retrieve smart data for each device. # metrics_smartctl_wait: 0 # time to wait in seconds between each disk's check ######################################################################################################################## # FEATURES COMING SOON # # The following commented out sections are a preview of additional configuration options that will be available soon. # ######################################################################################################################## #collect: # long: # enable: false # command: '' # short: # enable: false # command: ''[/CODE] ===================================================== [URL='https://xf.lilyandy.com/attachments/169/?hash=b41cb5b24f8018c37174a85e5f027a14']按我下載collector.yaml範例檔[/URL] 請找到 [COLOR=rgb(226, 80, 65)]devices:[/COLOR] ,並修改正確的裝置, 例如: [COLOR=rgb(226, 80, 65)] - device: /dev/sda type: 'sat'[/COLOR] 這兩行為一組裝置參數,依此類推, 需與『docker-compose.yml』安裝佈署檔上的裝置一致, 設定完畢後,別急著啟動,請先至 [COLOR=rgb(44, 130, 201)]config[/COLOR] 目錄下, 找到 [COLOR=rgb(41, 105, 176)]scrutiny.db[/COLOR] 刪除,並重新佈署,即可正常刷新。 以上,只要修改設定檔,就必需刪除該容器,再重新佈署唷! [/QUOTE]
驗證
回復帖子
論壇
Lilyandy休閒資訊網
Synology NAS 技術分享
Synology NAS 進階教學:如何將 S.M.A.R.T. 視覺化?學習佈署 Scrutiny。
訪客聊天
幫助
使用者
設定
通知
各種各樣的
訊息方向相反
在頂部顯示編輯器
啟用最大化模式
將圖像顯示為連結
隱藏機器人訊息
隱藏狀態
隱藏聊天列表
顯示來自被忽略用戶的訊息
關閉聊天
接收提及提醒
聲音通知
一般訊息
私人訊息
私訊
提及訊息
機器人訊息
桌面通知
一般訊息
私人訊息
私訊
提及訊息
機器人訊息
選項
選項
目前沒有人在聊天。
提交
聊天中沒有消息。成為第一個打招呼的人!
聊天
0
本站需要使用 Cookie。如果您繼續使用本站,則表示同意我們使用 Cookie。
接受
瞭解更多。……
頂部