Linux Logwatch的簡單配置與使用

來源:互聯網
上載者:User

標籤:logwatch

【 描述 】
Logwatch是使用 Perl 開發的一個日誌分析工具
Logwatch能夠對Linux 的記錄檔進行分析,並自動發送mail給相關處理人員,可定製需求
Logwatch的mail功能是藉助宿主系統內建的mail server 發郵件的, 如sendmail,postfix,Qmail等 

【 配置 】

因為系統已經預設支援該服務,只要簡單的配置就好了。

修改預設設定檔:

vi /usr/share/logwatch/default.conf/logwatch.conf 

1、把“MailTo=root ” 中的root 改成你要內送郵件的郵箱地址,多個地址可用逗號隔開。

    例:MailTo = [email protected]****.com,[email protected]****.com

2、把“MailFrom =”後面的內容改成你想要的名稱,這是寄件者名稱。

3、通常修改以上兩個內容就夠了,如果收到不郵件,可以考慮改下以下這個配置:

     mailer = "/usr/sbin/sendmail -t"

     如上所示,加上路徑“/usr/sbin/”,有的版本可能需要。


註:Logwatch 預設一天發一次郵件,預設時間是04:00.

    




Linux Logwatch的簡單配置與使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.