希志あい 希志愛野 Kishi Aino
希志あい 希志愛野 Kishi Aino

Logwatch – 記錄檔分析軟體

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

# 這邊只需要按幾次ENTER用預設值安裝即可 🤓

cd /opt
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
rm -rf logwatch-7.5.4

接下來改一下設定

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了。

logwatch --detail Low

列印本文 列印本文

關於 窮苦人家的小孩

In every democracy, the people get the government they deserve. ~Alexis de Tocqueville
上一篇:
下一篇:

您可能會喜歡

明裡つむぎ 明裡紬 Tsumugi Akari

解除Win10的檔案名稱長度限制

最近用JavHelper整理日 …