grafana
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.8 < 7.0.0
- Archlinux , , , ,
Tasks:
- change_grafana_admin_password
Start using this module
Add this module to your Puppetfile:
mod 'puppet-grafana', '6.0.0'
Learn more about managing modules with a PuppetfileDocumentation
grafana
Table of Contents
Overview
This module installs Grafana, a dashboard and graph editor for Graphite, InfluxDB and OpenTSDB.
Module Description
Version 2.x of this module is designed to work with version 2.x of Grafana. If you would like to continue to use Grafana 1.x, please use version 1.x of this module.
Setup
This module will:
- Install Grafana using your preferred method: package (default), Docker container, or tar archive
- Allow you to override the version of Grafana to be installed, and / or the package source
- Perform basic configuration of Grafana
Requirements
- If using an operating system of the Debian-based family, and the "repo"
install_method
, you will need to ensure that puppetlabs-apt version 4.x is installed. - If using Docker, you will need the garethr/docker module version 5.x
Beginning with Grafana
To install Grafana with the default parameters:
class { 'grafana': }
This assumes that you want to install Grafana using the 'package' method. To establish customized parameters:
class { 'grafana':
install_method => 'docker',
}
Usage
Classes and Defined Types
Class: grafana
The Grafana module's primary class, grafana
, guides the basic setup of Grafana
on your system.
class { 'grafana': }
Parameters within grafana
:
archive_source
The download location of a tarball to use with the 'archive' install method. Defaults to the URL of the latest version of Grafana available at the time of module release.
cfg_location
Configures the location to which the Grafana configuration is written. The default location is '/etc/grafana/grafana.ini'.
cfg
Manages the Grafana configuration file. Grafana comes with its own default settings in a different configuration file (/opt/grafana/current/conf/defaults.ini), therefore this module does not supply any defaults.
This parameter only accepts a hash as its value. Keys with hashes as values will generate sections, any other values are just plain values. The example below will result in...
class { 'grafana':
cfg => {
app_mode => 'production',
server => {
http_port => 8080,
},
database => {
type => 'sqlite3',
host => '127.0.0.1:3306',
name => 'grafana',
user => 'root',
password => '',
},
users => {
allow_sign_up => false,
},
},
}
...the following Grafana configuration:
# This file is managed by Puppet, any changes will be overwritten
app_mode = production
[server]
http_port = 8080
[database]
type = sqlite3
host = 127.0.0.1:3306
name = grafana
user = root
password =
[users]
allow_sign_up = false
Some minor notes:
- If you want empty values, just use an empty string.
- Keys that contains dots (like auth.google) need to be quoted.
- The order of the keys in this hash is the same as they will be written to the configuration file. So settings that do not fall under a section will have to come before any sections in the hash.
ldap_cfg
TOML note
This option requires the toml gem. Either install the gem using puppet's native gem provider, puppetserver_gem, pe_gem, pe_puppetserver_gem, or manually using one of the following:
# apply or puppet-master
gem install toml
# PE apply
/opt/puppet/bin/gem install toml
# AIO or PE puppetserver
/opt/puppet/bin/puppetserver gem install toml
cfg note
This option by itself is not sufficient to enable LDAP configuration as it must be enabled in the main configuration file. Enable it in cfg with:
'auth.ldap' => {
enabled => 'true',
config_file => '/etc/grafana/ldap.toml',
},
Integer note
Puppet may convert integers into strings while parsing the hash and converting into toml. This can be worked around by appending 0 to an integer.
Example:
port => 636+0,
Manages the Grafana LDAP configuration file. This hash is directly translated into the corresponding TOML file, allowing for full flexibility in generating the configuration.
See the LDAP documentation for more information.
Example LDAP config
ldap_cfg => {
servers => [
{ host => 'ldapserver1.domain1.com',
port => 636+0,
use_ssl => true,
search_filter => '(sAMAccountName=%s)',
search_base_dns => [ 'dc=domain1,dc=com' ],
bind_dn => 'user@domain1.com',
bind_password => 'passwordhere',
},
],
'servers.attributes' => {
name => 'givenName',
surname => 'sn',
username => 'sAMAccountName',
member_of => 'memberOf',
email => 'email',
}
},
container_cfg
Boolean to control whether a configuration file should be generated when using the 'docker' install method. If 'true', use the 'cfg' and 'cfg_location' parameters to control creation of the file. Defaults to false.
container_params
A hash of parameters to use when creating the Docker container. For use with the 'docker' install method. Refer to documentation of the 'docker::run' resource in the garethr-docker module for details of available parameters. Defaults to:
container_params => {
'image' => 'grafana/grafana:latest',
'ports' => '3000:3000'
}
data_dir
The directory Grafana will use for storing its data. Defaults to '/var/lib/grafana'.
install_dir
The installation directory to be used with the 'archive' install method. Defaults to '/usr/share/grafana'.
install_method
Controls which method to use for installing Grafana. Valid options are: 'archive',
'docker', 'repo' and 'package'. The default is 'package'. If you wish to use the
'docker' installation method, you will need to include the 'docker' class in your
node's manifest / profile. If you wish to use the 'repo' installation method, you
can control whether the official Grafana repositories will be used. See
manage_package_repo
below for details.
manage_package_repo
Boolean. When using the 'repo' installation method, controls whether the official Grafana repositories are enabled on your host. If true, the official Grafana repositories will be enabled. If false, the module assumes you are managing your own package repository and will not set one up for you. Defaults to true.
plugins
Hash. This is a passthrough to call create_resources()
on the
grafana_plugin
resource type.
package_name
The name of the package managed with the 'package' install method. Defaults to 'grafana'.
package_source
The download location of a package to be used with the 'package' install method. Defaults to the URL of the latest version of Grafana available at the time of module release.
provisioning_datasources
A Hash which is converted to YAML for grafana to provision data sources. See provisioning grafana for details and example config file. Requires grafana > v5.0.0.
This is very useful with Hiera as you can provide a yaml hash/dictionary which will effectively 'passthrough' to grafana. See Advanced Usage for examples.
provisioning_dashboards
A Hash which is converted to YAML for grafana to provision dashboards. See provisioning grafana for details and example config file. Requires grafana > v5.0.0.
This is very useful with Hiera as you can provide a yaml hash/dictionary which will effectively 'passthrough' to grafana. See Advanced Usage for examples.
N.B. A option named puppetsource
may be given in the options
hash
which is not part of grafana's syntax. This option will be extracted
from the hash, and used to "source" a directory of dashboards. See
Advanced Usage for details.
provisioning_dashboards_file
A String that is used as the target file name for the dashabords provisioning file. This way the module can be used to generate placeholder files so password can be sepecified in a different iteration, avoiding them to be put in the module code.
provisioning_datasources_file
A String that is used as the target file name for the datasources provisioning file. This way the module can be used to generate placeholder files so password can be sepecified in a different iteration, avoiding them to be put in the module code.
rpm_iteration
Used when installing Grafana from package ('package' or 'repo' install methods) on Red Hat based systems. Defaults to '1'. It should not be necessary to change this in most cases.
service_name
The name of the service managed with the 'archive' and 'package' install methods. Defaults to 'grafana-server'.
version
The version of Grafana to install and manage. Defaults to 'installed'
sysconfig_location
The RPM and DEB packages bring with them the default environment files for the services. The default location of this file for Debian is /etc/default/grafana-server and for RedHat /etc/sysconfig/grafana-server.
sysconfig
A hash of environment variables for the service. This only has an effect for installations with RPM and DEB packages (if install_method is set to 'package' or 'repo').
Example:
sysconfig => {
'http_proxy' => 'http://proxy.example.com',
}
Advanced usage
The archive install method will create the user and a "command line" service by default. There are no extra parameters to manage user/service for archive. However, both check to see if they are defined before defining. This way you can create your own user and service with your own specifications. (sort of overriding) The service can be a bit tricky, in this example below, the class sensu_install::grafana::service creates a startup script and a service{'grafana-server':}
Example:
user { 'grafana':
ensure => present,
uid => '1234',
}
->
class { 'grafana':
install_method => 'archive',
}
include sensu_install::grafana::service
# run your service after install/config but before grafana::service
Class[::grafana::install]
->
Class[sensu_install::grafana::service]
->
Class[::grafana::service]
Using a sub-path for Grafana API
If you are using a sub-path for the Grafana API, you will need to set the grafana_api_path
parameter for the following custom types:
grafana_dashboard
grafana_datasource
grafana_organization
grafana_user
For instance, if your sub-path is /grafana
, the grafana_api_path
must
be set to /grafana/api
. Do not add a trailing /
(slash) at the end of the value.
If you are not using sub-paths, you do not need to set this parameter.
Custom Types and Providers
The module includes several custom types:
grafana_organization
In order to use the organization resource, add the following to your manifest:
grafana_organization { 'example_org':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
}
grafana_url
, grafana_user
, and grafana_password
are required to create organizations via the API.
name
is optional if the name will differ from example_org above.
address
is an optional parameter that requires a hash. Address settings are {"address1":"","address2":"","city":"","zipCode":"","state":"","country":""}
grafana_dashboard
In order to use the dashboard resource, add the following to your manifest:
grafana_dashboard { 'example_dashboard':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
grafana_api_path => '/grafana/api',
organization => 'NewOrg',
content => template('path/to/exported/file.json'),
}
content
must be valid JSON, and is parsed before imported.
grafana_user
and grafana_password
are optional, and required when
authentication is enabled in Grafana. grafana_api_path
is optional, and only used when using sub-paths for the API. organization
is optional, and used when creating a dashboard for a specific organization.
Example:
Make sure the grafana-server
service is up and running before creating the grafana_dashboard
definition. One option is to use the http_conn_validator
from the healthcheck module
http_conn_validator { 'grafana-conn-validator' :
host => 'localhost',
port => '3000',
use_ssl => false,
test_url => '/public/img/grafana_icon.svg',
require => Class['grafana'],
}
-> grafana_dashboard { 'example_dashboard':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
content => template('path/to/exported/file.json'),
}
grafana_datasource
In order to use the datasource resource, add the following to your manifest:
grafana_datasource { 'influxdb':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
grafana_api_path => '/grafana/api',
type => 'influxdb',
organization => 'NewOrg',
url => 'http://localhost:8086',
user => 'admin',
password => '1nFlux5ecret',
database => 'graphite',
access_mode => 'proxy',
is_default => true,
json_data => template('path/to/additional/config.json'),
secure_json_data => template('path/to/additional/secure/config.json')
}
Available types are: influxdb, elasticsearch, graphite, cloudwatch, mysql, opentsdb, postgres and prometheus
organization
is used to set which organization a datasource will be created on. If this parameter is not set, it will default to organization ID 1 (Main Org. by default). If the default org is deleted, organizations will need to be specified.
Access mode determines how Grafana connects to the datasource, either direct
from the browser, or proxy
to send requests via grafana.
Setting basic_auth
to true
will allow use of the basic_auth_user
and basic_auth_password
params.
Authentication is optional, as are database
and grafana_api_path
; additional json_data
and secure_json_data
can be provided to allow custom configuration options.
Example:
Make sure the grafana-server
service is up and running before creating the grafana_datasource
definition. One option is to use the http_conn_validator
from the healthcheck module
http_conn_validator { 'grafana-conn-validator' :
host => 'localhost',
port => '3000',
use_ssl => false,
test_url => '/public/img/grafana_icon.svg',
require => Class['grafana'],
}
-> grafana_datasource { 'influxdb':
grafana_url => 'http://localhost:3000',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
type => 'influxdb',
url => 'http://localhost:8086',
user => 'admin',
password => '1nFlux5ecret',
database => 'graphite',
access_mode => 'proxy',
is_default => true,
json_data => template('path/to/additional/config.json'),
}
Note that the database
is dynamic, setting things other than "database" for separate types. Ex: for Elasticsearch it will set the Index Name.
jsonData
Settings
Note that there are separate options for json_data / secure_json_data based on the type of datasource you create.
Elasticsearch
esVersion
- Required, either 2 or 5, set as a bare number.
timeField
- Required. By default this is @timestamp, but without setting it in jsonData, the datasource won't work without refreshing it in the GUI.
timeInterval
- Optional. A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example "1m" if your data is written every minute.
Example:
json_data => {"esVersion":5,"timeField":"@timestamp","timeInterval":"1m"}
CloudWatch
authType
- Required. Options are Access & Secret Key
, Credentials File
, or ARN
.
-"keys" = Access & Secret Key
-"credentials" = Credentials File
-"arn" = ARN
When setting authType to credentials
, the database
param will set the Credentials Profile Name.
When setting authType to arn
, another jsonData value of assumeRoleARN
is available, which is not required for other authType settings
customMetricsNamespaces
- Optional. Namespaces of Custom Metrics, separated by commas within double quotes.
defaultRegion
- Required. Options are "ap-northeast-(1 or 2)", "ap-southeast-(1 or 2)", "ap-south-1", "ca-central-1", "cn-north-1", "eu-central-1", "eu-west-(1 or 2)", "sa-east-(1 or 2)", "us-east-(1 or 2)", "us-gov-west-1", "us-west-(1 or 2)".
timeField
Example:
{"authType":"arn","assumeRoleARN":"arn:aws:iam:*","customMetricsNamespaces":"Namespace1,Namespace2","defaultRegion":"us-east-1","timeField":"@timestamp"}
Graphite
graphiteVersion
- Required. Available versions are 0.9
or 1.0
.
tlsAuth
- Set to true
or false
tlsAuthWithCACert
- Set to true
or false
Example:
{"graphiteVersion":"0.9","tlsAuth":true,"tlsAuthWithCACert":false}
OpenTSDB
tsdbResolution
- Required. Options are 1
or 2
.
1
= second
2
= millisecond
tsdbVersion
- Required. Options are 1
, 2
, or 3
.
1
= <=2.1
2
= ==2.2
3
= ==2.3
Example:
{"tsdbResolution:1,"tsdbVersion":3}
InfluxDB
N/A
MySQL
N/A
Prometheus
N/A
grafana_plugin
An example is provided for convenience; for more details, please view the puppet strings docs.
grafana_plugin { 'grafana-simple-json-datasource':
ensure => present,
}
It is possible to specify a custom plugin repository to install a plugin. This will use the --repo option for plugin installation with grafana_cli.
grafana_plugin { 'grafana-simple-json-datasource':
ensure => present,
repo => 'https://nexus.company.com/grafana/plugins',
}
grafana::user
Creates and manages a global grafana user via the API.
grafana_user { 'username':
grafana_url => 'http://localhost:3000',
grafana_api_path => '/grafana/api',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
full_name => 'John Doe',
password => 'Us3r5ecret',
email => 'john@example.com',
}
grafana_api_path
is only required if using sub-paths for the API
grafana::notification
Creates and manages a global alert notification channel via the API.
grafana_notification { 'channelname':
grafana_url => 'http://localhost:3000',
grafana_api_path => '/grafana/api',
grafana_user => 'admin',
grafana_password => '5ecretPassw0rd',
name => 'channelname',
type => 'email',
is_default => false,
send_reminder => false,
frequency => '20m',
settings => {
addresses => "alerts@example.com; it@example.com"
}
}
grafana_api_path
is only required if using sub-paths for the API
Notification types and related settingsi (cf doc Grafana : https://github.com/grafana/grafana/blob/master/docs/sources/alerting/notifications.md ) :
- email:
- addresses: "example.com"
- hipchat:
- apikey : "0a0a0a0a0a0a0a0a0a0a0a"
- autoResolve : true
- httpMethod : "POST"
- uploadImage : true
- url : "https://grafana.hipchat.com"
- kafka:
- autoResolve : true
- httpMethod : "POST"
- kafkaRestProxy: "http://localhost:8082"
- kafkaTopic : "topic1"
- uploadImage : true
- LINE:
- autoResolve: true
- httpMethod : "POST"
- token : "token"
- uploadImage: true
- teams (Microsoft Teams):
- autoResolve : true
- httpMethod : "POST"
- uploadImage :true
- url : "http://example.com"
- pagerduty:
- autoResolve : true
- httpMethod : POST
- integrationKey :"0a0a0a0a0a"
- uploadImage : true
- prometheus-alertmanager:
- autoResolve : true
- httpMethod : "POST"
- uploadImage : true
- url : "http://localhost:9093"
- sensu:
- autoResolve : true
- handler : "default",
- httpMethod : "POST"
- uploadImage : true
- url : "http://sensu-api.local:4567/results"
- slack:
- autoResolve : true
- httpMethod : "POST"
- uploadImage : true
- url : "http://slack.com/"
- token : "0a0a0a0a0a0a0a0a0a0a0a"
- threema:
- api_secret : "0a0a0a0a0a0a0a0a0a0a0a"
- autoResolve : true
- gateway_id : "*3MAGWID"
- httpMethod : "POST"
- recipient_id: "YOUR3MID"
- uploadImage : true
- discord:
- autoResolve : true,
- httpMethod : "POST"
- uploadImage : true
- url : "https://example.com"
- webhook:
- autoResolve : true
- httpMethod : "POST"
- uploadImage : false
- url : "http://localhost:8080"
- telegram:
- autoResolve : true
- bottoken : "0a0a0a0a0a0a"
- chatid : "789789789"
- httpMethod : "POST"
- uploadImage : true
Provisioning Grafana
Grafana documentation on provisioning.
This module will provision grafana by placing yaml files into
/etc/grafana/provisioning/datasources
and
/etc/grafana/provisioning/dashboards
by default.
Example datasource
A puppet hash example for Prometheus. The module will place the hash
as a yaml file into /etc/gafana/provisioning/datasources/puppetprovisioned.yaml
.
class { 'grafana':
provisioning_datasources => {
apiVersion => 1,
datasources => [
{
name => 'Prometheus',
type => 'prometheus',
access => 'proxy',
url => 'http://localhost:9090/prometheus',
isDefault => true,
},
],
}
}
Here is the same configuration example as a hiera hash.
grafana::provisioning_datasources:
apiVersion: 1
datasources:
- name: 'Prometheus'
type: 'prometheus'
access: 'proxy'
url: 'http://localhost:9090/prometheus'
isDefault: true
Example dashboard
An example puppet hash for provisioning dashboards. The module will
place the hash as a yaml file into
/etc/grafana/provisioning/dashboards/puppetprovisioned.yaml
by default. More details follow the examples.
class { 'grafana':
provisioning_dashboards => {
apiVersion => 1,
providers => [
{
name => 'default',
orgId => 1,
folder => '',
type => 'file',
disableDeletion => true,
options => {
path => '/var/lib/grafana/dashboards',
puppetsource => 'puppet:///modules/my_custom_module/dashboards',
},
},
],
}
}
Here is the same configuraiton example as a hiera hash.
grafana::provisioning_dashboards:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: true
options:
path: '/var/lib/grafana/dashboards'
puppetsource: 'puppet:///modules/my_custom_module/dashboards'
In both examples above a non-grafana option named puppetsource
has
been used. When this module finds that the provisioning_dashboards hash
contains keys path
and puppetsource
in the options
subhash, it
will do the following.
- It will create the path found in
options['path']
. Note: puppet will only create the final directory of the path unless the parametercreate_subdirs_provisioning
is set to true: this defaults to false. - It will use
puppetsource
as the file resource's 'source' for the directory. - It removes the
puppetsource
key from theoptions
subhash, so the subsequent yaml file for gafana does not contain this key. (Thepath
key will remain.)
This feature allows you to define a custom module, and place any
dashboards you want provisioned in the its files/
directory. In the
example above you would put dashboards into
my_custom_module/files/dashboards
and puppet-grafana will create
/var/lib/grafana/dashboards
and provision it with the contents of
my_custom_module/files/dashboards
.
Puppet's file resource may also be given a file://
URI which may
point to a locally available directory on the filesystem, typically
the filesystem of the puppetserver/master. Thus you may specify a
local directory with grafana dashboards you wish to provision into
grafana.
Tasks
change_grafana_admin_password
old_password
: the old admin password
new_password
: the password you want to use for the admin user
uri
: http
or https
port
: the port Grafana runs on locally
This task can be used to change the password for the admin user in grafana
Limitations
This module has been tested on Ubuntu 14.04, using each of the 'archive', 'docker' and 'package' installation methods. Other configurations should work with minimal, if any, additional effort.
Development
This module is a fork of bfraser/grafana maintained by Vox Pupuli. Vox Pupuli welcomes new contributions to this module, especially those that include documentation and rspec tests. We are happy to provide guidance if necessary.
Please see CONTRIBUTING for more details.
Authors
- Bill Fraser fraser@pythian.com
- Vox Pupuli Team
Copyright and License
Copyright (C) 2015 Bill Fraser
Bill can be contacted at: fraser@pythian.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
Types in this module release
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v6.0.0 (2019-02-14)
Breaking changes:
- modulesync 2.5.1 and drop Puppet 4 #154 (bastelfreak)
Implemented enhancements:
- Add a task for setting the admin user's password #148 (genebean)
- Integration notification channels #144 (jnguiot)
Fixed bugs:
- Update repo_name Enum for new 'beta' repo #155 (JayH5)
- Fix #152 : multi arch send out a notice #153 (elfranne)
- fixes repo url and key #150 (crazymind1337)
Closed issues:
- multi arch send out a notice #152
- Package Repo moved to packages.grafana.com #149
- install_mode archive fails if $data_dir is not manually created #142
Merged pull requests:
- include classes without leading :: #157 (bastelfreak)
- replace deprecated has_key() with
in
#147 (bastelfreak) - archive install_method creates data_dir #143 (othalla)
- Fix folder typos #140 (pfree)
v5.0.0 (2018-10-06)
Breaking changes:
Implemented enhancements:
- removing value restriction on grafana_datasource so any custom plugin can be used #136 (lukebigum)
- add --repo option to grafana_cli plugin install #132 (rwuest)
- Parametrize provisioning file names #128 (kazeborja)
Closed issues:
- Version parameter should default to 'installed' #125
Merged pull requests:
- modulesync 2.1.0 and allow puppet 6.x #137 (bastelfreak)
- allow puppetlabs/stdlib 5.x and puppetlabs/apt 6.x #134 (bastelfreak)
v4.5.0 (2018-07-16)
Implemented enhancements:
- Use provisioning backend for dashboards, providers #103
- Feature: Add grafana provisioning to this module. #120 (drshawnkwang)
Closed issues:
- Any plan to update module to use the grafana provisioning by yaml files ? #122
v4.4.1 (2018-07-04)
Fixed bugs:
- Fix dependency in provisioning plugins #118 (drshawnkwang)
Closed issues:
- grafana plugin install/check breaks catalog run when grafana-server service is not running #79
v4.4.0 (2018-06-21)
Implemented enhancements:
- Manage sysconfig files #115 (ZeroPointEnergy)
Merged pull requests:
- bump archive upper version boundary to \<4.0.0 #116 (bastelfreak)
v4.3.0 (2018-06-18)
Implemented enhancements:
Fixed bugs:
- Update release codename from jessie to stretch. #113 (drshawnkwang)
Closed issues:
- puppet-grafana Debian repository should use codename stretch #112
Merged pull requests:
- drop EOL OSs; fix puppet version range #109 (bastelfreak)
- Rely on beaker-hostgenerator for docker nodesets #108 (ekohl)
- switch from topscope facts to $facts hash #102 (bastelfreak)
- Update README.md #99 (cclloyd)
v4.2.0 (2018-03-06)
Implemented enhancements:
- Create organization #71
- Expand organization property for dashboards #94 (brandonrdn)
- Add grafana_api_path to allow for API sub-paths #93 (brandonrdn)
v4.1.1 (2018-02-21)
Fixed bugs:
- grafana_datasource provider with_credentials() returns is_default value #89
- fix datasource provider error #90 (brandonrdn)
v4.1.0 (2018-02-03)
Implemented enhancements:
- (SIMP-4206) Added organization provider and updated datasource provider #86 (heliocentric)
Closed issues:
- "Could not autoload" error in grafana_dashboard with ruby 2.4 on Centos 6 #83
v4.0.3 (2017-12-09)
Closed issues:
- Apt key add gets called every run #77
- Getting rid or changing the url check for grafana datasource url's #75
Merged pull requests:
- Update readme with examples of using datasource and dashboard #80 (devcfgc)
- Removing the datasource url check as it leads to errors with postgres… #76 (Faffnir)
v4.0.2 (2017-10-12)
Implemented enhancements:
- bump archive upper boundary to work with latest versions #73 (bastelfreak)
- add debian 8 and 9 support #72 (bastelfreak)
Merged pull requests:
v4.0.1 (2017-09-22)
Fixed bugs:
- Module doesn't work on Ubuntu Xenial #56
Merged pull requests:
v4.0.0 (2017-09-20)
Breaking changes:
- BREAKING: Switch to Puppet Data Types (ldap_cfg is now undef when disabled) #66 (wyardley)
- BREAKING: Create grafana_plugin resource type and change grafana::plugins #63 (wyardley)
- BREAKING: Update default Grafana version to 4.5.1 and improve acceptance tests #61 (wyardley)
Implemented enhancements:
- grafana_user custom resource #60 (atward)
- Support newer versions of puppetlabs/apt module #53 (ghoneycutt)
- Support custom plugins #44 (bastelfreak)
Fixed bugs:
- gpg key error on CentOS 7 with default params #59
- wget called even if not necessary #54
- Fix typo in provider #58 (atward)
Closed issues:
- install_method 'docker" ignores all other configurations #51
- Usable for Grafana 4.x? #37
- Remove docker dependency #22
Merged pull requests:
- Update README.md #67 (wyardley)
- Get rid of the dependency on 'wget' module in favor of puppet-archive #65 (wyardley)
- Remove licenses from the top of files #64 (wyardley)
- Release 4.0.0 #62 (bastelfreak)
- Always use jessie apt repo when osfamily is Debian. #41 (furhouse)
v3.0.0 (2017-03-29)
Implemented enhancements:
- implement package_ensure param for archlinux #34 (bastelfreak)
Fixed bugs:
- FIX configuration file ownership #30 (cassianoleal)
Closed issues:
- Configured grafana debian repo should contain current distribution #27
- Error while creating dashboard #25
Merged pull requests:
- Bump version, Update changelog #38 (dhoppe)
- Debian and RedHat based operating systems should use the repository by default #36 (dhoppe)
- Add support for archlinux #32 (bastelfreak)
- Fix grafana_dashboards #31 (cassianoleal)
- supoort jessie for install method repo #28 (roock)
- Use operatinsystemmajrelease fact in repo url #24 (mirekys)
- The puppet 4-only release will start at 3.0.0 #21 (rnelson0)
v2.6.3 (2017-01-18)
v2.6.2 (2017-01-18)
Merged pull requests:
v2.6.1 (2017-01-18)
Just a notice: The next release will be a major one without Puppet 3 support! This is the last Release that supports it!
Releasing v2.6.0 (2017-01-18)
Enhancements
- add two types & provider:
grafana_datasource
&grafana_dashboard
these type allow configuration of the datasource and the dashboard against the API - allow configuration of
repo_name
for all installation methods - be more conservative when installing from docker, while also allowing users to
override our
stable
choice
Fixes
- ensure correct ownership of downloaded artefact
- fix use-before definition of
$version
: https://github.com/bfraser/puppet-grafana/issues/87
Behind The Scenes
- switch to voxpupuli/archive from camptocamp
Changes since forking from bfraser/puppet-grafana
- Add CONTRIBUTING.MD as well as our issues, spec etc… templates
- update README and other files to point to forked repository
- Rubocop and ruby-lint style-fixes!
- test with puppet > 4.x
2.5.0 (2015-10-31)
Enhancements
- Support for Grafana 2.5. This is just a version bump to reflect that Grafana 2.5 is now installed by default
- PR #58 Sort
cfg
keys soconfig.ini
content is not updated every Puppet run
Fixes
- Issue #52 Version logic moved to
init.pp
so overriding the version of Grafana to install works as intended
Behind The Scenes
- PR #59 More specific version requirements in
metadata.json
due to use ofcontain
function - PR #61 Fixed typos in
metadata.json
2.1.0 (2015-08-07)
Enhancements
- Support for Grafana 2.1
- Issue #40 Support for LDAP integration
- PR #34 Support for 'repo' install method to install packages from packagecloud repositories
- Addition of boolean parameter
manage_package_repo
to control whether the module will manage the package repository when using the 'repo' install method. See README.md for details - PR #39 Ability to ensure a specific package version is installed when using the 'repo' install method
Fixes
- Issue #37 Archive install method: check if user and service are already defined before attempting to define them
- Issue #42 Package versioning for RPM / yum systems
- Issue #45 Fix resource dependency issues when
manage_package_repo
is false
Behind The Scenes
- Use 40 character GPG key ID for packagecloud apt repository
2.0.2 (2015-04-30)
Enhancements
- Support for Grafana 2.0. Users of Grafana 1.x should stick to version 1.x of the Puppet module
- Support 'archive', 'docker' and 'package' install methods
- Ability to supply a hash of parameters to the Docker container when using 'docker' install method
- PR #24 Ability to configure Grafana using configuration hash parameter
cfg
Behind The Scenes
- Update module operatingsystem support, tags, Puppet requirements
- Tests for 'archive' and 'package' install methods
1.0.1 (2015-02-27)
Enhancements
- New parameter for Grafana admin password
Fixes
- Package install method now makes use of install_dir for config.js path
Behind The Scenes
- Add archive module to .fixtures.yml
- Unquote booleans to make lint happy
- Fix license identifier and unbounded dependencies in module metadata
- Allow Travis to fail on Ruby 1.8.7
- More Puppet versions are tested by Travis
1.0.0 (2014-12-16)
Enhancements
- Add max_search_results parameter
- Install Grafana 1.9.0 by default
Documentation
- Add download_url and install_method parameters to README
Behind The Scenes
- Issue #6 Replace gini/archive dependency with camptocamp/archive
- Addition of CHANGELOG
- Style fixes
- Removal of vagrant-wrapper gem
- Fancy badges for build status
0.2.2 (2014-10-27)
Enhancements
- Add default_route parameter to manage start dashboard
Fixes
- Symlink behavior
Behind The Scenes
- Issue #9 Remove stdlib inclusion from manifest
0.2.1 (2014-10-14)
Enhancements
- Support for multiple datasources
- Install Grafana 1.8.1 by default
Behind The Scenes
- Added RSpec tests
- Add stdlib as a module dependency
- Add operating system compatibility
0.1.3 (2014-07-03)
Enhancements
- Added support for InfluxDB
0.1.2 (2014-06-30)
First release on the Puppet Forge
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppet/archive (>= 1.0.1 < 4.0.0)
- puppetlabs/stdlib (>= 4.20.0 < 6.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.