From 7f2f8bbd00ac43982aa08289ff65ea460a301f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 12 Oct 2022 22:27:02 +0200 Subject: Add grafana draft. --- manifests/grafana.pp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 manifests/grafana.pp diff --git a/manifests/grafana.pp b/manifests/grafana.pp new file mode 100644 index 0000000..025ceda --- /dev/null +++ b/manifests/grafana.pp @@ -0,0 +1,36 @@ +class profiles::grafana ( +) { + + class { '::grafana': + cfg => { + app_mode => 'production', + server => { + http_port => 8080, + }, + users => { + allow_sign_up => false, + } + } + } + + grafana_datasource { 'prometheus': + grafana_url => 'http://localhost:8080', + grafana_user => 'admin', + grafana_password => 'admin', + type => 'prometheus', + url => 'http://localhost:9090', + } + + grafana_user { 'hugo': + # Who to create + full_name => 'Hugo Hörnquist', + password => 'password', + is_admin => true, + # Who to access the api as + grafana_user => 'admin', + grafana_password => 'admin', + # Where to find the api + grafana_url => 'http://localhost:8080', + } + +} -- cgit v1.2.3