Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

gdash (2) Versions 0.1.0

Installs/Configures gdash

Berkshelf/Librarian
Policyfile
Knife
cookbook 'gdash', '~> 0.1.0'
cookbook 'gdash', '~> 0.1.0', :supermarket
knife cookbook site install gdash
knife cookbook site download gdash
README
Dependencies
Quality 56%

Description

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

Requirements

Platform:

  • Debian
  • Ubuntu

Cookbooks

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

Attributes

  • 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

Resources

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

Recipes

default

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

firewall

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

basic_dashboard

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.

Usage

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:


gdash_dashboard 'cpu_usage' do
  category 'metrics'
  description 'CPU Usages'
end

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'
  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'
    }
  )
end

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',
    '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'
            }
        }
      }
    }
  }
end

Dependent cookbooks

unicorn >= 0.0.0
graphite >= 0.0.0
runit >= 0.0.0
build-essential >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.0 passed this metric

Contributing File Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.0 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: gdash/recipes/firewall.rb:19
FC043: Prefer new notification syntax: gdash/providers/dashboard.rb:19
FC043: Prefer new notification syntax: gdash/providers/dashboard_component.rb:17
FC043: Prefer new notification syntax: gdash/recipes/attribute_driven_dashboard.rb:48
FC043: Prefer new notification syntax: gdash/recipes/attribute_driven_dashboard.rb:66
FC043: Prefer new notification syntax: gdash/recipes/attribute_driven_dashboard.rb:74
FC043: Prefer new notification syntax: gdash/recipes/default.rb:54
FC043: Prefer new notification syntax: gdash/recipes/default.rb:75
FC052: Metadata uses the deprecated "suggests" keyword: gdash/metadata.rb:22
FC059: LWRP provider does not declare use_inline_resources: gdash/providers/dashboard.rb:1
FC059: LWRP provider does not declare use_inline_resources: gdash/providers/dashboard_component.rb:1
FC064: Ensure issues_url is set in metadata: gdash/metadata.rb:1
FC065: Ensure source_url is set in metadata: gdash/metadata.rb:1
FC066: Ensure chef_version is set in metadata: gdash/metadata.rb:1
FC069: Ensure standardized license defined in metadata: gdash/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: gdash/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: gdash/resources/dashboard.rb:1
FC074: LWRP should use DSL to define resource's default action: gdash/resources/dashboard_component.rb:1
FC104: Use the :run action in ruby_block instead of :create: gdash/recipes/default.rb:75
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.0 passed this metric

No Binaries Metric
            

0.1.0 passed this metric

Publish Metric
            

0.1.0 passed this metric

Supported Platforms Metric
            

0.1.0 passed this metric

Testing File Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number