sample.ini 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. ##################### Grafana Configuration Example #####################
  2. #
  3. # Everything has defaults so you only need to uncomment things you want to
  4. # change
  5. ; app_mode = production
  6. #################################### Paths ####################################
  7. [paths]
  8. # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is useD)
  9. #
  10. ;data = /var/lib/grafana
  11. #
  12. # Directory where grafana can store logs
  13. #
  14. ;logs = /var/log/grafana
  15. #################################### Server ####################################
  16. [server]
  17. # Protocol (http or https)
  18. ;protocol = http
  19. # The ip address to bind to, empty will bind to all interfaces
  20. ;http_addr =
  21. # The http port to use
  22. ;http_port = 3000
  23. # The public facing domain name used to access grafana from a browser
  24. ;domain = localhost
  25. # The full public facing url
  26. ;root_url = %(protocol)s://%(domain)s:%(http_port)s/
  27. # Log web requests
  28. ;router_logging = false
  29. # the path relative working path
  30. ;static_root_path = public
  31. # enable gzip
  32. ;enable_gzip = false
  33. # https certs & key file
  34. ;cert_file =
  35. ;cert_key =
  36. #################################### Database ####################################
  37. [database]
  38. # Either "mysql", "postgres" or "sqlite3", it's your choice
  39. ;type = sqlite3
  40. ;host = 127.0.0.1:3306
  41. ;name = grafana
  42. ;user = root
  43. ;password =
  44. # For "postgres" only, either "disable", "require" or "verify-full"
  45. ;ssl_mode = disable
  46. # For "sqlite3" only, path relative to data_path setting
  47. ;path = grafana.db
  48. #################################### Session ####################################
  49. [session]
  50. # Either "memory", "file", "redis", "mysql", default is "memory"
  51. ;provider = file
  52. # Provider config options
  53. # memory: not have any config yet
  54. # file: session dir path, is relative to grafana data_path
  55. # redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana`
  56. # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name`
  57. ;provider_config = sessions
  58. # Session cookie name
  59. ;cookie_name = grafana_sess
  60. # If you use session in https only, default is false
  61. ;cookie_secure = false
  62. # Session life time, default is 86400
  63. ;session_life_time = 86400
  64. #################################### Analytics ####################################
  65. [analytics]
  66. # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
  67. # No ip addresses are being tracked, only simple counters to track
  68. # running instances, dashboard and error counts. It is very helpful to us.
  69. # Change this option to false to disable reporting.
  70. ;reporting_enabled = true
  71. # Google Analytics universal tracking code, only enabled if you specify an id here
  72. ;google_analytics_ua_id =
  73. #################################### Security ####################################
  74. [security]
  75. # default admin user, created on startup
  76. ;admin_user = admin
  77. # default admin password, can be changed before first start of grafana, or in profile settings
  78. ;admin_password = admin
  79. # used for signing
  80. ;secret_key = SW2YcwTIb9zpOOhoPsMm
  81. # Auto-login remember days
  82. ;login_remember_days = 7
  83. ;cookie_username = grafana_user
  84. ;cookie_remember_name = grafana_remember
  85. #################################### Users ####################################
  86. [users]
  87. # disable user signup / registration
  88. ;allow_sign_up = true
  89. # Allow non admin users to create organizations
  90. ;allow_org_create = true
  91. # Set to true to automatically assign new users to the default organization (id 1)
  92. ;auto_assign_org = true
  93. # Default role new users will be automatically assigned (if disabled above is set to true)
  94. ;auto_assign_org_role = Viewer
  95. #################################### Anonymous Auth ##########################
  96. [auth.anonymous]
  97. # enable anonymous access
  98. ;enabled = false
  99. # specify organization name that should be used for unauthenticated users
  100. ;org_name = Main Org.
  101. # specify role for unauthenticated users
  102. ;org_role = Viewer
  103. #################################### Github Auth ##########################
  104. [auth.github]
  105. ;enabled = false
  106. ;client_id = some_id
  107. ;client_secret = some_secret
  108. ;scopes = user:email
  109. ;auth_url = https://github.com/login/oauth/authorize
  110. ;token_url = https://github.com/login/oauth/access_token
  111. ;api_url = https://api.github.com/user
  112. # Uncomment bellow to only allow specific email domains
  113. ; allowed_domains = mycompany.com othercompany.com
  114. #################################### Google Auth ##########################
  115. [auth.google]
  116. ;enabled = false
  117. ;client_id = some_client_id
  118. ;client_secret = some_client_secret
  119. ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  120. ;auth_url = https://accounts.google.com/o/oauth2/auth
  121. ;token_url = https://accounts.google.com/o/oauth2/token
  122. ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
  123. # Uncomment bellow to only allow specific email domains
  124. ; allowed_domains = mycompany.com othercompany.com
  125. #################################### Logging ##########################
  126. [log]
  127. # Either "console", "file", default is "console"
  128. # Use comma to separate multiple modes, e.g. "console, file"
  129. ;mode = console, file
  130. # Buffer length of channel, keep it as it is if you don't know what it is.
  131. ;buffer_len = 10000
  132. # Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  133. ;level = Info
  134. # For "console" mode only
  135. [log.console]
  136. ;level =
  137. # For "file" mode only
  138. [log.file]
  139. ;level =
  140. # This enables automated log rotate(switch of following options), default is true
  141. ;log_rotate = true
  142. # Max line number of single file, default is 1000000
  143. ;max_lines = 1000000
  144. # Max size shift of single file, default is 28 means 1 << 28, 256MB
  145. ;max_lines_shift = 28
  146. # Segment log daily, default is true
  147. ;daily_rotate = true
  148. # Expired days of log file(delete after max days), default is 7
  149. ;max_days = 7
  150. #################################### AMPQ Event Publisher ##########################
  151. [event_publisher]
  152. ;enabled = false
  153. ;rabbitmq_url = amqp://localhost/
  154. ;exchange = grafana_events