Allow the installation of Grafana plugins

Change-Id: I6eab0435fb169ed12c880af01ba1e76a06268825
pull/27/head
Guillaume Thouvenin 6 years ago committed by Simon Pasquier
parent 308f9e4f0e
commit 22c462b504
  1. 12
      README.rst
  2. 11
      grafana/server.sls

@ -155,6 +155,18 @@ Server with theme overrides
css_override:
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
---------------

@ -79,4 +79,15 @@ grafana_service:
- watch:
- 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 %}

Loading…
Cancel
Save