{"id":15517107,"url":"https://github.com/deric/puppet-smartd","last_synced_at":"2026-01-26T02:33:29.851Z","repository":{"id":59373543,"uuid":"536672385","full_name":"deric/puppet-smartd","owner":"deric","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-03T15:29:45.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-15T19:29:42.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deric.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-09-14T16:41:15.000Z","updated_at":"2025-09-03T15:29:43.000Z","dependencies_parsed_at":"2024-06-22T08:06:45.291Z","dependency_job_id":"be44de31-658f-48c6-b5fc-1297a64f50dd","html_url":"https://github.com/deric/puppet-smartd","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"37d3a078a6827a5acdcbe8da2f02e722246bc2f2"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/deric/puppet-smartd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-smartd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-smartd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-smartd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-smartd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deric","download_url":"https://codeload.github.com/deric/puppet-smartd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deric%2Fpuppet-smartd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28765073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T02:25:41.078Z","status":"ssl_error","status_checked_at":"2026-01-26T02:24:28.809Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10-02T10:11:36.793Z","updated_at":"2026-01-26T02:33:29.815Z","avatar_url":"https://github.com/deric.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-smartd\n\n[![Puppet\nForge](http://img.shields.io/puppetforge/v/deric/smartd.svg)](https://forge.puppet.com/modules/deric/smartd) [![Build Status](https://github.com/deric/puppet-smartd/actions/workflows/spec.yml/badge.svg?branch=main)](https://github.com/deric/puppet-smartd/actions/workflows/spec.yml)\n\nSimplified `smartd` configuration management with Puppet.\n\n## Usage\n\n```puppet\ninclude smartd\n```\nand confgure e-mail nofifications for all disks:\n```yaml\nsmartd::defaults: '-a -m root@domain.org'\n```\nthis would generate a `smartd.conf` based on `smartd::disks` (by default `$facts['disks']` is used):\n```\nDEFAULT -a -m root@domain.org\n/dev/sda -d ata\n/dev/sdb -d ata\n```\n\nMain class `smartd` supports following attributes:\n\n - `defaults` Shared configuration directives can be specified e.g. common email `-m root@my.org`. Accepts string or an array or strings.\n - `disks` Fact or Hash containing devices declaration\n - `rules` Applied `smartd` options to disks definition.\n - `devicescan` When enabled will automatically detect all matching devices (restricted by `options`). Default: `false`\n - `options` DEVICESCAN options, e.g. `-d removable` will ignore errors on removable devices. Requires `devicescan: true`. Accepts string or an array or strings.\n\nBy default Puppet built-in `$facts['disks']` is used (accessible also via `facter -y disks`), e.g.:\n\n```yaml\nnvme0n1:\n  model: \"SAMSUNG MZQL2960HCJR-00A07\"\n  serial: \"S64FNE0R503522\"\n  size: 894.25 GiB\n  size_bytes: 960197124096\n  type: ssd\n```\nthat can be used to generate configuration (at least simple list of devices). Though any other fact or hardcoded hash of disks might be used.\n\nThe `rules` parameter can be used to define e.g. model/vendor specific rules that might be generalized.\n\n```yaml\nsmartd::rules:\n  - attr: model         # attr value match disk attributes, e.g. vendor, type, etc. might be used\n    match: SAMSUNG MZ7\n    options: -I 173     # ignore wear_level_count for disks matching this model\n```\n\nMatch device name using special key `$name`:\n\n```yaml\nsmartd::rules:\n  - attr: $name\n    match: ^nvme  # regexp match\n    options: -H   # will append all matching rules\n  - attr: type\n    match: ssd\n    options:  -l error\n```\nthis would output (assuming NVMe has attribute type with value `ssd`)\n```\n/dev/nvme0n1 -H -l error\n```\n\nIgnore device completely (will be ommited from the list):\n\n```yaml\nsmartd::rules:\n  - attr: vendor\n    match: DELL\n    action: ignore\n```\n\nApply `megaraid` device type\n```yaml\nsmartd::rules:\n  - atrr: model\n    match: PERC\n    options: -d megaraid,0\n```\n\n## Configuration parameters\n\nSee [man smartd.conf](https://linux.die.net/man/5/smartd.conf) for full configuration specification.\n\n  * `-a` equivalent of `-H -f -t -l error -l selftest -l selfteststs -C 197 -U 198`\n  * `-m` email address for notifications\n  * `-d` device type `auto`,`ata`, `scsi`,`nvme`,`ignore`,`removable`\n  * `-H` perform S.M.A.R.T health check, i.e. `smartctl -H /dev/sda`\n  * `-i` ignore failure of Usage Attributes (e.g. percent of lifetime used)\n\n## Examples\n\nWill scan for all devices, and then monitor them. It will send one email warning per device for any problems that are found.\n```yaml\nsmartd::devicescan: true\nsmartd::options: '-H -d ata -m root@example.com'\n```\nthis would produce config:\n\n```\nDEVICESCAN -H -d ata -m root@example.com\n```\nthat will ensure that `smartd` will check SMART health status on all `ata` drives daily.\n\nCommon configuration will be applied for all disks defined bellow (in the config).\n```yaml\nsmartd::defaults:\n  - '-a -R5! -W 2,40,45 -I 194 -s L/../../7/00'\n  - '-m admin@example.com'\n```\n\n## Limitations\n\nWritten for Puppet 6 and newer, backward compatibility with older versions hasn't been tested.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderic%2Fpuppet-smartd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderic%2Fpuppet-smartd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderic%2Fpuppet-smartd/lists"}