Monitoring Radiant CMS and Phusion Passenger on Slicehost
In my previous post, I wrote about quickly setting an Ubuntu Hardy slice up with Radiant and the latest Phusion tools (mod_rails and Ruby Enterprise) and alluded to some setting up logging and monitoring as next steps. As monitoring and logging are fascinating subjects, I figured I’d follow up with a few sentences about what I configured.
Apache will log to its own log files, as well as handle log rotation, so nothing much to write about there. However, as a good practice, you’ll likely want to rotate your Radiant logs. And for that, you’ll want logrotate.
Logrotate gets its configuration information from /etc/logrotate.conf, so one just needs to open it up and tell it to look at the Radiant logs and rotate them like so:
# Rotate Rails application logs
/path/to/radiant/shared/log/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}
This will rotate 7 days worth of logs, compress older logs and start a new log file. And it will do it daily. Simple.
Monitoring is a bit more involved, but God makes it fairly easy, and its all in Ruby. According to this helpful site mod_rails monitors its own processes, which leaves us to Monitor Apache, MySQL and any other processes running around. The God site has very good documentation, so I suggest you head over there if you want detailed descriptions of everything it can do. For the sake of this post, I'll just lead folks to simple Apache and MySQL configurations.
After installing God sudo gem install god --no-ri --no-rdoc, setup a conf.god somewhere sensible and take a look at the posts below, as it probably doesn't make sense for me to reiterate what others have already admirably accomplished:
Monitoring MySQL and setting up notifications.
Monitoring Apache.
Now I just need to figure out what will monitor God.





[...] Monitoring Radiant CMS and Phusion Passenger on Slicehost [...]