- cp -v /opt/graphite/conf/graphTemplates.conf.example /opt/graphite/conf/graphTemplates.conf
- vi /opt/graphite/conf/graphTemplates.conf
- change '[default]' section to '[uggs]'
- change another section, e.g. '[solarized-dark]', to '[default]'
- reload dashboard and you should see changed colors
Showing posts with label graphite. Show all posts
Showing posts with label graphite. Show all posts
Monday, 28 July 2014
Change graphite's default dashboard graph colors
Tuesday, 8 July 2014
Latest graphite on Amazon Linux at AWS
- yum update -y;reboot
- yum -y groupinstall "Development Tools"
- yum -y install git-core python-pip mlocate
- yum -y install python-rrdtool pycairo-devel
- mkdir -p /root/graphite-install
- cd /root/graphite-install
- git clone https://github.com/graphite-project/carbon.git
- git clone https://github.com/graphite-project/whisper.git
- git clone https://github.com/graphite-project/ceres
- git clone https://github.com/graphite-project/graphite-web.git
- cd /root/graphite-install/whisper
- git checkout 0.9.x
- python setup.py install
- cd /root/graphite-install/ceres
- # only has master branch, but it works with others
- pip install -r requirements.txt
- python setup.py install
- cd /root/graphite-install/carbon
- git checkout 0.9.x
- pip install -r requirements.txt
- python setup.py install
- cd /root/graphite-install/graphite-web
- git checkout 0.9.x
- yum install libffi-devel -y # some developer broke things, add this
- pip install -r requirements.txt
- python check-dependencies.py
- python setup.py install
- cp -v /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf
- cp -v /opt/graphite/conf/storage-schemas.conf.example /opt/graphite/conf/storage-schemas.conf
- cp -v /opt/graphite/conf/storage-aggregation.conf.example /opt/graphite/conf/storage-aggregation.conf
- cp -v /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py
- cp -v /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
- vi /opt/graphite/webapp/graphite/local_settings.py
- set SECRET_KEY param
- uncomment DATABASE section
- add these lines to /root/.bash_profile
- export GRAPHITE_ROOT=/opt/graphite
- export PYTHONPATH=$GRAPHITE_ROOT/webapp:$GRAPHITE_ROOT/whisper
- source /root/.bash_profile
- django-admin.py syncdb --settings=graphite.settings
- yum -y install httpd24 mod24_wsgi
- mkdir /etc/httpd/vhosts.d
- add to end of /etc/httpd/conf/httpd.conf
- IncludeOptional vhosts.d/*.conf
- create /etc/httpd/vhosts.d/graphite.conf with below
- mkdir /var/run/wsgi;chmod -v 777 /var/run/wsgi
- apachectl -S
- check for errors
- service httpd start
- /opt/graphite/bin/carbon-cache.py start
- find /opt/graphite/storage -type d -exec chmod -v 777 {} \;
- find /opt/graphite/storage -type f -exec chmod -v 666 {} \;
- echo '127.0.1.3 graphite' >> /etc/hosts
- curl -I http://graphite
- on local machine
- make same /etc/hosts entry
- port forward 127.0.1.3:8081 to remote-server:80
- curl -I http://graphite:8081
- END
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
ErrorLog logs/webapp_error.log
CustomLog logs/webapp_access.log common
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
Require all granted
</Location>
Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
<Location "/media/">
SetHandler None
Require all granted
</Location>
<Directory /opt/graphite/conf/>
Require all granted
</Directory>
</VirtualHost>
Thursday, 3 January 2013
Quick start how-to graphite base install on Debian
UPDATE: Also see Latest Graphite on Amazon Linux at AWS.
This only gets graphite working on your local Linux box. Left to user to translate to remote server installation thereafter.
NOTE: Do everything as root user
This only gets graphite working on your local Linux box. Left to user to translate to remote server installation thereafter.
NOTE: Do everything as root user
- make sure apache2 is installed and working with wsgi
- apt-get install apache2 -y
- apt-get install libapache2-mod-wsgi -y
- a2enmod wsgi
- wsgi needs a place for its sockets
- mkdir /etc/apache2/run
- mkdir /var/run/wsgi
- chmod 777 /etc/apache2/run /var/run/wsgi
- this seems undocumented, thanks!
- Install dependencies
- apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson
- apt-get install -y python2.6 python-pip python-cairo python-django python-django-tagging
- Install graphite elements
- mkdir -p /root/graphite-install
- cd /root/graphite-install
- git clone https://github.com/graphite-project/graphite-web.git
- git clone https://github.com/graphite-project/carbon.git
- git clone https://github.com/graphite-project/whisper.git
- git clone https://github.com/graphite-project/ceres
- cd /root/graphite-install/whisper
- git checkout 0.9.x
- python setup.py install
- cd /root/graphite-install/ceres
- python setup.py install
- cd /root/graphite-install/carbon
- git checkout 0.9.x
- python setup.py install
- cd /root/graphite-install/graphite-web
- git checkout 0.9.x
- python check-dependencies.py
- fix any missing dependencies
- ignore warnings if certain you don't need a feature
- python setup.py install
- Setup configuration files and permissions
- cp -v /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf
- cp -v /opt/graphite/conf/storage-schemas.conf.example /opt/graphite/conf/storage-schemas.conf
- Create Django database
- cp -v /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py
- Edit this file by uncommenting the entire DATABASES section
- Otherwise next commands may fail with bizarre error
- cd /opt/graphite/webapp/graphite
- python manage.py syncdb
- Make sure NO errors
- Create a user/pass you'll never forget
- chown -Rv www-data:www-data /opt/graphite/storage/
- EXTREMELY IMPORTANT
- Apache
- Add below Apache configuration as a virtual host (details not covered here)
- Or do this and struggle to make it work
- cp -v /opt/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite
- Every "directory" and "location" in the virtual hosts file need these entries, or you'll get permission denied errors
- apache versions before 2.4
- Order deny,allow
- Allow from all
- apache versions 2.4 and after
- Require all granted
- a2ensite graphite
- cp -v /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
- apache2ctl -S
- Check all is OK
- service apache2 stop
- service apache2 start
- If you have trouble check permissions under this directory and/or run this again
- chown -Rv www-data:www-data /opt/graphite/storage/
- Seems some files are created by root that should be created by www-data user maybe
- Start carbon daemon
- cd /opt/graphite
- /opt/graphite/bin/carbon-cache.py start
- verify with:
- lsof -nP -i :2003
- TASK: automate this to start on reboot somehow
- Add to /etc/hosts
- 127.0.1.3 graphite
- tail -F /opt/graphite/storage/log/webapp/error.log
- python /opt/graphite/examples/example-client.py
- Hit http://graphite
- Should show initial graphite interface
- View results
- Click down into "system" -> loadavg_5min
- Find "Select Recent Data" icon in upper-left toolbar
- Set to 10 mins
- You should see lines appearing as script runs and feed data to Graphite via Carbon
- Check out giraffe once you get some stats to shove in it
- https://github.com/kenhub/giraffe
- Just dump the files you get from the git clone into a directory under you default Apache install and tweedle with dashboard.js until you see something
- Try this a few times on the CLI of your graphite server every few minutes
- echo "system.logs.changed_last10 `find /var/log -mmin -10 | wc -l` `date +%s`" | nc -w 1 localhost 2003
- Try similar commands to pass in other stats
- echo must output a single integer.
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
ErrorLog /opt/graphite/storage/log/webapp/error.log
CustomLog /opt/graphite/storage/log/webapp/access.log common
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
</Location>
Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
<Location "/media/">
SetHandler None
</Location>
<Directory /opt/graphite/conf/>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
CRITICAL: AWS now offers internal VPC DNS! Below is no longer necessary AFAIK. Woo hoo! http://aws.amazon.com/about-aws/whats-new/2014/...
-
build sudo apt-get install git gcc sudo apt-get install automake autoconf git clone git://github.com/rriley/tsunami-udp.git cd tsunam...
-
From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4 Assumptions: jEdit was installed into /Applications directory. Close any...