Monitoring 接收来自smartd(smartmontools)的电子邮件通知

Monitoring 接收来自smartd(smartmontools)的电子邮件通知,monitoring,sysadmin,hard-drive,Monitoring,Sysadmin,Hard Drive,为了获得有关我的硬盘驱动器状况的信息,我将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”,我测试了电子邮件通知并收到了测试电子邮件消息 正如你所看到的,每天早上我的硬盘都

为了获得有关我的硬盘驱动器状况的信息,我将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”,我测试了电子邮件通知并收到了测试电子邮件消息

正如你所看到的,每天早上我的硬盘都会进行短测试,但我没有收到任何关于测试结果的电子邮件通知

很可能,当出现问题时会发送通知,我在这一点上说的对吗?我的意思是,如果测试通过,不接收任何东西是正常的吗

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


非常感谢。

既然您了解了
-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.
重要的单词是“而不是”。如果
smartd runner
本身不发送邮件,则不会向您发送任何邮件

smartd runner
到底做什么?我不熟悉那个剧本

回答您的问题:如果没有要报告的错误,则不会发送邮件:

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