livebox:graphite

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
livebox:graphite [2014/09/12 11:32] – [Installation] brettlivebox:graphite [2014/10/01 03:05] (current) – [xAP Applet configuration] brett
Line 1: Line 1:
 ====== Graphite ====== ====== Graphite ======
- 
-===== Installation ===== 
  
 The installation consists of two parts The installation consists of two parts
Line 7: Line 5:
   * Configuring to feed xAP   * Configuring to feed xAP
  
-==== Setting up Graphite ====+===== Introduction ===== 
 + 
 +Where as cacti uses a __pull__ mechanism to reach out and gather statistics which requires something to cache previous values until the cacti back-end is ready to get them.  Graphite on the other hand uses a __push__ mechanism which is much simpler.  It also means that as new xAP data elements are created they are automatically fed into your charts with zero additional work, unlike cacti which requires lots of extra effort for each new item you want to store and graph. 
 + 
 +Its the preferred charting solution for xAP data. 
 + 
 +{{:livebox:graphitexap.png?direct&640|}} 
 + 
 +===== Setting up Graphite ====
 + 
 +What is Graphite?  http://graphite.wikidot.com/ 
 + 
 +The documentation for graphite: http://graphite.readthedocs.org/
  
 Its suggested that you designate a new VM/Server as the graphite Its suggested that you designate a new VM/Server as the graphite
Line 13: Line 23:
 on a RedHat Enterprise Linux/CentOS 6.3 and 6.5 x64 server.  You're mileage on a RedHat Enterprise Linux/CentOS 6.3 and 6.5 x64 server.  You're mileage
 may vary with other Operating system hosts. may vary with other Operating system hosts.
 +
  
 ===== Pre requisites ===== ===== Pre requisites =====
Line 49: Line 60:
     'ENGINE': 'django.db.backends.mysql',     'ENGINE': 'django.db.backends.mysql',
     'USER': 'graphite',     'USER': 'graphite',
-    'PASSWORD': 'opsware',+    'PASSWORD': 'secret',
     'HOST': 'localhost',     'HOST': 'localhost',
     'PORT': '3306',     'PORT': '3306',
Line 57: Line 68:
 Create graphite database Create graphite database
 <code> <code>
-# mysql -e "CREATE USER 'graphite'@'localhost' IDENTIFIED BY 'opsware';" -u root -p+# 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 "GRANT ALL PRIVILEGES ON graphite.* TO 'graphite'@'localhost';" -u root -p
 # mysql -e "CREATE DATABASE graphite;" -u root -p # mysql -e "CREATE DATABASE graphite;" -u root -p
Line 71: Line 82:
 # service httpd restart # service httpd restart
 </code> </code>
-If all goes well you can point your browser at your graphite VM and you should be rewarded wi +If all goes well you can point your browser at your graphite VM and you should be rewarded with the graphite home page.
-th the graphite home page.+
  
 Start carbon daemons Start carbon daemons
Line 80: Line 90:
 </code> </code>
  
 +====== xAP Applet configuration ======
 +
 +The sample applet that can feed data to a Carbon data aggregator is called [[http://code.google.com/p/livebox-hah/source/browse/branches/portable/userapps/hah/xap-plugboard/samples/graphiteApplet.lua|graphiteApplet.lua]] and can be found in the plugboard samples directory.
 +
 +The only change required is to adjust the IP address to that of your graphite server.
 +<code lua>
 +graphite={port=2003,host="192.168.4.46"}
 +</code>
 +
 +Copy the sample to the /etc/plugboard directory, edit, then restart the plugboard engine
 +<code>
 +/etc/init.d/xap restart plugboard
 +</code>
 +
 +By default the applet will feed all xAPBSC.event data items to the back-end for recording and charting, along with the [[http://www.xapautomation.org/index.php?title=xAP_Weather_Schema|weather.data]] schema.   Adjust the code to suit your environment.
 +
 +{{tag>graphite}}
  • livebox/graphite.1410521553.txt.gz
  • Last modified: 2014/09/12 11:32
  • by brett