希志あい 希志爱野 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整理日 …