Last active
August 29, 2015 14:00
-
-
Save mattjbarlow/c23e41e130ce212a3944 to your computer and use it in GitHub Desktop.
StatsD and Graphite Start Script
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 127.0.0.1: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