Skip to content

Instantly share code, notes, and snippets.

@lucasdavila
Created December 21, 2011 16:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasdavila/1506695 to your computer and use it in GitHub Desktop.
Save lucasdavila/1506695 to your computer and use it in GitHub Desktop.
Install Munin and Passenger Plugins
# to use this gist execute: $ rm -f 1506695 && wget https://raw.github.com/gist/1506695 && sh 1506695
# refs to http://www.alfajango.com/blog/how-to-monitor-your-railspassenger-app-with-munin/
echo "Installing munin..."
sudo apt-get install munin munin-node -y
echo ;
echo "Removing previous links for passenger_status and passenger_memory_stats..."
sudo rm /etc/munin/plugins/passenger_memory_stats
sudo rm /etc/munin/plugins/passenger_status
echo ;
echo "Installing passenger_status (version rvm)..."
wget http://gist.github.com/1506380.txt
sudo mv 1506380.txt /usr/share/munin/plugins/passenger_status
sudo chmod a+x /usr/share/munin/plugins/passenger_status
sudo ln -s /usr/share/munin/plugins/passenger_status /etc/munin/plugins/passenger_status
echo ;
echo "Installing passenger_memory_stats (version rvm)..."
wget http://gist.github.com/1506381.txt
sudo mv 1506381.txt /usr/share/munin/plugins/passenger_memory_stats
sudo chmod a+x /usr/share/munin/plugins/passenger_memory_stats
sudo ln -s /usr/share/munin/plugins/passenger_memory_stats /etc/munin/plugins/passenger_memory_stats
echo ;
echo "Installation done!"
echo ;
echo ;
echo "** Please run these commands manually **"
echo "Include in sudoers file the line below, executing: $ visudo -f /etc/sudoers.d/munin"
echo "munin ALL=(ALL) NOPASSWD:/usr/local/bin/rvm-shell"
echo ;
echo "Adding user munin to rvm group..."
sudo usermod -a -G rvm munin
echo ;
echo "restarting munin"
sudo service munin-node restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment