Forge Home

grafana

Grafana instance configuration using Docker.

11,285 downloads

6,537 latest version

3.1 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.6.1 (latest)
  • 0.6.0
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.3
  • 0.3.2
released Feb 11th 2016
This version is compatible with:
  • Puppet 3.4
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'ajsmith-grafana', '0.4.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install ajsmith-grafana --version 0.4.1

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

ajsmith/grafana — version 0.4.1 Feb 11th 2016

puppet-grafana

Table of Contents

  1. Overview
  2. Usage
  3. Compatibility
  4. Release Notes

Overview

This module is useful for deploying Grafana as a Docker container on Red Hat systems.

This module configures the Grafana monitoring dashboard on a host in the simplest way possible. It installs Grafana from a package, rather than building from source (how you acquire that package is up to you).

Usage

Building the Image

Add the following to configure a host to build a Grafana image[^1].

class { 'grafana::docker::image': }

By default, this pulls Docker resources from a branch in Git. Optionally, you can set a specific revision:

class { 'grafana::docker::image':
   vcs_revision => '1.0.0'
}

The image can also be customized by providing a class which customizes the Docker build. This is done by setting image_config_cls with the name of the class to do the customization.

class { 'grafana::docker::image':
    image_config_cls => 'mymodule::grafana::image_config'
}

The image build resources are checked out to /opt/docker-grafana, so most customizations should be placed within that directory.

[^1]: This uses the Docker image resources provided by https://github.com/ajsmith/docker-grafana.

Running the Container

To run Grafana as a service, containers are configured to run as systemd services.

The simplest configuration to run the Grafana container is:

grafana::docker::container { 'grafana': }

More than likely, you'll want to manage persistent data using the data volume container pattern. To implement that, we do the following:

grafana::docker::data_volume_container { 'grafana-data': }
->
grafana::docker::container { 'grafana':
  volumes_from => ['grafana-data'],
}

This first creates a service for the data volume container named "grafana-data", then creates a service named "grafana" which mounts volumes from that container.

Compatibility

This module is compatible with Red Hat Linux systems which are capable of running Docker:

  • RHEL 7+
  • CentOS 7+
  • Fedora 20+

Release Notes

v0.4.1 2016/02/11

  • Fix Grafana image version.

v0.4.0 2016/02/10

  • Use updated Grafana v2.6.0 image.
  • Allow customizations to the Grafana Docker image build process.
  • Add option to set the VCS revision of the Grafana Docker image.
  • Improve rspec test coverage.

v0.3.3 2016/01/11

  • Style fixes.

v0.3.2 2016/01/11

  • Initial release.