Skip to content

Ansible Role linuxfabrik.lfops.grafana_grizzly

This role installs grizzly, a tool for the management of Grafana dashboards.

Additionally, this role allows you to apply Grafana resources which are saved as {{ inventory_dir }}/host_vars/{{ inventory_hostname }}/files/grafana_grizzly/*.yml.

Available since LFOps 3.0.0.

How the Role Behaves

  • Dashboards stay in their folder on Grafana 13.1 and newer. From Grafana 13.1 on, grizzly files every dashboard it adds or updates in the root instead of in the folder named in the resource, and the dashboard loses the viewer permission it inherited from the folder, so viewers and the graphs embedded in IcingaWeb2 get "403". After applying, the role saves every dashboard that is not in its folder again, which puts it back and restores the permission. This also repairs dashboards that earlier runs left in the root. A dashboard whose resource names the folder general belongs into the root and is left there.

Dependent Roles

Any LFOps playbook that installs this role runs these for you. Optional ones can be disabled via the playbook's skip variables.

Tags

grafana_grizzly

  • Installs grizzly and applies the given resources.
  • Triggers: none.

grafana_grizzly:apply

  • Applies the given resources.
  • Triggers: none.

Mandatory Role Variables

grafana_grizzly__grafana_service_account_login

  • The login for a Grafana service account with a "Admin" token. The password will be automatically generated by Grafana and therefore cannot be set here. Set it manually according to the output during the Ansible run.
  • Type: Dictionary.
  • Default: none

Example:

# mandatory
grafana_grizzly__grafana_service_account_login:
  username: 'grizzly'
  password: 'linuxfabrik'

Optional Role Variables

grafana_grizzly__grafana_url

  • The URL under which Grafana is reachable.
  • Type: String.
  • Default: '{{ grafana__api_url }}'

grafana_grizzly__version

  • The version of Grizzly to install. Possible options: 'latest', or any from https://github.com/grafana/grizzly/releases.
  • Type: String.
  • Default: 'v0.2.0'

Hints:

  • 20240624 we can't use "latest", because then we get annoying errors like: "Providers: Grafana - active, Mimir - inactive (mimir address is not set), Synthetic Monitoring - inactive (stack id is not set)'"
  • v0.2.0 is the last known good version to use for the way we how we deploy grizzly dashboards and datasources

Example:

# optional
grafana_grizzly__grafana_url: 'http://localhost:3000'
grafana_grizzly__version: 'v0.2.0'

License

The Unlicense

Author Information

Linuxfabrik GmbH, Zurich