【问题标题】:Receiving email notification from smartd (smartmontools)从 smartd (smartmontools) 接收电子邮件通知
【发布时间】:2010-09-30 21:14:51
【问题描述】:

为了获取有关我的硬盘驱动器状况的信息,我配置了 smartmontools 守护程序(通过 smartd.conf),如下所示:

dev/sdb -I 194 -a -o on -S on -s (S/../.././03|L/../../6/04) \
    -m sys@example.com -M exec /usr/share/smartmontools/smartd-runner

另外,通过添加“-M test”,我测试了电子邮件通知并收到了测试电子邮件。

如您所见,每天早上我的 HDD 都会进行简短测试,但我没有收到任何有关测试结果的电子邮件通知。

可能会在出现问题时发送通知,我在这一点上是否正确?我的意思是,如果测试通过了,没有收到任何东西是正常的吗?

现在我的驱动器使用smartctl -H 命令报告正常状态。我使用 Debian Etch 和 Sendmail。

非常感谢。

【问题讨论】:

    标签: monitoring sysadmin hard-drive


    【解决方案1】:

    既然您知道-M test,那么您显然已经在文档中找到了有关-M 选项的章节。在同一章中,您会发现:

    exec  PATH  -  run the executable PATH instead of the default mail command,
                   when smartd needs to send email.  PATH must point to an
                   executable binary file or script.
    

    重要的词是“instead”。如果smartd-runner 不自己发送邮件,您将不会收到任何邮件。

    smartd-runner 到底做了什么?我不熟悉那个脚本。

    回答您的问题:没有错误报告时不会发送邮件:

    once - send only one warning email for each type of disk problem detected.
           This is the default.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-14
      相关资源
      最近更新 更多