This is an old revision of the document!
Graphite
The installation consists of two parts
- Setting up the graphite monitoring engine
- Configuring to feed xAP
Setting up Graphite
What is Graphite? http://graphite.wikidot.com/
Its suggested that you designate a new VM/Server as the graphite monitoring and graphing resource. These instructions have been tested on a RedHat Enterprise Linux/CentOS 6.3 and 6.5 x64 server. You're mileage may vary with other Operating system hosts.
The official documentation for graphite can be found at: http://graphite.readthedocs.org/
Pre requisites
First first thing we need to do configure EPEL, a public domain software repository library that contains many of the RPM already pre-built that are required.
# rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Graphite installation
We need these packages:
- python-carbon.noarch : Back-end data caching and persistence daemon for Graphite
- graphite-web.noarch : A Django webapp for enterprise scalable realtime graphing
- mysql
- mysql-server
- MySQL-python
# yum install python-carbon graphite-web mysql mysql-server MySQL-python
Start up mysql and setup a root password.
# service mysqld start # /usr/bin/mysql_secure_installation
Configure graphite to use the MySQL database within the /etc/graphite-web/local_settings.py config file.
/etc/graphite-web/local_settings.py
DATABASES = { 'default': { 'NAME': 'graphite', 'ENGINE': 'django.db.backends.mysql', 'USER': 'graphite', 'PASSWORD': 'secret', 'HOST': 'localhost', 'PORT': '3306', } }
Create graphite database
# mysql -e "CREATE USER 'graphite'@'localhost' IDENTIFIED BY 'secret';" -u root -p # mysql -e "GRANT ALL PRIVILEGES ON graphite.* TO 'graphite'@'localhost';" -u root -p # mysql -e "CREATE DATABASE graphite;" -u root -p # mysql -e 'FLUSH PRIVILEGES;' -u root -p
Setup the graphite database with a schema
/usr/lib/python2.6/site-packages/graphite/manage.py syncdb
Restart apache.
# chkconfig httpd on # service httpd restart
If all goes well you can point your browser at your graphite VM and you should be rewarded with the graphite home page.
Start carbon daemons
# chkconfig carbon-cache on # service carbon-cache start