Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Ansible role to install and configure smartmontools

License

NotificationsYou must be signed in to change notification settings

stuvusIT/smartd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This role installs and configuressmartd.In the default configuration, all devices will be tested and observed, but no mails will be sent.

Requirements

Debian, Ubuntu, Arch Linux, or Fedora/usr/bin/mail has to exist and be configured to be able to send report mails if that is desired.

Role Variables

This role only uses one top-level var calledsmartd_devices, which is a dict of dicts to specify device monitoring.Each key corresponds to one drive path, whileDEVICESCAN (the only default entry) may be used to scan for devices.After aDEVICESCAN entry, all further lines are ignored by smartd, so you probably want to insert it at the end or not at all.

All possible options inside the dict are briefly described here.You can find a detailed wall-of-text for each one on thesmartd man page.

NameMandatory / DefaultDescription
typeautoThe type of device, e.g.ata,scsi,marvell, etc.
nocheckstandby,15,qPowermode setting. By default, devices instandby are only woken up every 15th attempt and skipped check attempts are not logged.
check_typenormalUsenormal orpermissive to force SMART checking even if it is not advertised.
ata_offline_testingSet toon oroff to enable or disable automatic ATA offline testing by the device itself. Note that you have to quote the value because of ansible's interpretation ofoff.
attribute_autosaveTrueEnables or disables attribute autosave on startup
check_health_return_statusTrueCheck device health status using the SMART return status
report_error_types[error,xerror,selftest,offlinests,"scterc,0,0"]List of error types to report. By default, SMART errors as well as failed tests are logged and TLER will be disabled.
non_smart_settings["lookahead,on"]List of non-SMART options to set
test_schedule(L/../../6/01|S/../.././02)REGEXP to specify self-test schedules. By default, a short test is executed daily after 1am. A long test is executed each sunday after 2am.
mail_recipients[]]List of mail addresses to report to
mail_frequencydiminishingFrequency of report emails.once,daily anddiminishing are possible values.
mail_scriptPath to a script that will be executed in addition to sending report mails
report_ata_failureTrueReport failure of any ATA usage attributes
report_ata_prefailTrueReport change of any ATA prefail attributes
report_ata_usageFalseReport any time a usage attribute has changed
ignore_ata_failure_ids[]List of SMART IDs to ignore when checking for failures
ignore_ata_usage_ids[]List of SMART IDs to ignore when tracking usage value changes
report_raw_ids[]List of IDs to force reporting raw values for. Append! to an ID to consider changes critical.
ata_pending_id197+ID specifying pending sectors. Append+ to only report increasage instead of non-zero-ness.
ata_uncorrectable_id198+ID specifying pending sectors. Append+ to only report increasage instead of non-zero-ness.
temperature_report_diff10Difference in temperature to report. Use0 to ignore.
temperature_report_info45Temperature threshold to start sending informational reports. Use0 to ignore.
temperature_report_crit50Temperature threshold to start sending critical reports. Use0 to ignore.
firmware_bugs[]List of known firmware bugs SMARTD should circumvent.
vendor_formats[]List of options to rewrite interpretation of raw SMART values and their interpretation.
preset_modeuseSet toignore if you don't want to use known presets for a detected drive.

Example Playbook

-hosts:storageroles:    -role:smartdsmartd_devices:/dev/sda:check_type:permissivetest_schedule:L/../../7/04temperature_report_diff:5DEVICESCAN:non_smart_settings:           -lookahead,on           -wcache,off           -standby,off           -apm,254

This configuration will force SMART checking even if it is not advertised as implemented on/dev/sda. The device will only be tested after 4am every sunday and already temperature changes of 5 degrees will be reported.All other drives will be monitored using the default settings, except for the listed options set additionally.

License

This work is licensed under aCreative Commons Attribution-ShareAlike 4.0 International License.

Author Information

About

Ansible role to install and configure smartmontools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp