1
0
Fork 0
mirror of synced 2024-11-22 17:05:34 -05:00
formula-grafana/conf/config.js

64 lines
1.9 KiB
JavaScript
Raw Normal View History

2014-02-24 17:14:45 -05:00
/** @scratch /configuration/config.js/1
* == Configuration
* config.js is where you will find the core Grafana configuration. This file contains parameter that
* must be set before kibana is run for the first time.
*/
define(['settings'],
function (Settings) {
"use strict";
return new Settings({
/**
* elasticsearch url:
* For Basic authentication use: http://username:password@domain.com:9200
*/
2014-03-03 14:16:15 -05:00
elasticsearch: "http://{{ pillar.grafana.server.elasticsearch.host }}:{{ pillar.grafana.server.elasticsearch.port }}",
2014-02-24 17:14:45 -05:00
/**
* graphite-web url:
* For Basic authentication use: http://username:password@domain.com
* Basic authentication requires special HTTP headers to be configured
* in nginx or apache for cross origin domain sharing to work (CORS).
* Check install documentation on github
*/
2014-03-03 13:54:05 -05:00
{% if (pillar.grafana.server.data|length) == 1 %}
2014-03-03 13:01:04 -05:00
2014-03-03 13:38:47 -05:00
{% for data in pillar.grafana.server.data %}
{%- if data.type == "graphite" %}
2014-03-03 13:54:05 -05:00
graphiteUrl: "http://{{ data.host }}:{{ data.port }}",
2014-03-03 13:38:47 -05:00
{%- endif %}
{% endfor %}
{%- else %}
/*graphiteUrl: "http://"+{{ salt['pillar.get']('grafana:server:data:host', "")}}+":{{ salt['pillar.get']('grafana:server:data:port', 80)}}",
*/
2014-02-24 17:14:45 -05:00
/**
* Multiple graphite servers? Comment out graphiteUrl and replace with
*
* datasources: {
2014-03-03 13:54:05 -05:00
2014-02-24 17:14:45 -05:00
* data_center_us: { type: 'graphite', url: 'http://<graphite_url>', default: true },
* data_center_eu: { type: 'graphite', url: 'http://<graphite_url>' }
* }
*/
2014-03-03 13:38:47 -05:00
{%- endif %}
2014-02-24 17:14:45 -05:00
default_route: '/dashboard/file/default.json',
/**
* If your graphite server has another timezone than you & users browsers specify the offset here
* Example: "-0500" (for UTC - 5 hours)
*/
timezoneOffset: null,
grafana_index: "grafana-dash",
panel_names: [
'text',
'graphite'
]
});
});