grafana.ini.j2 7.2 KB

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