2010年6月24日 星期四

haproxy nginx passenger munin

step1: nginx need stub_status_module
compile with [--with-http_stub_status_module]

step2: install munin
sudo apt-get install munin munin-node

 
#/etc/munin/munin.conf
#This will tell munin to connect to munin-node at 127.0.0.1 on the same machine.
[foo.net]
address 127.0.0.1
use_node_name yes


#Edit the file /etc/munin/munin-node.conf and change # Which port to bind to set
host 127.0.0.1

#Make sure that this is present in the file

allow ^127\.0\.0\.1$



http://github.com/barttenbrinke/munin-plugins-rails
http://www.alfajango.com/blog/how-to-monitor-your-railspassenger-app-with-munin/
http://github.com/jnstq/munin-nginx-ubuntu

 
#haproxy setting
reqisetbe ^Host:\ munin.foo.net foomunin

#nginx config
server {
listen 6166;
server_name munin.foo.net;
root /home/foo/deploy/shared/directory/munin;
}


#/etc/munin/plugin-conf.d/munin-node
[foo_*]
env.log_file '/home/foo/app/production.log'
user foo
command /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby %c
env.graph_category Foo



沒有留言: