grafana.ini 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. app_name = Grafana
  2. app_mode = development
  3. [server]
  4. protocol = http
  5. domain = localhost
  6. root_url = %(protocol)s://%(domain)s:%(http_port)s/
  7. http_addr =
  8. http_port = 3000
  9. router_logging = false
  10. static_root_path = public
  11. enable_gzip = false
  12. [session]
  13. ; Either "memory", "file", default is "memory"
  14. provider = file
  15. ; Provider config options
  16. ; memory: not have any config yet
  17. ; file: session file path, e.g. `data/sessions`
  18. ; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana`
  19. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  20. provider_config = data/sessions
  21. ; Session cookie name
  22. cookie_name = grafana_sess
  23. ; If you use session in https only, default is false
  24. cookie_secure = false
  25. ; Enable set cookie, default is true
  26. enable_set_cookie = true
  27. ; Session GC time interval, default is 86400
  28. gc_time_interval = 86400
  29. ; Session life time, default is 86400
  30. session_life_time = 86400
  31. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  32. session_id_hashfunc = sha1
  33. ; Session hash key, default is use random string
  34. session_id_hashkey =
  35. [admin]
  36. ; default admin user, created on startup
  37. user = admin
  38. ; default admin password, can be changed before first start of grafana, or in profile settings
  39. password = admin
  40. [auth]
  41. anonymous = false
  42. anonymous_account_id =
  43. [auth.grafana]
  44. enabled = true
  45. [auth.github]
  46. enabled = false
  47. client_id = some_id
  48. client_secret = some_secret
  49. scopes = user:email
  50. auth_url = https://github.com/login/oauth/authorize
  51. token_url = https://github.com/login/oauth/access_token
  52. [auth.google]
  53. enabled = false
  54. client_id = some_client_id
  55. client_secret = some_client_secret
  56. scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  57. auth_url = https://accounts.google.com/o/oauth2/auth
  58. token_url = https://accounts.google.com/o/oauth2/token
  59. [database]
  60. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  61. type = sqlite3
  62. host = 127.0.0.1:3306
  63. name = grafana
  64. user = root
  65. password =
  66. ; For "postgres" only, either "disable", "require" or "verify-full"
  67. ssl_mode = disable
  68. ; For "sqlite3" only
  69. path = data/grafana.db
  70. [log]
  71. root_path =
  72. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  73. ; Use comma to separate multiple modes, e.g. "console, file"
  74. mode = console
  75. ; Buffer length of channel, keep it as it is if you don't know what it is.
  76. buffer_len = 10000
  77. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  78. level = Trace
  79. ; For "console" mode only
  80. [log.console]
  81. level =
  82. ; For "file" mode only
  83. [log.file]
  84. level =
  85. ; This enables automated log rotate(switch of following options), default is true
  86. log_rotate = true
  87. ; Max line number of single file, default is 1000000
  88. max_lines = 1000000
  89. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  90. max_lines_shift = 28
  91. ; Segment log daily, default is true
  92. daily_rotate = true
  93. ; Expired days of log file(delete after max days), default is 7
  94. max_days = 7