community.grafana.grafana_dashboard – Manage Grafana dashboards¶
Note
This plugin is part of the community.grafana collection (version 1.1.0).
To install it use: ansible-galaxy collection install community.grafana
.
To use it in a playbook, specify: community.grafana.grafana_dashboard
.
New in version 1.0.0: of community.grafana
Parameters¶
Examples¶
- hosts: localhost
connection: local
tasks:
- name: Import Grafana dashboard foo
community.grafana.grafana_dashboard:
grafana_url: http://grafana.company.com
grafana_api_key: "{{ grafana_api_key }}"
state: present
commit_message: Updated by ansible
overwrite: yes
path: /path/to/dashboards/foo.json
- name: Import Grafana dashboard Zabbix
community.grafana.grafana_dashboard:
grafana_url: http://grafana.company.com
grafana_api_key: "{{ grafana_api_key }}"
folder: zabbix
dashboard_id: 6098
dashbord_revision: 1
- name: Import Grafana dashboard zabbix
community.grafana.grafana_dashboard:
grafana_url: http://grafana.company.com
grafana_api_key: "{{ grafana_api_key }}"
folder: public
dashboard_url: https://grafana.com/api/dashboards/6098/revisions/1/download
- name: Export dashboard
community.grafana.grafana_dashboard:
grafana_url: http://grafana.company.com
grafana_user: "admin"
grafana_password: "{{ grafana_password }}"
org_id: 1
state: export
uid: "000000653"
path: "/path/to/dashboards/000000653.json"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
uid
string
|
success |
uid or slug of the created / deleted / exported dashboard.
Sample:
51
|
Authors¶
Thierry Sallé (@seuf)