Skip to content

ADD: scrutiny - Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds #582

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ If you have a spare domain name you can configure applications to be accessible
* [Route53 DDNS](https://crazymax.dev/ddns-route53/) - Automatically update AWS Route53 with your IP address
* [RSS-Bridge](https://rss-bridge.github.io/rss-bridge/) - The RSS feed for websites missing it
* [Sabnzbd](https://sabnzbd.org/) - A powerful usenet downloader that FreeNAS provides
* [scrutiny](https://github.com/AnalogJ/scrutiny) - Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
* [Sickchill](https://sickchill.github.io/) - for managing TV episodes
* [Sonarr](https://sonarr.tv/) - for downloading and managing TV episodes
* [Speedtest-Tracker](https://github.com/henrywhitaker3/Speedtest-Tracker) - Continuously track your internet speed
Expand Down
34 changes: 34 additions & 0 deletions docs/applications/scrutiny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# scrutiny

Homepage: <https://github.com/AnalogJ/scrutiny/>

scrutiny is a Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds.

## Usage

Set `scrutiny_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.

The scrutiny web interface can be found at <http://ansible_nas_host_or_ip:8086>.

## Specific Configuration

To enable more disks to be scrutinized than just sda you'll need to edit your `inventories/<your_inventory>/nas.yml` file and add an override for the devices the scrutiny container can see. Example:

```ansible
scrutiny_devices:
- /dev/sda:/dev/sda
- /dev/sdb:/dev/sdb
- /dev/sdc:/dev/sdc
- /dev/sdd:/dev/sdd
- /dev/sde:/dev/sde
- /dev/sdf:/dev/sdf
- /dev/sdg:/dev/sdg
- /dev/sdh:/dev/sdh
- /dev/sdi:/dev/sdi
- /dev/sdj:/dev/sdj
- /dev/sdk:/dev/sdk
- /dev/sdl:/dev/sdl
- /dev/sdm:/dev/sdm
- /dev/sdn:/dev/sdn
- /dev/nvme0n1:/dev/nvme0n1
```
1 change: 1 addition & 0 deletions docs/configuration/application_ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ By default, applications can be found on the ports listed below.
| Radarr | 7878 | Bridge | HTTP |
| RSS-Bridge | 8091 | Bridge | HTTP |
| Sabnzbd | 18080 | Bridge | HTTP |
| scrutiny | 8085 | Bridge | HTTP |
| Sickchill | 8081 | Bridge | HTTP |
| Sonarr | 8989 | Bridge | HTTP |
| Speedtest-Trk | 8765 | HTTP | |
Expand Down
5 changes: 5 additions & 0 deletions nas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@
- sabnzbd
when: (sabnzbd_enabled | default(False))

- role: scrutiny
tags:
- scrutiny
when: (scrutiny_enabled | default(False))

- role: route53_ddns
tags:
- route53_ddns
Expand Down
23 changes: 23 additions & 0 deletions roles/scrutiny/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# enable or disable the application
scrutiny_enabled: false
scrutiny_available_externally: false

# directories
scrutiny_data_directory: "{{ docker_home }}/scrutiny"

# uid / gid
scrutiny_user_id: "0"
scrutiny_group_id: "0"

# network
scrutiny_hostname: "scrutiny"
scrutiny_port: "8085"
scrutiny_influxdb_port: "8086"

# specs
scrutiny_memory: "256m"

# disks
scrutiny_devices:
- /dev/sda:/dev/sda
35 changes: 35 additions & 0 deletions roles/scrutiny/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Create Scrutiny Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ scrutiny_data_directory }}"
- "{{ scrutiny_data_directory }}/config"
- "{{ scrutiny_data_directory }}/influxdb"

- name: Create Scrutiny Docker Container
docker_container:
name: scrutiny
image: ghcr.io/analogj/scrutiny:master-omnibus
pull: true
env:
volumes:
- "{{ scrutiny_data_directory }}/config:/opt/scrutiny/config"
- "{{ scrutiny_data_directory }}/influxdb:/opt/scrutiny/influxdb"
- "/run/udev:/run/udev:ro"
ports:
- "{{ scrutiny_port }}: 8080"
devices: "{{ scrutiny_devices }}"
capabilities:
- SYS_RAWIO
- SYS_ADMIN
restart_policy: unless-stopped
memory: "{{ scrutiny_memory }}"
labels:
traefik.enable: "{{ scrutiny_available_externally | string }}"
traefik.http.routers.scrutiny.rule: "Host(`{{ scrutiny_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.scrutiny.tls.certresolver: "letsencrypt"
traefik.http.routers.scrutiny.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.scrutiny.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.scrutiny.loadbalancer.server.port: "8080"