Skip to content

Instantly share code, notes, and snippets.

@pcolazurdo
Last active December 11, 2015 10:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcolazurdo/4589050 to your computer and use it in GitHub Desktop.
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
{
graphitePort: 2003
, debug: false
, graphiteHost: "localhost"
, port: 8125
, backends: [ "./backends/graphite" ]
}
### 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
### 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
### 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'
}
}
sudo su -s nginx
cd /opt/graphite/webapp
gunicorn_django
### 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