Grafana SaltStack Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
947 B

{%- from "grafana/map.jinja" import server with context %}
doc:
name: Grafana
description: A beautiful, easy to use and feature rich Graphite dashboard replacement and graph editor.
role:
server:
name: server
param:
bind:
name: Network
value: {{ server.bind.address }}:{{ server.bind.port }}
endpoint:
{%- if server.bind.address == '0.0.0.0' %}
{%- for address in salt['grains.item']('ipv4')['ipv4'] %}
{%- if address != '127.0.0.1' %}
grafana_server:
name: default
type: grafana_server
address: http://{{ address }}:{{ server.bind.port }}/
protocol: http
{%- endif %}
{%- endfor %}
{%- else %}
grafana_server:
name: default
type: grafana_server
address: http://{{ server.bind.address }}:{{ server.bind.port }}/
protocol: http
{%- endif %}