Munin and Monit

My server has a nasty habit of rebooting every so often. I know this isn’t down to me – but rather my hosting providers, but for the amount they are charging I can hardly complain. I want to prove it though – so I installed munin and while I was there I was installed monit. Munin will let me know how the server is getting on without me writing a load of bash scripts to monitor such things. Monit will just let me know if something stops working – not that the server does much at the mo. However it’ll be there when its needed.  At the mo it will email me if apache, mysql or postgres decided to die or if the CPU, disk usage or RAM decide to have a wee party. This server is stupidly Centos due to me being over eager in getting the server setup. As usual it wasn’t that handy to install – wasn’t that hard either – just a pain to do. I really am going to move to debian during the christmas holidays. Below is a paste of my .bash_history – am sure I did a few things that I didn’t need to do – but it might help someone else out. Depending on what server you have (I can’t remember) you will need to get the i386 or x86_64 (if you have a 64bit OS) – I can’t remember what I decided upon so I downloaded both and hoped that yum would know what to do ;)
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rm -f rpmforge-release-0.3.6-1.el5.rf.i386.rpm
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rm -f rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
yum install munin munin-node
chkconfig --levels 235 munin-node on
chkconfig --levels 235 mysqld on
/etc/init.d/mon
vim  /etc/munin/munin.conf
mkdir -p /www/xxxxxxx.com/public_html/xxxx/
vim  /etc/munin/
vim  /etc/munin/munin.conf
chown munin.munin -R /www/xxxxxx.com/public_html/xxxx/
/etc/init.d/munin-node restart
yum install monit
vim /etc/monit.conf
uptime
vim /etc/monit.conf
sudo /etc/init.d/monit start
chmod 0700 /etc/monit.conf
sudo /etc/init.d/monit start
exit
  • Server (14)