Last active
December 14, 2015 08:09
-
-
Save jalaziz/5056150 to your computer and use it in GitHub Desktop.
Graphite Upstart + uWSGI + Nginx
This file contains 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
description "Graphite Carbon Cache Daemon" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
expect daemon | |
respawn limit 10 5 | |
chdir /opt/graphite | |
pre-start exec rm -f /opt/graphite/storage/carbon-cache-a.pid | |
exec /opt/graphite/bin/carbon-cache.py start |
This file contains 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
description "Graphite" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
respawn limit 10 5 | |
chdir /opt/graphite | |
exec uwsgi --master --processes 2 --die-on-term --socket /var/run/graphite.socket \ | |
--chown-socket graphite:graphite --chmod-socket=775 --uid graphite \ | |
--wsgi-file /opt/graphite/conf/graphite.wsgi --logto /var/log/uwsgi/graphite.log |
This file contains 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
server { | |
listen 80 default_server deferred; | |
charset utf-8; | |
access_log /var/log/nginx/graphite.access.log; | |
error_log /var/log/nginx/graphite.error.log; | |
root /opt/graphite/webapp; | |
location /static/admin/ { | |
alias /usr/local/lib/python2.7/dist-packages/django/contrib/static/media/; | |
} | |
location /content { | |
} | |
location / { | |
include uwsgi_params; | |
uwsgi_pass unix:/var/run/graphite.socket; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment