Created
May 3, 2014 13:46
-
-
Save mattjbarlow/c1ccba3020293ba345db to your computer and use it in GitHub Desktop.
start-statsd-graphite.sh
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
#!/bin/bash | |
# start carbon data collection daemon - default port: 2003 -------------------- | |
mkdir -p /var/log/carbon | |
/opt/graphite/bin/carbon-cache.py start --logdir=/var/log/carbon | |
# configure graphite ---------------------------------------------------------- | |
mkdir -p /var/log/graphite | |
cat << EOF > /opt/graphite/webapp/graphite/local_settings.py | |
LOG_DIR = '/var/log/graphite' | |
SECRET_KEY = '$(date +%s | sha256sum | base64 | head -c 64)' | |
EOF | |
# start graphite web app cgi server ------------------------------------------- | |
python /opt/graphite/webapp/graphite/manage.py runserver 0.0.0.0:80 | |
# start statsd ---------------------------------------------------------------- | |
node /opt/statsd/stats.js /opt/statsd/localConfig.js 2>&1 >> /var/log/statsd.log & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment