grafana.ini 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. app_name = Grafana
  2. app_mode = production
  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. [security]
  36. ; default admin user, created on startup
  37. admin_user = admin
  38. ; default admin password, can be changed before first start of grafana, or in profile settings
  39. admin_password = admin
  40. ; used for sig
  41. secret_key = !#@FDEWREWR&*(
  42. ; Auto-login remember days
  43. login_remember_days = 7
  44. cookie_username = grafana_user
  45. cookie_remember_name = grafana_remember
  46. [auth]
  47. anonymous = false
  48. anonymous_account_id =
  49. [auth.github]
  50. enabled = false
  51. client_id = some_id
  52. client_secret = some_secret
  53. scopes = user:email
  54. auth_url = https://github.com/login/oauth/authorize
  55. token_url = https://github.com/login/oauth/access_token
  56. [auth.google]
  57. enabled = false
  58. client_id = some_client_id
  59. client_secret = some_client_secret
  60. scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  61. auth_url = https://accounts.google.com/o/oauth2/auth
  62. token_url = https://accounts.google.com/o/oauth2/token
  63. [database]
  64. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  65. type = sqlite3
  66. host = 127.0.0.1:3306
  67. name = grafana
  68. user = root
  69. password =
  70. ; For "postgres" only, either "disable", "require" or "verify-full"
  71. ssl_mode = disable
  72. ; For "sqlite3" only
  73. path = data/grafana.db
  74. [log]
  75. root_path =
  76. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  77. ; Use comma to separate multiple modes, e.g. "console, file"
  78. mode = console
  79. ; Buffer length of channel, keep it as it is if you don't know what it is.
  80. buffer_len = 10000
  81. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  82. level = Info
  83. ; For "console" mode only
  84. [log.console]
  85. level =
  86. ; For "file" mode only
  87. [log.file]
  88. level =
  89. ; This enables automated log rotate(switch of following options), default is true
  90. log_rotate = true
  91. ; Max line number of single file, default is 1000000
  92. max_lines = 1000000
  93. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  94. max_lines_shift = 28
  95. ; Segment log daily, default is true
  96. daily_rotate = true
  97. ; Expired days of log file(delete after max days), default is 7
  98. max_days = 7