Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Cookbook to automatically deploy the Gdash web interface for Graphite.
Latest commit bf1f8ca @webframp webframp Merge pull request #18 from robertchoi8099/master
add 'graph_properties' attribute to dashboard resource


Cookbook to automatically deploy the Gdash web interface for Graphite. Resources are provided for automated graph and dashboard creation.



  • Debian
  • Ubuntu


  • build-essentials
  • runit
  • graphite
  • unicorn
  • optional dependency: iptables


  • node['gdash']['tarfile'] - Full path to store downloaded tgz
  • node['gdash']['base'] - Full path for gdash root
  • node['gdash']['url'] - Download url for gdash tarball
  • node['gdash']['templatedir'] - Dashboard template directory
  • node['gdash']['dashboards'] - Attributes defining the set of dashboards.
  • node['gdash']['owner'] - User gdash runs as
  • node['gdash']['group'] - Group permission for gdash
  • node['gdash']['basic_auth'] - Toggle basic auth setting for dashboard access
  • node['gdash']['username'] - Basic auth username
  • node['gdash']['password'] - Basic auth password
  • node['gdash']['title'] - Dashboard main title
  • node['gdash']['refresh_rate'] - Refresh rate
  • node['gdash']['columns'] - Number of columns
  • node['gdash']['graphite_whisperdb'] - Full path to graphite database

whisper database

  • node['gdash']['port'] - Port gdash is available on
  • node['gdash']['categories'] - Categories to group dashboards into


  • gdash_dashboard - Create a dashboard with a category and description
  • gdash_dashboard_component - Create a graph and add it to a dashboard



The default recipe performs basic setup of gdash and creates a runit service definition.


The firewall recipe uses iptables to open ports for the dashboard. This is optional and requires the iptables cookbook if used.


The basic_dashboard recipe is intended an example to get up and running with gdash and automatic graph creation. Use this recipe and the usage description to get started building your own dashboards with the resources provided by this cookbook.


Graph creation is left to the user but an recipe is provided to create a basic dashboard and provide usage examples.

Graph Creation

Dashboard creation

First create a dashboard:

properties = { :timezone => "Europe/London" }

gdash_dashboard 'cpu_usage' do
  category 'metrics'
  description 'CPU Usages'
  graph_properties properties

Dashboard component creation

Next, add components to the dashboard. Dashboards are referenced by their name and category when adding components:

gdash_dashboard_component 'node1' do
  dashboard_name 'cpu_usage'
  dashboard_category 'metrics'
  linemode 'slope'
  description 'Node1 CPU usage'
    :system => {
      :scale => 0.001,
      :color => 'orange',
      :alias => 'System Usage 0',
      :data => 'node1.cpu.0.system.value'
    :user => {
      :scale => 0.001,
      :color => 'blue',
      :alias => 'User Usage 0',
      :data => 'node1.cpu.0.user.value'

Dashboard creation via attributes

Alternatively attributes can be used to define the set of dashboards and the attribute_driven_dashboard recipe can be used to managed the dashboards. The recipe will remove categories, dashboards and dashboard components that no longer exist and create all those as specified in attributes. For example:

node.override['gdash']['dashboards']['cpu_usage'] =
    'category' => 'metrics',
    'description' => 'CPU Usages of the nodes across the cluster',
    'display_name' => 'CPU Usages',
    'graph_properties' => {
      'timezone' => 'Europe/London'
    'components' => {
      'node1' => {
        'linemode' => 'slope',
        'description' => 'Node1 CPU usage',
        'fields' => {
            :system => {
              :scale => 0.001,
              :color => 'orange',
              :alias => 'System Usage 0',
              :data => 'node1.cpu.0.system.value'
            :user => {
              :scale => 0.001,
              :color => 'blue',
              :alias => 'User Usage 0',
              :data => 'node1.cpu.0.user.value'
Something went wrong with that request. Please try again.