sample.ini 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. # Redirect to correct domain if host header does not match domain
  26. # Prevents DNS rebinding attacks
  27. ;enforce_domain = false
  28. # The full public facing url
  29. ;root_url = %(protocol)s://%(domain)s:%(http_port)s/
  30. # Log web requests
  31. ;router_logging = false
  32. # the path relative working path
  33. ;static_root_path = public
  34. # enable gzip
  35. ;enable_gzip = false
  36. # https certs & key file
  37. ;cert_file =
  38. ;cert_key =
  39. #################################### Database ####################################
  40. [database]
  41. # Either "mysql", "postgres" or "sqlite3", it's your choice
  42. ;type = sqlite3
  43. ;host = 127.0.0.1:3306
  44. ;name = grafana
  45. ;user = root
  46. ;password =
  47. # For "postgres" only, either "disable", "require" or "verify-full"
  48. ;ssl_mode = disable
  49. # For "sqlite3" only, path relative to data_path setting
  50. ;path = grafana.db
  51. #################################### Session ####################################
  52. [session]
  53. # Either "memory", "file", "redis", "mysql", "postgresql", default is "file"
  54. ;provider = file
  55. # Provider config options
  56. # memory: not have any config yet
  57. # file: session dir path, is relative to grafana data_path
  58. # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
  59. # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
  60. # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
  61. ;provider_config = sessions
  62. # Session cookie name
  63. ;cookie_name = grafana_sess
  64. # If you use session in https only, default is false
  65. ;cookie_secure = false
  66. # Session life time, default is 86400
  67. ;session_life_time = 86400
  68. #################################### Analytics ####################################
  69. [analytics]
  70. # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
  71. # No ip addresses are being tracked, only simple counters to track
  72. # running instances, dashboard and error counts. It is very helpful to us.
  73. # Change this option to false to disable reporting.
  74. ;reporting_enabled = true
  75. # Google Analytics universal tracking code, only enabled if you specify an id here
  76. ;google_analytics_ua_id =
  77. #################################### Security ####################################
  78. [security]
  79. # default admin user, created on startup
  80. ;admin_user = admin
  81. # default admin password, can be changed before first start of grafana, or in profile settings
  82. ;admin_password = admin
  83. # used for signing
  84. ;secret_key = SW2YcwTIb9zpOOhoPsMm
  85. # Auto-login remember days
  86. ;login_remember_days = 7
  87. ;cookie_username = grafana_user
  88. ;cookie_remember_name = grafana_remember
  89. # disable gravatar profile images
  90. ;disable_gravatar = false
  91. #################################### Users ####################################
  92. [users]
  93. # disable user signup / registration
  94. ;allow_sign_up = true
  95. # Allow non admin users to create organizations
  96. ;allow_org_create = true
  97. # Set to true to automatically assign new users to the default organization (id 1)
  98. ;auto_assign_org = true
  99. # Default role new users will be automatically assigned (if disabled above is set to true)
  100. ;auto_assign_org_role = Viewer
  101. #################################### Anonymous Auth ##########################
  102. [auth.anonymous]
  103. # enable anonymous access
  104. ;enabled = false
  105. # specify organization name that should be used for unauthenticated users
  106. ;org_name = Main Org.
  107. # specify role for unauthenticated users
  108. ;org_role = Viewer
  109. #################################### Github Auth ##########################
  110. [auth.github]
  111. ;enabled = false
  112. ;allow_sign_up = false
  113. ;client_id = some_id
  114. ;client_secret = some_secret
  115. ;scopes = user:email,read:org
  116. ;auth_url = https://github.com/login/oauth/authorize
  117. ;token_url = https://github.com/login/oauth/access_token
  118. ;api_url = https://api.github.com/user
  119. ;team_ids =
  120. ;allowed_domains =
  121. ;allowed_organizations =
  122. #################################### Google Auth ##########################
  123. [auth.google]
  124. ;enabled = false
  125. ;allow_sign_up = false
  126. ;client_id = some_client_id
  127. ;client_secret = some_client_secret
  128. ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  129. ;auth_url = https://accounts.google.com/o/oauth2/auth
  130. ;token_url = https://accounts.google.com/o/oauth2/token
  131. ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
  132. ;allowed_domains =
  133. #################################### Auth Proxy ##########################
  134. [auth.proxy]
  135. ;enabled = false
  136. ;header_name = X-WEBAUTH-USER
  137. ;header_property = username
  138. ;auto_sign_up = true
  139. #################################### Basic Auth ##########################
  140. [auth.basic]
  141. ;enabled = true
  142. #################################### Auth LDAP ##########################
  143. [auth.ldap]
  144. ;enabled = false
  145. ;config_file = /etc/grafana/ldap.toml
  146. #################################### SMTP / Emailing ##########################
  147. [smtp]
  148. ;enabled = false
  149. ;host = localhost:25
  150. ;user =
  151. ;password =
  152. ;cert_file =
  153. ;key_file =
  154. ;skip_verify = false
  155. ;from_address = admin@grafana.localhost
  156. [emails]
  157. ;welcome_email_on_sign_up = false
  158. #################################### Logging ##########################
  159. [log]
  160. # Either "console", "file", default is "console"
  161. # Use comma to separate multiple modes, e.g. "console, file"
  162. ;mode = console, file
  163. # Buffer length of channel, keep it as it is if you don't know what it is.
  164. ;buffer_len = 10000
  165. # Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  166. ;level = Info
  167. # For "console" mode only
  168. [log.console]
  169. ;level =
  170. # For "file" mode only
  171. [log.file]
  172. ;level =
  173. # This enables automated log rotate(switch of following options), default is true
  174. ;log_rotate = true
  175. # Max line number of single file, default is 1000000
  176. ;max_lines = 1000000
  177. # Max size shift of single file, default is 28 means 1 << 28, 256MB
  178. ;max_lines_shift = 28
  179. # Segment log daily, default is true
  180. ;daily_rotate = true
  181. # Expired days of log file(delete after max days), default is 7
  182. ;max_days = 7
  183. #################################### AMPQ Event Publisher ##########################
  184. [event_publisher]
  185. ;enabled = false
  186. ;rabbitmq_url = amqp://localhost/
  187. ;exchange = grafana_events
  188. ;#################################### Dashboard JSON files ##########################
  189. [dashboards.json]
  190. ;enabled = false
  191. ;path = /var/lib/grafana/dashboards