Giter Site home page Giter Site logo

puppet-grafana's Introduction

Out of maintenance!

This module is no longer maintained. A good alternative is https://forge.puppet.com/bfraser/grafana



#grafana

####Table of Contents

  1. Overview - What is the grafana module?
  2. Module Description - What does this module do?
  3. Setup - The basics of getting started with grafana
  4. Usage - The class and available configurations
  5. Requirements
  6. Limitations - OS compatibility, etc.
  7. Contributing to the grafana module

##Overview

This module installs and configures for grafana 1.x .

Puppet Forge Build Status Puppet Forge Downloads

##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.

puppet-grafana's People

Contributors

bobvanb avatar dwerder avatar meson10 avatar nhinds avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

puppet-grafana's Issues

Deploying on a node and no i-net connection.

We have a internal repo. And i would like to have an option to override the url or change the location of the package like this:

exec {
'Download Grafana':
command => "curl -s -L ${::grafana::package_base}/grafana-${::grafana::version}.tar.gz | tar xz",

Can't install grafana together with dwerder/graphite

Problem is apache class.
ex

class { 'graphite':}
class { 'apache': default_vhost => false }
apache::vhost { 'grafana.sensu.X.com':
    servername      => 'grafana.sensu.X.com',
}
class { 'grafana':}

throws:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Package[apache2] is already declared in file /etc/puppet/modules/modules-puppetlabs/apache/manifests/init.pp:99; cannot redeclare at /etc/puppet/modules/modules-puppetlabs/graphite/manifests/config_apache.pp:20 on node sensu.X.com

If I'm having this configuration

class { 'graphite':}
apache::vhost { 'grafana.sensu.X.com':
    servername      => 'grafana.sensu.X.com',
}
class { 'grafana':}

I'm getting

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: You must include the apache base class before using any apache defined resources at /etc/puppet/modules/modules-puppetlabs/apache/manifests/vhost.pp:112 on node sensu.X.com

I'm assuming that this module should work together with dwerder/graphite but at a moment I'm not sure how.

P.S. Puppet agent/master version 3.7.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.