grafana_dashboard – list or search grafana dashboards — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# grafana_dashboard – list or search grafana dashboards

New in version 2.7.

- Synopsis
- Parameters
- Examples
- Status

## Synopsis

- This lookup returns a list of grafana dashboards with possibility to filter them by query.

## Parameters

Parameter | Choices/Defaults | Configuration | Comments
--- | --- | --- | ---
grafana_api_key - |  | env:GRAFANA_API_KEY | api key of grafana. when `grafana_api_key` is set, the options `grafan_user`, `grafana_password` and `grafana_org_id` are ignored. Attention, please remove the two == at the end of the grafana_api_key because ansible lookup plugins options are split on = (see example).
grafana_org_id - | Default: 1 | env:GRAFANA_ORG_ID | grafana organisation id.
grafana_password - | Default: "admin" | env:GRAFANA_PASSWORD | grafana authentication password.
grafana_url - | Default: "http://127.0.0.1:3000" | env:GRAFANA_URL | url of grafana.
grafana_user - | Default: "admin" | env:GRAFANA_USER | grafana authentication user.
search - |  | env:GRAFANA_DASHBOARD_SEARCH | optional filter for dashboard search.

## Examples

    - name: get project foo grafana dashboards
      set_fact:
        grafana_dashboards: "{{ lookup('grafana_dashboard', 'grafana_url=http://grafana.company.com grafana_user=admin grafana_password=admin search=foo') }}"

    - name: get all grafana dashboards
      set_fact:
        grafana_dashboards: "{{ lookup('grafana_dashboard', 'grafana_url=http://grafana.company.com grafana_api_key=' ~ grafana_api_key|replace('==', '')) }}"

## Status

- This lookup is not guaranteed to have a backwards compatible interface. [preview]
- This lookup is maintained by the Ansible Community. [community]

### Authors

- Thierry Salle (@seuf)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.