Logwatch – 記錄檔分析軟體

最近部落格的主機有點搞笑,主機商好像搞混了我的意思,唉唉…廢話不說了,開始鞭… (6)

cd /usr/src/
wget http://softlayer.dl.sourceforge.net/project/logwatch/logwatch-7.3.6.tar.gz
tar xfz logwatch-7.3.6.tar.gz
cd logwatch-7.3.6
chmod +x install_logwatch.sh
./install_logwatch.sh
cd ..
rm -rf logwatch-7.3.6*
mv /etc/logwatch/conf/logwatch.conf /etc/logwatch/conf/logwatch.conf.bak
cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/logwatch.conf

接下來改一下設定

vi /etc/logwatch/conf/logwatch.conf

35行 – 寄給誰這當然要弄一下滴
MailTo = qoo@gmail.com
48行 – 輸出方式
Print = No
72行 – 分析的細節度
Detail = High
79行 – 要分析的服務項目,這後面可以接著補上不偵測的服務
Service = All

例如不想偵測http、iptables就這樣補在後面

Service = "-http"
Service = "-iptables"

詳細可分析的項目可以到/usr/share/logwatch/scripts/services/目錄查看

最後再執行一次看看能不能正確收的信吧~ Logwatch在安裝的時候已經自動建立一個cron,所以能收到信就是OK了。

/usr/sbin/logwatch

相關文章


Logwatch – 記錄檔分析軟體 目前有1個評論

  1. = = 我看到也有人在TRY我的SSH = =
    先換PORT躲一下 = =

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*

您可以使用這些 HTML 標籤與屬性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Go back to top