diff --git a/README.md b/README.md index ae91ded621..4b1f712e4d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/applications/scrutiny.md b/docs/applications/scrutiny.md new file mode 100644 index 0000000000..4cdbc453c4 --- /dev/null +++ b/docs/applications/scrutiny.md @@ -0,0 +1,34 @@ +# scrutiny + +Homepage: + +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//nas.yml` file. + +The scrutiny web interface can be found at . + +## Specific Configuration + +To enable more disks to be scrutinized than just sda you'll need to edit your `inventories//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 +``` diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 042b60509a..d7384e432a 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -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 | | diff --git a/nas.yml b/nas.yml index 3e9cf2d752..753c629052 100644 --- a/nas.yml +++ b/nas.yml @@ -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 diff --git a/roles/scrutiny/defaults/main.yml b/roles/scrutiny/defaults/main.yml new file mode 100644 index 0000000000..a7f8e19f70 --- /dev/null +++ b/roles/scrutiny/defaults/main.yml @@ -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 diff --git a/roles/scrutiny/tasks/main.yml b/roles/scrutiny/tasks/main.yml new file mode 100644 index 0000000000..79c3622d50 --- /dev/null +++ b/roles/scrutiny/tasks/main.yml @@ -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"