config.sample.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ///// @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 Grafana is run for the first time.
  5. ///
  6. define(['settings'],
  7. function (Settings) {
  8. "use strict";
  9. return new Settings({
  10. /* Data sources
  11. * ========================================================
  12. * Datasources are used to fetch metrics, annotations, and serve as dashboard storage
  13. * - You can have multiple of the same type.
  14. * - grafanaDB: true marks it for use for dashboard storage
  15. * - default: true marks the datasource as the default metric source (if you have multiple)
  16. * - basic authentication: use url syntax http://username:password@domain:port
  17. */
  18. // InfluxDB example setup (the InfluxDB databases specified need to exist)
  19. /*
  20. datasources: {
  21. influxdb: {
  22. type: 'influxdb',
  23. url: "http://my_influxdb_server:8086/db/database_name",
  24. username: 'admin',
  25. password: 'admin',
  26. },
  27. grafana: {
  28. type: 'influxdb',
  29. url: "http://my_influxdb_server:8086/db/grafana",
  30. username: 'admin',
  31. password: 'admin',
  32. grafanaDB: true
  33. },
  34. },
  35. */
  36. // Graphite & Elasticsearch example setup
  37. /*
  38. datasources: {
  39. graphite: {
  40. type: 'graphite',
  41. url: "http://my.graphite.server.com:8080",
  42. },
  43. elasticsearch: {
  44. type: 'elasticsearch',
  45. url: "http://my.elastic.server.com:9200",
  46. index: 'grafana-dash',
  47. grafanaDB: true,
  48. }
  49. },
  50. */
  51. // OpenTSDB & Elasticsearch example setup
  52. /*
  53. datasources: {
  54. opentsdb: {
  55. type: 'opentsdb',
  56. url: "http://opentsdb.server:4242",
  57. },
  58. elasticsearch: {
  59. type: 'elasticsearch',
  60. url: "http://my.elastic.server.com:9200",
  61. index: 'grafana-dash',
  62. grafanaDB: true,
  63. }
  64. },
  65. */
  66. /* Global configuration options
  67. * ========================================================
  68. */
  69. // specify the limit for dashboard search results
  70. search: {
  71. max_results: 20
  72. },
  73. // default start dashboard
  74. default_route: '/dashboard/file/default.json',
  75. // set to false to disable unsaved changes warning
  76. unsaved_changes_warning: true,
  77. // set the default timespan for the playlist feature
  78. // Example: "1m", "1h"
  79. playlist_timespan: "1m",
  80. // If you want to specify password before saving, please specify it bellow
  81. // The purpose of this password is not security, but to stop some users from accidentally changing dashboards
  82. admin: {
  83. password: ''
  84. },
  85. // Add your own custom pannels
  86. plugins: {
  87. // list of plugin panels
  88. panels: [],
  89. // requirejs modules in plugins folder that should be loaded
  90. // for example custom datasources
  91. dependencies: [],
  92. }
  93. });
  94. });