kubernetes
elasticsearch
kafka
zookeeper
ceph
cassandra
percona-cluster
glance
mariadb
spark
Grafana is the leading graph and dashboard builder for visualizing time series metrics.
This charm provides the latest stable version of Grafana.
juju deploy grafana juju add-relation prometheus:grafana-source grafana:grafana-source
Above will automatically configure prometheus as grafana datasource
If admin password is not set using configuration option it is autogenerated.
To retrieve autogenerated password run: $ juju run-action --wait grafana/0 get-admin-password
This charm supports importing dashboards, simply run:
$ juju run-action --wait grafana/0 import-dashboard dashboard="$(base64 mydashboard.json)"
where mydashboard.json is a json file:
{ "dashboard": { exported-json-dashboard }, "overwrite": true }
If you don't want to overwrite the dashboard, set overwrite to false.
There is also an action to create an API key, run:
$ juju run-action --wait grafana/0 create-api-key keyname= keyrole=
where the keyrole is one of Viewer, Editor, Read Only Editor or Admin.
Currently user management is only implemented to manipulate users in the default organisation.
You can retrieve the admin password, via:
$ juju run-action --wait grafana/0 get-admin-password
You can create a user:
$ juju run-action -w grafana/0 create-user name="John Citizen" \ email="john@example.com" login="john" password="redacted" \ role="Viewer"
where the role is one of Viewer, Editor, Read Only Editor or Admin. This will create the user in the default organisation.
To reset a user's password:
$ juju run-action --wait grafana/0 set-user-password \ login=john new-password=citizen2
This again assumes the user is in the default organisation, if it isn't it won't find the user.
If you need to change the user's role, run:
$ juju run-action --wait grafana/0 change-user-role login="john" \ new-role="Admin"
To delete a user, you simply run:
$ juju run-action --wait grafana/0 delete-user login=john
Explicitly set JUJU_REPOSITORY:
JUJU_REPOSITORY
export JUJU_REPOSITORY=/path/to/charms mkdir -p $JUJU_REPOSITORY/layers
Branch code to
$JUJU_REPOSITORY/layers/layer-grafana/
Modify
Assemble the charm:
charm build
Author: Alvaro Uria alvaro.uria@canonical.com, Jacek Nykis jacek.nykis@canonical.com Report bugs at: https://bugs.launchpad.net/grafana-charm Location: Composed grafana charm: cs:~prometheus-charmers/grafana Grafana layer: https://code.launchpad.net/grafana-charm