grafana
Version information
This version is compatible with:
- Puppet Enterprise 3.x
- Puppet >=2.7.20 <5.0.0
- RedHat, CentOS, Scientific, Debian, Ubuntu
Start using this module
Add this module to your Puppetfile:
mod 'dwerder-grafana', '1.2.2'
Learn more about managing modules with a PuppetfileDocumentation
#grafana
####Table of Contents
- Overview - What is the grafana module?
- Module Description - What does this module do?
- Setup - The basics of getting started with grafana
- Usage - The class and available configurations
- Requirements
- Limitations - OS compatibility, etc.
- Contributing to the grafana module
##Overview
This module installs and configures for grafana 1.x .
##Module Description
Grafana is an open source, metrics dashboard and graph editor for Graphite, InfluxDB and OpenTSDB.
This module is intended to be used in combination with puppet-graphite. At the moment you will need modules like apache or nginx to configure the webservices which will serve the grafana scripts.
##Setup
What grafana affects:
- dowloads/installs/configures files for Grafana
###Beginning with Grafana
Install Grafana with default parameters. In this case grafana will be installed at /opt/grafana and it will listen on localhost:80 for a graphite server. You will also need the apache module (or nginx, etc.)
Here we configure Apache 2.2 with Grafana on port 8080.
class { 'apache': default_vhost => false }
apache::vhost { 'my.grafana.domain':
servername => 'my.grafana.domain',
port => 8080,
docroot => '/opt/grafana',
error_log_file => 'grafana_error.log',
access_log_file => 'grafana_access.log',
directories => [
{
path => '/opt/grafana',
options => [ 'None' ],
allow => 'from All',
allow_override => [ 'None' ],
order => 'Allow,Deny',
}
]
}->
class { 'grafana': }
###Configure Graphite and Elasticsearch
class {'grafana':
graphite_host => 'graphite.my.domain',
elasticsearch_host => 'elasticsearch.my.domain',
}
###Configure InlfuxDB
When we use InfluxDB we have to set the user and password to access the influxdb_dbpath. And we need the user and password for the database /db/grafana, which has to exist on the influxdb.
class {'grafana':
influxdb_host => 'influxdb.my.domain',
influxdb_dbpath => '/db/dbname',
influxdb_user => 'grafana',
influxdb_pass => 'grafana',
influxdb_grafana_user => 'grafana',
influxdb_grafana_pass => 'grafana',
}
##Usage
####Class: grafana
This is the primary class. And the only one which should be used.
Parameters within graphite
:
#####package_base
The base url for all packages. Default is 'http://grafanarel.s3.amazonaws.com'
#####version
Version of grafana to be installed. Default is '1.9.1'
#####install_dir
Install directory of grafana. Default is '/opt'
#####graphite_scheme
Scheme of graphite service. Default is 'http'
#####graphite_host
Hostname of graphite server. Default is 'localhost'
#####graphite_port
Port of graphite service. Default is 80
#####elasticsearch_scheme
Scheme of elasticsearch service. Default is 'http'
#####elasticsearch_host
Hostname of elasticsearch. You will need an elasticsearch for saving dashboards Default is '' (empty)
#####elasticsearch_port
Port of elasticsearch service. Default is 9200
#####elasticsearch_index
Name of elasticsearch index. Default is 'grafana-dash;
#####opentsdb_scheme
Scheme of OpenTSDB service. Default is 'http'
#####opentsdb_host
Hostname of OpenTSDB. Default is '' (empty)
#####opentsdb_port
Port of OpenTSDB service. Default is 4242
#####influxdb_scheme
Scheme of influxdb. Default is 'http'
#####influxdb_host
Hostname of influxdb. Default is '' (empty)
#####influxdb_port
Port of influxdb. Default is 8086
#####influxdb_dbpath
DB path of influxdb. Default is '/db/grafana'
#####influxdb_user
Name of db user. Default is 'grafana'
#####influxdb_pass
Password of db user. Default is 'grafana'
#####timezone_offset
If you experiance problems with zoom, it is probably caused by timezone diff between your browser and the graphite-web application. timezoneOffset setting can be used to have Grafana translate absolute time ranges to the graphite-web timezone. Example: If TIME_ZONE in graphite-web config file local_settings.py is set to America/New_York, then set timezoneOffset to "-0500" (for UTC - 5 hours) Example: If TIME_ZONE is set to UTC, set this to "0000" Default is '0000'
#####playlist_timespan
Playlist timespan. Default is '1m'
#####max_results
Specify the limit for dashboard search results. Default is 20
#####default_route
Default dashboard to route to. Default is '/dashboard/file/default.json'
##Requirements
###Modules needed:
stdlib by puppetlabs
###Modules recommend:
puppet-graphite for graphite installation.
##Limitations
This module is tested on CentOS 6.5 and should also run without problems on
- RHEL/CentOS/Scientific 6+
- Debian 6+
- Ubunutu 10.04 and newer
This module provides only the Grafana installation and config. The webservice to serve Grafana has to be realized with modules like apache.
##Contributing
Echocat modules are open projects. So if you want to make this module even better, you can contribute to this module on Github.
2016-03-24 - 1.2.2 (Bugfix release)
- add missing CHANGELOG notes
2016-03-24 - 1.2.1 (Feature/Bugfix release)
- Issue #11 Added ElasticSearch Index Configuration
- Issue #13 add
package_base
to install from own location
2015-04-14 - 1.2.0 (Feature/Bugfix release)
Features
- set route to default.json with parameter
default_route
Bugfixes
- fix a lot of rspec tests
2015-02-11 - 1.1.0 (Feature release)
Features:
- set default grafana version to 1.9.1
- allow the URL scheme (http, https) to be passed in for datasources. Default is
http
- add basic rspec tests
Bugfixes:
- remove deprecated Modulefile
2014-11-12 - 1.0.0
- initial commit
Dependencies
- puppetlabs/stdlib (>= 3.2.0)
Version: MPL 2.0 echocat puppet-grafana, Copyright (c) 2014 echocat This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.