Skip to content

Instantly share code, notes, and snippets.

@otoolep
Last active August 29, 2015 14:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otoolep/c58991dec54711026b77 to your computer and use it in GitHub Desktop.
Save otoolep/c58991dec54711026b77 to your computer and use it in GitHub Desktop.
grafana 1.54 config for influxdb
/** @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 Grafana 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
*/
elasticsearch: "http://"+window.location.hostname+":9200",
/**
* 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
*/
//graphiteUrl: "http://"+window.location.hostname+":8080",
datasources: {
influx: {
default: true,
type: 'influxdb',
url: "http://PUBLIC_HOSTNAME:8086/db/test1",
username: 'root',
password: 'root'
}
},
default_route: '/dashboard/file/default.json',
/**
* 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"
*/
timezoneOffset: null,
/**
* Elasticsearch index for storing dashboards
*
*/
grafana_index: "grafana-dash",
/**
* set to false to disable unsaved changes warning
*/
unsaved_changes_warning: true,
panel_names: [
'text',
'graphite'
]
});
});
@otoolep
Copy link
Author

otoolep commented Jun 11, 2014

Check out the blog post at http://www.philipotoole.com/influxdb-and-grafana-howto for full details on how to use this config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment