Forked from bhang/install_graphite_statsd_ubuntu_precise.sh
Last active
December 20, 2015 09:30
-
-
Save mostlygeek/6108373 to your computer and use it in GitHub Desktop.
Revisions
-
mostlygeek revised this gist
Jul 30, 2013 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -58,6 +58,12 @@ EOF sudo cp /tmp/storage-schemas.conf storage-schemas.conf cat > /opt/graphite/conf/storage-aggregation.conf << 'EOF' [aggregate_sparse] pattern = ^telemetry.* xFilesFactor = 0.0 EOF # Make sure log dir exists for webapp sudo mkdir -p /opt/graphite/storage/log/webapp @@ -66,6 +72,7 @@ cd /opt/graphite/webapp/graphite/ sudo cp local_settings.py.example local_settings.py sudo python manage.py syncdb # Follow the prompts, creating a superuser is optional # # Start it up Ghetto style! # -
mostlygeek revised this gist
Jul 30, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -69,7 +69,7 @@ sudo python manage.py syncdb # Follow the prompts, creating a superuser is opti # # Start it up Ghetto style! # cat > '/etc/rc.local' << EOF #!/bin/sh -e /opt/graphite/bin/carbon-cache.py start -
mostlygeek revised this gist
Jul 30, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ cat >> /tmp/storage-schemas.conf << EOF # retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ... [stats] priority = 110 pattern = ^telemetry.* retentions = 10s:6h,1m:7d,10m:1y EOF -
mostlygeek revised this gist
Jul 30, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -52,7 +52,7 @@ cat >> /tmp/storage-schemas.conf << EOF # retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ... [stats] priority = 110 #pattern = ^stats\..* retentions = 10s:6h,1m:7d,10m:1y EOF -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -66,6 +66,9 @@ cd /opt/graphite/webapp/graphite/ sudo cp local_settings.py.example local_settings.py sudo python manage.py syncdb # Follow the prompts, creating a superuser is optional # # Start it up Ghetto style! # cat >> '/etc/rc.local' << EOF #!/bin/sh -e -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -70,4 +70,5 @@ cat >> '/etc/rc.local' << EOF #!/bin/sh -e /opt/graphite/bin/carbon-cache.py start exit 0 EOF -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 4 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -66,16 +66,8 @@ cd /opt/graphite/webapp/graphite/ sudo cp local_settings.py.example local_settings.py sudo python manage.py syncdb # Follow the prompts, creating a superuser is optional cat >> '/etc/rc.local' << EOF #!/bin/sh -e /opt/graphite/bin/carbon-cache.py start exit 0 -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 1 addition and 37 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -78,40 +78,4 @@ cat >> /tmp/localConfig.js << EOF } EOF sudo cp /tmp/localConfig.js /opt/statsd/localConfig.js -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -101,4 +101,17 @@ chdir /opt/graphite # Note the use of a wrapper so we can activate our virtualenv: exec start-stop-daemon --oknodo --chdir /opt/graphite --user graphite --chuid graphite --pidfile /opt/graphite/storage/carbon-cache-a.pid --name carbon-cache --startas /opt/graphite/bin/run-carbon-cache.sh --start start EOF cat >> /opt/graphite/bin/run-carbon-cache.sh << 'EOF' #!/bin/sh set -e HOME=/opt/graphite . /opt/graphite/.virtualenv/bin/activate . /opt/graphite/.virtualenv/bin/postactivate exec /opt/graphite/bin/carbon-cache.py "$@" EOF -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -83,7 +83,6 @@ sudo cp /tmp/localConfig.js /opt/statsd/localConfig.js # Add upstart jobs to start at boot cat >> /etc/init/carbon-cache.conf << 'EOF' #!/etc/init/carbon-cache.conf description "Carbon server" -
mostlygeek revised this gist
Jul 29, 2013 . 1 changed file with 35 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,20 @@ #!/bin/bash # update the system sudo apt-get --yes update sudo apt-get --yes upgrade # node.js using PPA (for statsd) sudo apt-get install --yes python-software-properties sudo apt-add-repository ppa:chris-lea/node.js sudo apt-get update --yes sudo apt-get install --yes nodejs npm # Install git to get statsd sudo apt-get install --yes git # System level dependencies for Graphite sudo apt-get install --yes memcached python-dev python-pip sqlite3 libcairo2 \ libcairo2-dev python-cairo pkg-config # Get latest pip @@ -22,9 +26,9 @@ django==1.3 python-memcached django-tagging twisted whisper==0.9.10 carbon==0.9.10 graphite-web==0.9.10 EOF sudo pip install -r /tmp/graphite_reqs.txt @@ -76,4 +80,26 @@ EOF sudo cp /tmp/localConfig.js /opt/statsd/localConfig.js # Add upstart jobs to start at boot cat >> /etc/init/carbon-cache.conf << 'EOF' #!/etc/init/carbon-cache.conf description "Carbon server" start on filesystem or runlevel [2345] stop on runlevel [!2345] umask 022 expect daemon respawn pre-start script test -d /opt/graphite || { stop; exit 0; } end script chdir /opt/graphite # Note the use of a wrapper so we can activate our virtualenv: exec start-stop-daemon --oknodo --chdir /opt/graphite --user graphite --chuid graphite --pidfile /opt/graphite/storage/carbon-cache-a.pid --name carbon-cache --startas /opt/graphite/bin/run-carbon-cache.sh --start start EOF -
bhang revised this gist
Jun 4, 2012 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -58,8 +58,8 @@ sudo cp /tmp/storage-schemas.conf storage-schemas.conf sudo mkdir -p /opt/graphite/storage/log/webapp # Copy over the local settings file and initialize database cd /opt/graphite/webapp/graphite/ sudo cp local_settings.py.example local_settings.py sudo python manage.py syncdb # Follow the prompts, creating a superuser is optional # statsd @@ -77,4 +77,3 @@ EOF sudo cp /tmp/localConfig.js /opt/statsd/localConfig.js -
bhang revised this gist
May 15, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -60,7 +60,7 @@ sudo mkdir -p /opt/graphite/storage/log/webapp # Copy over the local settings file and initialize database sudo cp local_settings.py.example local_settings.py cd /opt/graphite/webapp/graphite/ sudo python manage.py syncdb # Follow the prompts, creating a superuser is optional # statsd cd /opt && sudo git clone git://github.com/etsy/statsd.git -
bhang created this gist
May 15, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,80 @@ #!/bin/bash # node.js using PPA (for statsd) sudo apt-get install python-software-properties sudo apt-add-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs npm # Install git to get statsd sudo apt-get install git # System level dependencies for Graphite sudo apt-get install memcached python-dev python-pip sqlite3 libcairo2 \ libcairo2-dev python-cairo pkg-config # Get latest pip sudo pip install --upgrade pip # Install carbon and graphite deps cat >> /tmp/graphite_reqs.txt << EOF django==1.3 python-memcached django-tagging twisted whisper==0.9.9 carbon==0.9.9 graphite-web==0.9.9 EOF sudo pip install -r /tmp/graphite_reqs.txt # # Configure carbon # cd /opt/graphite/conf/ sudo cp carbon.conf.example carbon.conf # Create storage schema and copy it over # Using the sample as provided in the statsd README # https://github.com/etsy/statsd#graphite-schema cat >> /tmp/storage-schemas.conf << EOF # Schema definitions for Whisper files. Entries are scanned in order, # and first match wins. This file is scanned for changes every 60 seconds. # # [name] # pattern = regex # retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ... [stats] priority = 110 pattern = ^stats\..* retentions = 10s:6h,1m:7d,10m:1y EOF sudo cp /tmp/storage-schemas.conf storage-schemas.conf # Make sure log dir exists for webapp sudo mkdir -p /opt/graphite/storage/log/webapp # Copy over the local settings file and initialize database sudo cp local_settings.py.example local_settings.py cd /opt/graphite/webapp/graphite/ sudo python manage.py syncdb # statsd cd /opt && sudo git clone git://github.com/etsy/statsd.git # StatsD configuration cat >> /tmp/localConfig.js << EOF { graphitePort: 2003 , graphiteHost: "127.0.0.1" , port: 8125 } EOF sudo cp /tmp/localConfig.js /opt/statsd/localConfig.js