2013-11-26 22:38:16 +08:00
|
|
|
/** @scratch /configuration/config.js/1
|
2013-12-07 03:32:38 +08:00
|
|
|
* == Configuration
|
2014-01-11 06:04:19 +08:00
|
|
|
* config.js is where you will find the core Grafana configuration. This file contains parameter that
|
2014-03-19 08:53:57 +08:00
|
|
|
* must be set before Grafana is run for the first time.
|
2013-09-14 04:52:13 +08:00
|
|
|
*/
|
|
|
|
define(['settings'],
|
|
|
|
function (Settings) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
return new Settings({
|
|
|
|
|
2014-02-01 16:03:51 +08:00
|
|
|
/**
|
|
|
|
* elasticsearch url:
|
|
|
|
* For Basic authentication use: http://username:password@domain.com:9200
|
|
|
|
*/
|
2013-12-16 01:06:23 +08:00
|
|
|
elasticsearch: "http://"+window.location.hostname+":9200",
|
2013-09-14 04:52:13 +08:00
|
|
|
|
2014-01-23 05:19:58 +08:00
|
|
|
/**
|
2014-02-01 16:03:51 +08:00
|
|
|
* graphite-web url:
|
2014-01-23 05:19:58 +08:00
|
|
|
* For Basic authentication use: http://username:password@domain.com
|
2014-02-01 16:03:51 +08:00
|
|
|
* Basic authentication requires special HTTP headers to be configured
|
|
|
|
* in nginx or apache for cross origin domain sharing to work (CORS).
|
2014-01-23 05:19:58 +08:00
|
|
|
* Check install documentation on github
|
|
|
|
*/
|
2014-01-11 06:04:19 +08:00
|
|
|
graphiteUrl: "http://"+window.location.hostname+":8080",
|
|
|
|
|
2014-02-15 20:46:36 +08:00
|
|
|
/**
|
2014-04-24 23:52:12 +08:00
|
|
|
* Multiple graphite servers? Comment out graphiteUrl and replace with something like this:
|
|
|
|
|
|
|
|
datasources: {
|
|
|
|
data_center_us: {
|
|
|
|
type: 'graphite',
|
|
|
|
url: 'http://<graphite_url>',
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
data_center_eu: {
|
|
|
|
type: 'graphite',
|
|
|
|
url: 'http://<graphite_url>',
|
|
|
|
render_method: 'GET' // optional, use this to change render calls from POST to GET
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2014-02-15 20:46:36 +08:00
|
|
|
*/
|
|
|
|
|
2014-01-19 23:13:28 +08:00
|
|
|
default_route: '/dashboard/file/default.json',
|
2013-12-07 03:32:38 +08:00
|
|
|
|
2014-01-24 23:54:18 +08:00
|
|
|
/**
|
2014-04-13 21:01:06 +08:00
|
|
|
* If you experiance problems with zoom, it is probably caused by timezone diff between
|
|
|
|
* your browser and the graphite-web application. timezoneOffset setting can be used to have Grafana
|
|
|
|
* translate absolute time ranges to the graphite-web timezone.
|
|
|
|
* Example:
|
|
|
|
* If TIME_ZONE in graphite-web config file local_settings.py is set to America/New_York, then set
|
|
|
|
* timezoneOffset to "-0500" (for UTC - 5 hours)
|
|
|
|
* Example:
|
|
|
|
* If TIME_ZONE is set to UTC, set this to "0000"
|
2014-01-24 23:54:18 +08:00
|
|
|
*/
|
2014-04-13 21:01:06 +08:00
|
|
|
|
2014-01-24 23:54:18 +08:00
|
|
|
timezoneOffset: null,
|
|
|
|
|
2014-04-27 18:22:38 +08:00
|
|
|
/**
|
|
|
|
* Elasticsearch index for storing dashboards
|
|
|
|
*
|
|
|
|
*/
|
2014-01-22 15:27:23 +08:00
|
|
|
grafana_index: "grafana-dash",
|
2013-09-14 04:52:13 +08:00
|
|
|
|
2014-04-27 18:22:38 +08:00
|
|
|
/**
|
|
|
|
* set to false to disable unsaved changes warning
|
|
|
|
*/
|
|
|
|
unsaved_changes_warning: true,
|
|
|
|
|
2014-05-30 12:05:49 +08:00
|
|
|
/**
|
|
|
|
* set the default timespan for the playlist feature
|
|
|
|
* Example: "1m", "1h"
|
|
|
|
*/
|
|
|
|
playlist_timespan: "1m",
|
|
|
|
|
2013-09-14 04:52:13 +08:00
|
|
|
panel_names: [
|
|
|
|
'text',
|
2014-06-06 22:02:16 +08:00
|
|
|
'graph'
|
2013-09-14 04:52:13 +08:00
|
|
|
]
|
|
|
|
});
|
2013-10-06 07:41:20 +08:00
|
|
|
});
|