The Grafana Operator provides a data visualization solution using Grafana, an open-source observability toolkit.
Grafana allows you to query, visualize, alert on, and visualize metrics from mixed datasources in configurable dashboards for observability. This repository contains a Juju Charm for deploying the visualization component of Grafana in a Kuberenetes cluster.
The grafana-k8s charm provides an interface which can ingest data from a wide array of data sources, with Prometheus as a common input, then presents that data on configurable dashboards.
The Grafana Operator may be deployed using the Juju command line via:
juju deploy grafana-k8s
By default, Grafana does not contain any data sources or dashboards, but Prometheus
is commonly used, and is deployable with Juju. The Grafana Operator may also accept additional datasources over Juju
relations with charms which support the grafana-datasource
interface.
For example:
juju deploy prometheus-k8s
juju relate prometheus-k8s grafana-k8s
The Grafana Operator includes a Charm library which may be used by other Charms to easily provide datasources with a
add_source
method.
View the dashboard in a browser:
juju status
to check the IP of the of the running Grafana application- Navigate to
http://IP_ADDRESS:3000
- Log in with the default credentials username=admin, password=admin (these credentials are configurable at deploy time)
The Grafana dashboard may be accessed at a selectable port (default 3000
) on the IP address of the Grafana unit. This
unit and its IP address can be retrieved using the juju status
command.
This charm is written to support a high-availability Grafana cluster, but a database relation is required (MySQL or Postgresql).
If HA is not required, there is no need to add a database relation.
NOTE: HA should not be considered for production use.
grafana_datasource - An input for grafana-k8s datasources
grafana_dashboard - an input for zlib compressed base64 encoded dashboard data
This charm defaults to the latest version of the ubuntu/grafana image.
See the Juju SDK docs for guidelines on configuring a development environment and best practices for authoring.