Forge Home

grafana

Installs and configures grafana

109,099 downloads

109,099 latest version

3.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Jan 16th 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'thejandroman-grafana', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thejandroman-grafana
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thejandroman-grafana --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

thejandroman/grafana — version 0.1.0 Jan 16th 2015

#grafana Build Status

####Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module
  7. License

##Overview The grafana puppet module allows one to setup and configure the grafana dashboard.

##Module Description This module should cover all configuration options for grafana v1.9.x.

This module checks out the grafana source directly from github and requires git to be installed. By default this module will install git via the puppetlabs/git module. This behavior can be disabled.

Grafana requires a webserver to serve its content. By default this module will install apache via the puppetlabs/apache module. This behavior can be disabled.

##Setup The grafana module requires that config_datasources be specified. For a description of the different granafa configuration options see grafana's documentation. To disable managing of git or apache see options below.

###Examples To install grafana accepting all default options:

  class { 'grafana':
    config_datasources => {
      graphite      => {
        type => 'graphite',
        url  => 'http://my.graphite.server.com:8080',
      },
      elasticsearch => {
        type      => 'elasticsearch',
        url       => 'http://my.elastic.server.com:9200',
        index     => 'grafana-dash',
        grafanaDB => true,
      }
    }
  }

To disable webserver and git management:

class { 'grafana':
    config_datasources => { ... },
    manage_ws          => false,
    manage_git         => false,
  }

##Usage ###Classes ####Class: grafana #####config_admin_password Data Type: string Default: '' The purpose of this password is not security, but to stop some users from accidentally changing dashboards.

#####config_datasources Data Type: hash Default: undef The datasources property defines your metric, annotation and dashboard storage backends. See grafana documentation.

#####config_default_route Data Type: string Default: /dashboard/file/default.json The default start dashboard.

#####config_playlist_timespan Data Type: string Default: 1m Set the default timespan for the playlist feature. Example: "1m", "1h"

#####config_plugins_dependencies Data Type: array Default: [] requirejs modules in plugins folder that should be loaded; for example custom datasources.

#####config_plugins_panels Data Type: array Default: [] List of plugin panels.

#####config_search_max_results Data Type: string Default: 100 Specify the limit for dashboard search results.

#####config_template Data Type: string Default: grafana/config.js.erb The erb template to build config.js.

#####config_unsaved_changes_warning Data Type: bool Default: true Set to false to disable unsaved changes warning.

#####config_window_title_prefix Data Type: string Default: Grafana - Change window title prefix from 'Grafana - '.

graf_clone_url

Data Type: string Default: https://github.com/grafana/grafana.git URL for the grafana git repo.

#####graf_folder_owner Data Type: string Default: undef The owner of the grafana install located at graf_install_folder. If graf_folder_owner remains 'undef' it defaults to one of two cases:

  • if manage_ws => false then graf_folder_owner => 'root'
  • if manage_ws => true then graf_folder_owner => $::apache::params::user

#####graf_install_folder Data Type: string Default: /opt/grafana The folder to install grafana into.

#####graf_release Data Type: string Default: v1.9.1 A tag or branch from the grafana repo.

#####manage_git Data Type: bool Default: true Should the module manage git.

#####manage_git_repository Data Type: bool Default: true Should the module manage grafana git repository.

#####manage_ws Data Type: bool Default: true Should the module manage the webserver.

#####ws_default_vhost Data Type: bool Default: false Attempt to make the grafana vhost the default. Only taken into account if manage_ws => true.

#####ws_port Data Type: string Default: 80 Change the default port for the webserver to a custom value. Only taken into account if manage_ws => true.

#####ws_servername Data Type: string Default: grafana Change the default servername for the apache vhost. Only taken into account if manage_ws => true.

##Limitations

  • Tested and built on Ubuntu 12.04.
  • Tested with grafana v1.9.1.

##Contributing Pull requests are welcome. Please document and include rspec tests.

##License See LICENSE file.