Add grafyaml support
This works almost the same way as JJB. Dashboards are stored in yaml, puppet detects a file change, and grafana-dashboard publishes the changes into grafana. Change-Id: I91d539bdf7273a26dbd6ac46268bf5f98b1ea44f Depends-On: I2755fe4fee720c7805eed2cb5bdf11de667bbd4f Depends-On: I07577d72b2d5d6a552a9f50f551263fe3ac47dfb Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
d3371e39c2
commit
ef5b4f5487
25
doc/source/grafyaml.rst
Normal file
25
doc/source/grafyaml.rst
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
:title: Grafyaml
|
||||||
|
|
||||||
|
.. _grafyaml:
|
||||||
|
|
||||||
|
Grafyaml
|
||||||
|
########
|
||||||
|
|
||||||
|
Grafyaml is a system for configuring Grafana dashboards using
|
||||||
|
simple YAML files stored in Git.
|
||||||
|
|
||||||
|
At a Glance
|
||||||
|
===========
|
||||||
|
|
||||||
|
:Hosts:
|
||||||
|
* http://grafana.openstack.org
|
||||||
|
:Puppet:
|
||||||
|
* https://github.com/pabelanger/puppet-grafyaml
|
||||||
|
:Configuration:
|
||||||
|
* :config:`grafana`
|
||||||
|
:Projects:
|
||||||
|
* https://git.openstack.org/cgit/openstack-infra/grafyaml
|
||||||
|
:Bugs:
|
||||||
|
* https://storyboard.openstack.org/#!/project/818
|
||||||
|
:Resources:
|
||||||
|
* `Reference Manual <http://docs.openstack.org/infra/grafyaml>`_
|
@ -9,6 +9,7 @@ Major Systems
|
|||||||
cacti
|
cacti
|
||||||
gerrit
|
gerrit
|
||||||
grafana
|
grafana
|
||||||
|
grafyaml
|
||||||
jenkins
|
jenkins
|
||||||
zuul
|
zuul
|
||||||
jjb
|
jjb
|
||||||
|
@ -123,13 +123,14 @@ node 'grafana.openstack.org' {
|
|||||||
sysadmins => hiera('sysadmins', []),
|
sysadmins => hiera('sysadmins', []),
|
||||||
}
|
}
|
||||||
class { 'openstack_project::grafana':
|
class { 'openstack_project::grafana':
|
||||||
admin_password => hiera('grafana_admin_password', 'XXX'),
|
admin_password => hiera('grafana_admin_password', 'XXX'),
|
||||||
admin_user => hiera('grafana_admin_user', 'username'),
|
admin_user => hiera('grafana_admin_user', 'username'),
|
||||||
mysql_host => hiera('grafana_mysql_host', 'localhost'),
|
mysql_host => hiera('grafana_mysql_host', 'localhost'),
|
||||||
mysql_name => hiera('grafana_mysql_name', 'XXX'),
|
mysql_name => hiera('grafana_mysql_name', 'XXX'),
|
||||||
mysql_password => hiera('grafana_mysql_password', 'XXX'),
|
mysql_password => hiera('grafana_mysql_password', 'XXX'),
|
||||||
mysql_user => hiera('grafana_mysql_user', 'username'),
|
mysql_user => hiera('grafana_mysql_user', 'username'),
|
||||||
secret_key => hiera('grafana_secret_key', 'XXX'),
|
project_config_repo => 'https://git.openstack.org/openstack-infra/project-config',
|
||||||
|
secret_key => hiera('grafana_secret_key', 'XXX'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-exim"]="origin/m
|
|||||||
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-gerrit"]="origin/master"
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-gerrit"]="origin/master"
|
||||||
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-gerritbot"]="origin/master"
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-gerritbot"]="origin/master"
|
||||||
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-github"]="origin/master"
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-github"]="origin/master"
|
||||||
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-grafyaml"]="origin/master"
|
||||||
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-graphite"]="origin/master"
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-graphite"]="origin/master"
|
||||||
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-haveged"]="origin/master"
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-haveged"]="origin/master"
|
||||||
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-httpd"]="origin/master"
|
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-httpd"]="origin/master"
|
||||||
|
@ -10,9 +10,12 @@ class openstack_project::grafana (
|
|||||||
$admin_password = '',
|
$admin_password = '',
|
||||||
$admin_user = 'admin',
|
$admin_user = 'admin',
|
||||||
$grafana_cfg = {},
|
$grafana_cfg = {},
|
||||||
|
$http_host = '127.0.0.1',
|
||||||
|
$http_port = '8080',
|
||||||
$mysql_host = '127.0.0.1',
|
$mysql_host = '127.0.0.1',
|
||||||
$mysql_name = 'grafana',
|
$mysql_name = 'grafana',
|
||||||
$mysql_user = 'grafana',
|
$mysql_user = 'grafana',
|
||||||
|
$project_config_repo = '',
|
||||||
$secret_key = '',
|
$secret_key = '',
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
) {
|
) {
|
||||||
@ -40,8 +43,8 @@ class openstack_project::grafana (
|
|||||||
secret_key => $secret_key,
|
secret_key => $secret_key,
|
||||||
},
|
},
|
||||||
'server' => {
|
'server' => {
|
||||||
http_addr => '127.0.0.1',
|
http_addr => $http_host,
|
||||||
http_port => 8080,
|
http_port => $http_port,
|
||||||
},
|
},
|
||||||
'users' => {
|
'users' => {
|
||||||
allow_sign_up => false,
|
allow_sign_up => false,
|
||||||
@ -76,4 +79,14 @@ class openstack_project::grafana (
|
|||||||
httpd_mod { 'proxy_http':
|
httpd_mod { 'proxy_http':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class { '::project_config':
|
||||||
|
url => $project_config_repo,
|
||||||
|
}
|
||||||
|
|
||||||
|
class { '::grafyaml':
|
||||||
|
config_dir => $::project_config::grafana_dashboards_dir,
|
||||||
|
grafana_url => "http://${admin_user}:${admin_password}@${http_host}:${http_port}",
|
||||||
|
require => Class['grafana'],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user