我已经build立了很多的Debian服务器。 他们几乎没有失败,但是当他们做了我从来没有足够好的伐木系统。 所以我告诉自己这个时间会有所不同。
我已经得到了Apache2和MySQL的高兴,并且使用了基于名字的虚拟主机。
我有etckeeper和mysqlbackup和一个S3备份脚本。
我有我的SSL证书被locking,我刚安装了Exim4。
现在,来自Logcheck的2000封电子邮件从五天没有邮件传输。
现在显然我需要为Logwatch写一大堆自定义规则:
等一下…
你是真的吗?: http : //logcheck.org/docs/README.logcheck-database
Apr 6 19:30:24 oempc wwwoffled[11763]: WWWOFFLE Online. Apr 6 19:31:54 oempc wwwoffled[11763]: WWWOFFLE Offline. ...then the local ignore pattern you need is something like this: ^\w{3} [ :0-9]{11} oempc wwwoffled\[[0-9]+\]: WWWOFFLE (On|Off)line\.$
我只是想成为一个很好的小系统pipe理员,并得到电子邮件,我会实际读到你知道的,重要的事情。
我如何才能让Logwatch发送“MySQL耗尽内存”或“Apache爆炸”而不是每小时50页?
This email is sent by logcheck. If you no longer wish to receive such mail, you can either deinstall the logcheck package or modify its configuration file (/etc/logcheck/logcheck.conf). System Events =-=-=-=-=-=-= May 26 18:02:22 Debian6-VPS kernel: **BAZZILION LINES OF NETWORK INFORMATION THAT I DON'T CARE ABOUT**
PS在/etc/logcheck/logcheck.conf里没有什么东西啊哈哈哈哈 。
如果你想快速设置监视mysqld进程,磁盘使用情况,Apache2和资源使用情况的解决scheme,我会build议使用/etc/monit.confconfiguration的外部谷歌smtp服务/etc/monit.conf像这样;
set daemon 60 set mailserver smtp.googlemail.com port 587 username "Rabbi" password "Loew" set alert [email protected] but not on { instance } with reminder on 15 cycles #grab some service scripts include /etc/monit.d/* set httpd port 2812 allow 127.0.0.1
我在/etc/monit.d/filesystem.conf有以下/etc/monit.d/filesystem.conf
check device rootfs with path / if changed fsflags then alert if space usage > 90% for 5 times within 15 cycles then alert else if passed for 10 cycles then alert if space usage > 95% then alert if inode usage > 90 % then alert
并在/etc/monit.d/system.conf适当地提醒资源使用情况;
check system localhost if loadavg (1min) > 10 for 10 cycles then alert if loadavg (5min) > 60 for 10 cycles then alert if memory usage > 90% for 8 cycles then alert if swap usage > 20% then alert if cpu usage (user) > 90% then alert if cpu usage (system) > 75% then alert if cpu usage (wait) > 75% then alert
我还开始了一个名为monit-shared的github项目,目的是捕获一些常见服务的初始configuration(sendmail,dovecot,mysql)等。
你通常可以检查哪些适用于/etc/monit.d,比如httpd.conf ,他们应该做你自动提到的那种基本检查,并通知你使用你的外部电子邮件服务。