config.sample.js 3.1 KB

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