Last active
December 11, 2015 10:48
-
-
Save pcolazurdo/4589050 to your computer and use it in GitHub Desktop.
Installing & Configuring Distributed LogStash + Kibana + Redis + Graphite + Statsd on a RedHat Fedora 18
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
{ | |
graphitePort: 2003 | |
, debug: false | |
, graphiteHost: "localhost" | |
, port: 8125 | |
, backends: [ "./backends/graphite" ] | |
} |
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
### Based on: https://gist.github.com/1191574 | |
### Based on: http://graphite.wikidot.com/installation | |
### for Django 1.4 review: https://bugs.launchpad.net/graphite/+bug/963684 | |
### Statsd: http://geek.michaelgrace.org/2011/09/installing-statsd-on-ubuntu-server-10-04/ | |
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz | |
wget http://launchpad.net/graphite/0.9/0.9.9/+download/carbon-0.9.9.tar.gz | |
wget http://launchpad.net/graphite/0.9/0.9.9/+download/whisper-0.9.9.tar.gz | |
tar -zxvf graphite-web-0.9.9.tar.gz | |
tar -zxvf carbon-0.9.9.tar.gz | |
tar -zxvf whisper-0.9.9.tar.gz | |
mv graphite-web-0.9.9 graphite | |
mv carbon-0.9.9 carbon | |
mv whisper-0.9.9 whisper | |
rm carbon-0.9.9.tar.gz | |
rm graphite-web-0.9.9.tar.gz | |
rm whisper-0.9.9.tar.gz | |
#################################### | |
# INSTALL WHISPER | |
#################################### | |
cd ~/whisper | |
sudo python setup.py install | |
#################################### | |
# INSTALL CARBON | |
#################################### | |
cd ~/carbon | |
sudo python setup.py install | |
# CONFIGURE CARBON | |
#################### | |
cd /opt/graphite/conf | |
sudo cp carbon.conf.example carbon.conf | |
sudo cp storage-schemas.conf.example storage-schemas.conf | |
sudo vim storage-schemas.conf | |
### edited storage-schemas.conf to be the following | |
[stats] | |
priority = 110 | |
pattern = .* | |
retentions = 10:2160,60:10080,600:262974 | |
### | |
#################################### | |
# CONFIGURE GRAPHITE (webapp) | |
#################################### | |
cd ~/graphite | |
sudo apt-get install python-django-tagging | |
sudo yum install python-twisted | |
sudo python check-dependencies.py | |
sudo python setup.py install | |
# CONFIGURE NGINX | |
################### | |
## configure easy_install | |
yum install python-setuptools | |
easy-install -U gunicorn | |
cd /opt/graphite/webapp | |
gunicorn_django | |
#################################### | |
# INITIAL DATABASE CREATION | |
#################################### | |
cd /opt/graphite/webapp/graphite/ | |
sudo cp local_settings.py.example local_settings.py | |
### Check local_settings.py in this GIST | |
sudo python manage.py syncdb | |
# follow prompts to setup django admin user | |
sudo chown -R nginx:nginx /opt/graphite/storage/ | |
#################################### | |
# START CARBON | |
#################################### | |
cd /opt/graphite/ | |
sudo ./bin/carbon-cache.py start | |
#################################### | |
# SEND DATA TO GRAPHITE | |
#################################### | |
cd ~/graphite/examples | |
sudo chmod +x example-client.py | |
# [optional] edit example-client.py to report data faster | |
# sudo vim example-client.py | |
sudo ./example-client.py |
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
### Based from: http://geek.michaelgrace.org/2011/09/installing-statsd-on-ubuntu-server-10-04/ | |
# CLONE THE STATSD PROJECT | |
mkdir /opt | |
git clone https://github.com/etsy/statsd.git | |
# CREATE A CONFIG FILE & TEST statsd | |
cd statsd | |
cp exampleConfig.js dConfig.js | |
# edit config file your settings | |
sudo vi dConfig.js | |
npm install | |
./run_tests.sh | |
# START STATSD | |
node stats.js dConfig.js |
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
### Bear in mind that Django 1.3 and up use a different DATABASE variable. The new one use a dictionary so the old DATABASE_* are deprecated | |
### Example for using sqlite3 on standard graphite path | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', | |
'NAME': '/opt/graphite/storage/graphite.db' | |
} | |
} |
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
sudo su -s nginx | |
cd /opt/graphite/webapp | |
gunicorn_django |
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
### for Django 1.4 review the following document: https://bugs.launchpad.net/graphite/+bug/963684 | |
### it Should look like: | |
# List of callables that know how to import templates from various sources. | |
#TEMPLATE_LOADERS = ( | |
# 'django.template.loaders.filesystem.load_template_source', | |
# 'django.template.loaders.app_directories.load_template_source', | |
#) | |
TEMPLATE_LOADERS = ( | |
'django.template.loaders.filesystem.Loader', | |
'django.template.loaders.app_directories.Loader', | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment