summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-10-12 22:27:02 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-10-12 22:27:02 +0200
commit7f2f8bbd00ac43982aa08289ff65ea460a301f85 (patch)
treecfa48039ae632605eee1460378d90b383d1338a0
parentRevert "Add githook for updating description from metadata.json." (diff)
downloadprofiles-7f2f8bbd00ac43982aa08289ff65ea460a301f85.tar.gz
profiles-7f2f8bbd00ac43982aa08289ff65ea460a301f85.tar.xz
Add grafana draft.
-rw-r--r--manifests/grafana.pp36
1 files changed, 36 insertions, 0 deletions
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',
+ }
+
+}