config.sample.js 2.9 KB

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