1
0
Fork 0
mirror of synced 2024-11-22 08:55:35 -05:00

Allow the installation of Grafana plugins

Change-Id: I6eab0435fb169ed12c880af01ba1e76a06268825
This commit is contained in:
Guillaume Thouvenin 2017-03-09 17:01:26 +01:00 committed by Simon Pasquier
parent 308f9e4f0e
commit 22c462b504
2 changed files with 23 additions and 0 deletions

View file

@ -155,6 +155,18 @@ Server with theme overrides
css_override: css_override:
source: salt://path.to.theme source: salt://path.to.theme
Server with two additionals plugins. It requires to have access to the Internet.
.. code-block:: yaml
grafana:
server:
enabled: true
plugins:
grafana-piechart-panel:
enabled: true
grafana-example-app:
enabled: true
Collector setup Collector setup
--------------- ---------------

View file

@ -79,4 +79,15 @@ grafana_service:
- watch: - watch:
- file: /etc/grafana/grafana.ini - file: /etc/grafana/grafana.ini
{%- for plugin_name, plugin in server.get('plugins', {}).iteritems() %}
{%- if plugin.get('enabled', False) %}
install_{{ plugin_name }}:
cmd.run:
- name: grafana-cli plugins install {{ plugin_name }}
- unless: grafana-cli plugins list-versions {{ plugin_name }}
- watch_in:
- service: grafana_service
{%- endif %}
{%- endfor %}
{%- endif %} {%- endif %}