Skip to content
barttenbrinke edited this page Sep 13, 2010 · 3 revisions

Munin can use request-log-analyzer to analyze and report on any running application. The installation is quite simple.

Fetch the latest munin-plugins.
Copy the tracker to the munin plugins folder and make it executable.

    git clone git://github.com/barttenbrinke/munin-plugins-rails.git
    cp rails_requests /usr/share/munin/plugins/
    chmod +x /usr/share/munin/plugins/rails_requests

Install the plugin into munin-node by making a symlink

ln -s /usr/share/munin/plugins/rails_requests /etc/munin/plugins/rails_requests

Open /etc/munin/plugin-conf.d/munin-node and add the following entry
    [rails_requests]
    env.log_file '/path/to/production.log'
    user www-data
    command /usr/local/bin/ruby %c

Make sure the log_file points to the correct file and that the user is allowed to read the log-file and run request-log-analyzer
Test your config by running munin-run

cd /etc/munin/plugins/
ruby rails_requests autoconf
sudo munin-run rails_requests

Check if you the first command results in a yes and the that the second looks similar to this

get.value 120
post.value 30
put.value 36
delete.value 0

Restart munin-node

/etc/init.d/munin-node reload
Clone this wiki locally