sample.ini 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. ##################### Grafana Configuration Example #####################
  2. #
  3. # Everything has defaults so you only need to uncomment things you want to
  4. # change
  5. # possible values : production, development
  6. ; app_mode = production
  7. # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
  8. ; instance_name = ${HOSTNAME}
  9. #################################### Paths ####################################
  10. [paths]
  11. # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
  12. #
  13. ;data = /var/lib/grafana
  14. #
  15. # Directory where grafana can store logs
  16. #
  17. ;logs = /var/log/grafana
  18. #
  19. # Directory where grafana will automatically scan and look for plugins
  20. #
  21. ;plugins = /var/lib/grafana/plugins
  22. #
  23. #################################### Server ####################################
  24. [server]
  25. # Protocol (http or https)
  26. ;protocol = http
  27. # The ip address to bind to, empty will bind to all interfaces
  28. ;http_addr =
  29. # The http port to use
  30. ;http_port = 3000
  31. # The public facing domain name used to access grafana from a browser
  32. ;domain = localhost
  33. # Redirect to correct domain if host header does not match domain
  34. # Prevents DNS rebinding attacks
  35. ;enforce_domain = false
  36. # The full public facing url
  37. ;root_url = %(protocol)s://%(domain)s:%(http_port)s/
  38. # Log web requests
  39. ;router_logging = false
  40. # the path relative working path
  41. ;static_root_path = public
  42. # enable gzip
  43. ;enable_gzip = false
  44. # https certs & key file
  45. ;cert_file =
  46. ;cert_key =
  47. #################################### Database ####################################
  48. [database]
  49. # Either "mysql", "postgres" or "sqlite3", it's your choice
  50. ;type = sqlite3
  51. ;host = 127.0.0.1:3306
  52. ;name = grafana
  53. ;user = root
  54. ;password =
  55. # For "postgres" only, either "disable", "require" or "verify-full"
  56. ;ssl_mode = disable
  57. # For "sqlite3" only, path relative to data_path setting
  58. ;path = grafana.db
  59. #################################### Session ####################################
  60. [session]
  61. # Either "memory", "file", "redis", "mysql", "postgres", default is "file"
  62. ;provider = file
  63. # Provider config options
  64. # memory: not have any config yet
  65. # file: session dir path, is relative to grafana data_path
  66. # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
  67. # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
  68. # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
  69. ;provider_config = sessions
  70. # Session cookie name
  71. ;cookie_name = grafana_sess
  72. # If you use session in https only, default is false
  73. ;cookie_secure = false
  74. # Session life time, default is 86400
  75. ;session_life_time = 86400
  76. #################################### Analytics ####################################
  77. [analytics]
  78. # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
  79. # No ip addresses are being tracked, only simple counters to track
  80. # running instances, dashboard and error counts. It is very helpful to us.
  81. # Change this option to false to disable reporting.
  82. ;reporting_enabled = true
  83. # Set to false to disable all checks to https://grafana.net
  84. # for new vesions (grafana itself and plugins), check is used
  85. # in some UI views to notify that grafana or plugin update exists
  86. # This option does not cause any auto updates, nor send any information
  87. # only a GET request to http://grafana.net to get latest versions
  88. check_for_updates = true
  89. # Google Analytics universal tracking code, only enabled if you specify an id here
  90. ;google_analytics_ua_id =
  91. #################################### Security ####################################
  92. [security]
  93. # default admin user, created on startup
  94. ;admin_user = admin
  95. # default admin password, can be changed before first start of grafana, or in profile settings
  96. ;admin_password = admin
  97. # used for signing
  98. ;secret_key = SW2YcwTIb9zpOOhoPsMm
  99. # Auto-login remember days
  100. ;login_remember_days = 7
  101. ;cookie_username = grafana_user
  102. ;cookie_remember_name = grafana_remember
  103. # disable gravatar profile images
  104. ;disable_gravatar = false
  105. # data source proxy whitelist (ip_or_domain:port separated by spaces)
  106. ;data_source_proxy_whitelist =
  107. [snapshots]
  108. # snapshot sharing options
  109. ;external_enabled = true
  110. ;external_snapshot_url = https://snapshots-origin.raintank.io
  111. ;external_snapshot_name = Publish to snapshot.raintank.io
  112. #################################### Users ####################################
  113. [users]
  114. # disable user signup / registration
  115. ;allow_sign_up = true
  116. # Allow non admin users to create organizations
  117. ;allow_org_create = true
  118. # Set to true to automatically assign new users to the default organization (id 1)
  119. ;auto_assign_org = true
  120. # Default role new users will be automatically assigned (if disabled above is set to true)
  121. ;auto_assign_org_role = Viewer
  122. # Background text for the user field on the login page
  123. ;login_hint = email or username
  124. # Default UI theme ("dark" or "light")
  125. ;default_theme = dark
  126. #################################### Anonymous Auth ##########################
  127. [auth.anonymous]
  128. # enable anonymous access
  129. ;enabled = false
  130. # specify organization name that should be used for unauthenticated users
  131. ;org_name = Main Org.
  132. # specify role for unauthenticated users
  133. ;org_role = Viewer
  134. #################################### Github Auth ##########################
  135. [auth.github]
  136. ;enabled = false
  137. ;allow_sign_up = false
  138. ;client_id = some_id
  139. ;client_secret = some_secret
  140. ;scopes = user:email,read:org
  141. ;auth_url = https://github.com/login/oauth/authorize
  142. ;token_url = https://github.com/login/oauth/access_token
  143. ;api_url = https://api.github.com/user
  144. ;team_ids =
  145. ;allowed_organizations =
  146. #################################### Google Auth ##########################
  147. [auth.google]
  148. ;enabled = false
  149. ;allow_sign_up = false
  150. ;client_id = some_client_id
  151. ;client_secret = some_client_secret
  152. ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  153. ;auth_url = https://accounts.google.com/o/oauth2/auth
  154. ;token_url = https://accounts.google.com/o/oauth2/token
  155. ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
  156. ;allowed_domains =
  157. #################################### Auth Proxy ##########################
  158. [auth.proxy]
  159. ;enabled = false
  160. ;header_name = X-WEBAUTH-USER
  161. ;header_property = username
  162. ;auto_sign_up = true
  163. #################################### Basic Auth ##########################
  164. [auth.basic]
  165. ;enabled = true
  166. #################################### Auth LDAP ##########################
  167. [auth.ldap]
  168. ;enabled = false
  169. ;config_file = /etc/grafana/ldap.toml
  170. #################################### SMTP / Emailing ##########################
  171. [smtp]
  172. ;enabled = false
  173. ;host = localhost:25
  174. ;user =
  175. ;password =
  176. ;cert_file =
  177. ;key_file =
  178. ;skip_verify = false
  179. ;from_address = admin@grafana.localhost
  180. [emails]
  181. ;welcome_email_on_sign_up = false
  182. #################################### Logging ##########################
  183. [log]
  184. # Either "console", "file", "syslog". Default is console and file
  185. # Use space to separate multiple modes, e.g. "console file"
  186. ;mode = console, file
  187. # Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
  188. ;level = info
  189. # For "console" mode only
  190. [log.console]
  191. ;level =
  192. # log line format, valid options are text, console and json
  193. ;format = console
  194. # For "file" mode only
  195. [log.file]
  196. ;level =
  197. # log line format, valid options are text, console and json
  198. ;format = text
  199. # This enables automated log rotate(switch of following options), default is true
  200. ;log_rotate = true
  201. # Max line number of single file, default is 1000000
  202. ;max_lines = 1000000
  203. # Max size shift of single file, default is 28 means 1 << 28, 256MB
  204. ;max_size_shift = 28
  205. # Segment log daily, default is true
  206. ;daily_rotate = true
  207. # Expired days of log file(delete after max days), default is 7
  208. ;max_days = 7
  209. [log.syslog]
  210. ;level =
  211. # log line format, valid options are text, console and json
  212. ;format = text
  213. # Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
  214. ;network =
  215. ;address =
  216. # Syslog facility. user, daemon and local0 through local7 are valid.
  217. ;facility =
  218. # Syslog tag. By default, the process' argv[0] is used.
  219. ;tag =
  220. #################################### AMQP Event Publisher ##########################
  221. [event_publisher]
  222. ;enabled = false
  223. ;rabbitmq_url = amqp://localhost/
  224. ;exchange = grafana_events
  225. ;#################################### Dashboard JSON files ##########################
  226. [dashboards.json]
  227. ;enabled = false
  228. ;path = /var/lib/grafana/dashboards
  229. #################################### Internal Grafana Metrics ##########################
  230. [metrics]
  231. # Disable / Enable internal metrics
  232. ;enabled = true
  233. # Publish interval
  234. ;interval_seconds = 10
  235. # Send internal metrics to Graphite
  236. ; [metrics.graphite]
  237. ; address = localhost:2003
  238. ; prefix = prod.grafana.%(instance_name)s.