grafana.ini 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. [database]
  13. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  14. type = sqlite3
  15. host = 127.0.0.1:3306
  16. name = grafana
  17. user = root
  18. password =
  19. ; For "postgres" only, either "disable", "require" or "verify-full"
  20. ssl_mode = disable
  21. ; For "sqlite3" only
  22. path = data/grafana.db
  23. [session]
  24. ; Either "memory", "file", default is "memory"
  25. provider = file
  26. ; Provider config options
  27. ; memory: not have any config yet
  28. ; file: session file path, e.g. `data/sessions`
  29. ; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana`
  30. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  31. provider_config = data/sessions
  32. ; Session cookie name
  33. cookie_name = grafana_sess
  34. ; If you use session in https only, default is false
  35. cookie_secure = false
  36. ; Enable set cookie, default is true
  37. enable_set_cookie = true
  38. ; Session GC time interval, default is 86400
  39. gc_time_interval = 86400
  40. ; Session life time, default is 86400
  41. session_life_time = 86400
  42. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  43. session_id_hashfunc = sha1
  44. ; Session hash key, default is use random string
  45. session_id_hashkey =
  46. [security]
  47. ; default admin user, created on startup
  48. admin_user = admin
  49. ; default admin password, can be changed before first start of grafana, or in profile settings
  50. admin_password = admin
  51. ; used for signing
  52. secret_key = SW2YcwTIb9zpOOhoPsMm
  53. ; Auto-login remember days
  54. login_remember_days = 7
  55. cookie_username = grafana_user
  56. cookie_remember_name = grafana_remember
  57. ; disable user signup / registration
  58. ; disable_user_signup = false, not implemented yet
  59. [account.single]
  60. ; Enable this feature to auto assign new users to a single account, suitable for NON multi tenant setups
  61. enabled = true
  62. ; Name of default account
  63. account_name = main
  64. ; Default role new users will be automatically assigned
  65. default_role = Editor
  66. [auth.anonymous]
  67. ; enable anonymous access
  68. enabled = false
  69. ; specify account name that should be used for unauthenticated users
  70. account_name = main
  71. ; specify role for unauthenticated users
  72. account_role = Viewer
  73. [auth.github]
  74. enabled = false
  75. client_id = some_id
  76. client_secret = some_secret
  77. scopes = user:email
  78. auth_url = https://github.com/login/oauth/authorize
  79. token_url = https://github.com/login/oauth/access_token
  80. [auth.google]
  81. enabled = false
  82. client_id = some_client_id
  83. client_secret = some_client_secret
  84. scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  85. auth_url = https://accounts.google.com/o/oauth2/auth
  86. token_url = https://accounts.google.com/o/oauth2/token
  87. [log]
  88. root_path =
  89. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  90. ; Use comma to separate multiple modes, e.g. "console, file"
  91. mode = console
  92. ; Buffer length of channel, keep it as it is if you don't know what it is.
  93. buffer_len = 10000
  94. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  95. level = Info
  96. ; For "console" mode only
  97. [log.console]
  98. level =
  99. ; For "file" mode only
  100. [log.file]
  101. level =
  102. ; This enables automated log rotate(switch of following options), default is true
  103. log_rotate = true
  104. ; Max line number of single file, default is 1000000
  105. max_lines = 1000000
  106. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  107. max_lines_shift = 28
  108. ; Segment log daily, default is true
  109. daily_rotate = true
  110. ; Expired days of log file(delete after max days), default is 7
  111. max_days = 7