Created
October 26, 2012 09:14
-
-
Save jayv/3957788 to your computer and use it in GitHub Desktop.
install statsd on ubuntu 12.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install NodeJS | |
sudo apt-get install python-software-properties git-core | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install Statsd | |
git clone https://github.com/etsy/statsd.git | |
sudo mv statsd/ /opt/ | |
# CREATE A CONFIG FILE | |
cd /opt/statsd | |
cp exampleConfig.js dConfig.js | |
# edit config file your settings | |
sudo vim dConfig.js | |
sudo vim /opt/statsd/backend/repeater.js change udp6 in udp4 else statsd crashes (fails to resolve hostname) | |
# Create an upstart script | |
sudo vi /etc/init/statsd.conf | |
description "statsd server" | |
author "jayv" | |
start on filesystem or runlevel [2345] | |
stop on shutdown | |
script | |
# We found $HOME is needed. Without it, we ran into problems | |
export HOME="/ubuntu" | |
cd /opt/statsd/ | |
exec /usr/bin/node stats.js dConfig.js 2>&1 >> /var/log/statsd.log | |
end script | |
sudo chmod u+x /etc/init/statsd.conf | |
sudo start statsd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment