blob: 3c24257fc223489d26d09f7c58c60f8e9ad0bfe1 [file] [log] [blame]
Ales Komarek9a579052014-02-24 23:14:45 +01001/** @scratch /configuration/config.js/1
2 * == Configuration
3 * config.js is where you will find the core Grafana configuration. This file contains parameter that
4 * must be set before kibana is run for the first time.
5 */
6define(['settings'],
7function (Settings) {
8 "use strict";
9
10 return new Settings({
11
12 /**
13 * elasticsearch url:
14 * For Basic authentication use: http://username:password@domain.com:9200
15 */
Michael Kutý56bc4d12014-03-03 19:01:04 +010016 elasticsearch: "http://{{ salt['pillar.get']('grafana:server:elasticsearch:host', "") }}:{{ salt['pillar.get']('grafana:server:elasticsearch:port', 9200) }}",
Ales Komarek9a579052014-02-24 23:14:45 +010017
18 /**
19 * graphite-web url:
20 * For Basic authentication use: http://username:password@domain.com
21 * Basic authentication requires special HTTP headers to be configured
22 * in nginx or apache for cross origin domain sharing to work (CORS).
23 * Check install documentation on github
24 */
Michael Kutý56bc4d12014-03-03 19:01:04 +010025 {% set data = pillar.grafana.server.data %}
26
27 {% if data.get("type", "") == "graphite" %}
28 {% if data.get("ssl", "false") %}
29 graphiteUrl: "https://"+{{ data.get("host", "") }}+":{{ data.get("port", 443) }}",
30 {% else %}
31 graphiteUrl: "http://"+{{ data.get("host", "") }}+":{{ data.get("port", 80) }}",
32 {% endif %}
33 {% endif %}
Ales Komarek9a579052014-02-24 23:14:45 +010034
35 /**
36 * Multiple graphite servers? Comment out graphiteUrl and replace with
37 *
38 * datasources: {
39 * data_center_us: { type: 'graphite', url: 'http://<graphite_url>', default: true },
40 * data_center_eu: { type: 'graphite', url: 'http://<graphite_url>' }
41 * }
42 */
43
44 default_route: '/dashboard/file/default.json',
45
46 /**
47 * If your graphite server has another timezone than you & users browsers specify the offset here
48 * Example: "-0500" (for UTC - 5 hours)
49 */
50 timezoneOffset: null,
51
52 grafana_index: "grafana-dash",
53
54 panel_names: [
55 'text',
56 'graphite'
57 ]
58 });
59});