{"id":20558877,"url":"https://github.com/mdhiggins/smartmontools","last_synced_at":"2025-10-04T00:32:39.466Z","repository":{"id":153181908,"uuid":"141311111","full_name":"mdhiggins/smartmontools","owner":"mdhiggins","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-05T17:31:48.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T17:35:53.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdhiggins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-07-17T15:46:37.000Z","updated_at":"2025-06-05T17:31:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8ad1c38-c18a-493b-977c-8d153f64babd","html_url":"https://github.com/mdhiggins/smartmontools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdhiggins/smartmontools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fsmartmontools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fsmartmontools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fsmartmontools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fsmartmontools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdhiggins","download_url":"https://codeload.github.com/mdhiggins/smartmontools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdhiggins%2Fsmartmontools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278249471,"owners_count":25955834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:47:27.022Z","updated_at":"2025-10-04T00:32:39.460Z","avatar_url":"https://github.com/mdhiggins.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smartmontools Docker Container\n\nA lightweight Docker container for `smartd`, the SMART disk monitoring daemon from the `smartmontools` package. This container supports monitoring both SATA and NVMe devices, sending email alerts, and running scheduled self-tests.\n\n## Features\n\n* Runs `smartd` in the foreground for container compatibility\n* Supports monitoring of multiple disks including NVMe\n* Sends email alerts on disk health changes or failures\n* Configurable scheduling for short/long self-tests\n* Uses `msmtp` for email relay\n\n## Configuration\n\nThe container expects two main configuration files:\n\n### `smartd.conf`\n\nSample:\n\n```conf\nDEFAULT -a -s (S/../../7/13|L/../15/./15) -W 0,0,46 -m your@email.com -M daily -H\n/dev/sda\n/dev/sdb\n/dev/sdc\n\nDEFAULT -a -s (S/../../7/13|L/../15/./15) -W 0,0,70 -m your@email.com -M daily -H\n/dev/nvme0\n```\n\n* `-a`: enables all default SMART checks.\n* `-s`: schedules tests:\n\n  * `S` = short test every 7th day at 13:00\n  * `L` = long test every 15th day at 15:00\n* `-W` = temperature thresholds (diff, info, crit)\n* `-m` = email address for alerts\n* `-M daily` = sends a status report every day\n* `-H` = monitor SMART health status\n\n[smartd.conf documentation](https://linux.die.net/man/5/smartd.conf)\n\n### `/etc/msmtprc`\n\nSample:\n\n```conf\ndefaults\nauth           on\ntls            on\ntls_trust_file /etc/ssl/certs/ca-certificates.crt\nlogfile        /var/log/msmtp.log\n\n# Gmail SMTP configuration\naccount        mail\nhost           smtp.gmail.com\nport           587\nfrom           your.email@gmail.com\nuser           your.email@gmail.com\npassword       your-app-password\n\n# Set default account\naccount default : mail\n```\n\n\u003e You must generate an [App Password](https://support.google.com/accounts/answer/185833?hl=en) if you're using Gmail with 2FA.\n\n\n### Confirm Scheduling!\n\nrun `docker exec smartmontools smartd -q showtests` and confirm your testing schedule shows upt\n\n```\nNext scheduled self tests (at most 5 of each type per device):\nDevice: /dev/sda [SAT], will do test 1 of type S at Sun Jun  8 04:27:51 2025 EDT\nDevice: /dev/sdb [SAT], will do test 1 of type S at Sun Jun  8 04:27:51 2025 EDT\nDevice: /dev/sdc [SAT], will do test 1 of type S at Sun Jun  8 04:27:51 2025 EDT\nDevice: /dev/nvme0, will do test 1 of type S at Sun Jun  8 04:27:51 2025 EDT\n```\n\n## Docker Compose\n\n```yaml\nversion: '3.8'\nservices:\n  smartmontools:\n    image: yourusername/smartmontools\n    container_name: smartmontools\n    restart: unless-stopped\n    privileged: true\n    volumes:\n      - /opt/appdata/smartmontools/smartd.conf:/etc/smartd.conf:ro\n      - /opt/appdata/smartmontools/msmtprc:/etc/msmtprc:ro\n      - /dev:/dev\n    environment:\n      - TZ=America/New_York\n```\n\n* `privileged: true`: required for access to `/dev` and SMART attributes\n* `TZ`: sets correct timezone inside container\n\n## Email Setup Notes\n\n* **Test email** is sent at startup using `-M test`\n* **Daily report** requires `-M daily` and proper scheduling via `-s` and are only sent if an error is detected\n* Ensure system time and container time are aligned using the TZ variable\n\n## Troubleshooting\n\n* `smartctl -l selftest /dev/sdX` will show test history for confirmation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdhiggins%2Fsmartmontools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdhiggins%2Fsmartmontools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdhiggins%2Fsmartmontools/lists"}