sample.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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 you use in browser, used for redirects and emails
  37. # If you use reverse proxy and sub path specify full url (with sub path)
  38. ;root_url = http://localhost:3000
  39. # Log web requests
  40. ;router_logging = false
  41. # the path relative working path
  42. ;static_root_path = public
  43. # enable gzip
  44. ;enable_gzip = false
  45. # https certs & key file
  46. ;cert_file =
  47. ;cert_key =
  48. #################################### Database ####################################
  49. [database]
  50. # You can configure the database connection by specifying type, host, name, user and password
  51. # as seperate properties or as on string using the url propertie.
  52. # Either "mysql", "postgres" or "sqlite3", it's your choice
  53. ;type = sqlite3
  54. ;host = 127.0.0.1:3306
  55. ;name = grafana
  56. ;user = root
  57. # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
  58. ;password =
  59. # Use either URL or the previous fields to configure the database
  60. # Example: mysql://user:secret@host:port/database
  61. ;url =
  62. # For "postgres" only, either "disable", "require" or "verify-full"
  63. ;ssl_mode = disable
  64. # For "sqlite3" only, path relative to data_path setting
  65. ;path = grafana.db
  66. #################################### Session ####################################
  67. [session]
  68. # Either "memory", "file", "redis", "mysql", "postgres", default is "file"
  69. ;provider = file
  70. # Provider config options
  71. # memory: not have any config yet
  72. # file: session dir path, is relative to grafana data_path
  73. # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
  74. # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
  75. # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
  76. ;provider_config = sessions
  77. # Session cookie name
  78. ;cookie_name = grafana_sess
  79. # If you use session in https only, default is false
  80. ;cookie_secure = false
  81. # Session life time, default is 86400
  82. ;session_life_time = 86400
  83. #################################### Data proxy ###########################
  84. [dataproxy]
  85. # This enables data proxy logging, default is false
  86. ;logging = false
  87. #################################### Analytics ####################################
  88. [analytics]
  89. # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
  90. # No ip addresses are being tracked, only simple counters to track
  91. # running instances, dashboard and error counts. It is very helpful to us.
  92. # Change this option to false to disable reporting.
  93. ;reporting_enabled = true
  94. # Set to false to disable all checks to https://grafana.net
  95. # for new vesions (grafana itself and plugins), check is used
  96. # in some UI views to notify that grafana or plugin update exists
  97. # This option does not cause any auto updates, nor send any information
  98. # only a GET request to http://grafana.net to get latest versions
  99. ;check_for_updates = true
  100. # Google Analytics universal tracking code, only enabled if you specify an id here
  101. ;google_analytics_ua_id =
  102. #################################### Security ####################################
  103. [security]
  104. # default admin user, created on startup
  105. ;admin_user = admin
  106. # default admin password, can be changed before first start of grafana, or in profile settings
  107. ;admin_password = admin
  108. # used for signing
  109. ;secret_key = SW2YcwTIb9zpOOhoPsMm
  110. # Auto-login remember days
  111. ;login_remember_days = 7
  112. ;cookie_username = grafana_user
  113. ;cookie_remember_name = grafana_remember
  114. # disable gravatar profile images
  115. ;disable_gravatar = false
  116. # data source proxy whitelist (ip_or_domain:port separated by spaces)
  117. ;data_source_proxy_whitelist =
  118. [snapshots]
  119. # snapshot sharing options
  120. ;external_enabled = true
  121. ;external_snapshot_url = https://snapshots-origin.raintank.io
  122. ;external_snapshot_name = Publish to snapshot.raintank.io
  123. # remove expired snapshot
  124. ;snapshot_remove_expired = true
  125. # remove snapshots after 90 days
  126. ;snapshot_TTL_days = 90
  127. #################################### Users ####################################
  128. [users]
  129. # disable user signup / registration
  130. ;allow_sign_up = true
  131. # Allow non admin users to create organizations
  132. ;allow_org_create = true
  133. # Set to true to automatically assign new users to the default organization (id 1)
  134. ;auto_assign_org = true
  135. # Default role new users will be automatically assigned (if disabled above is set to true)
  136. ;auto_assign_org_role = Viewer
  137. # Background text for the user field on the login page
  138. ;login_hint = email or username
  139. # Default UI theme ("dark" or "light")
  140. ;default_theme = dark
  141. [auth]
  142. # Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
  143. ;disable_login_form = false
  144. #################################### Anonymous Auth ##########################
  145. [auth.anonymous]
  146. # enable anonymous access
  147. ;enabled = false
  148. # specify organization name that should be used for unauthenticated users
  149. ;org_name = Main Org.
  150. # specify role for unauthenticated users
  151. ;org_role = Viewer
  152. #################################### Github Auth ##########################
  153. [auth.github]
  154. ;enabled = false
  155. ;allow_sign_up = true
  156. ;client_id = some_id
  157. ;client_secret = some_secret
  158. ;scopes = user:email,read:org
  159. ;auth_url = https://github.com/login/oauth/authorize
  160. ;token_url = https://github.com/login/oauth/access_token
  161. ;api_url = https://api.github.com/user
  162. ;team_ids =
  163. ;allowed_organizations =
  164. #################################### Google Auth ##########################
  165. [auth.google]
  166. ;enabled = false
  167. ;allow_sign_up = true
  168. ;client_id = some_client_id
  169. ;client_secret = some_client_secret
  170. ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  171. ;auth_url = https://accounts.google.com/o/oauth2/auth
  172. ;token_url = https://accounts.google.com/o/oauth2/token
  173. ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
  174. ;allowed_domains =
  175. #################################### Generic OAuth ##########################
  176. [auth.generic_oauth]
  177. ;enabled = false
  178. ;name = OAuth
  179. ;allow_sign_up = true
  180. ;client_id = some_id
  181. ;client_secret = some_secret
  182. ;scopes = user:email,read:org
  183. ;auth_url = https://foo.bar/login/oauth/authorize
  184. ;token_url = https://foo.bar/login/oauth/access_token
  185. ;api_url = https://foo.bar/user
  186. ;team_ids =
  187. ;allowed_organizations =
  188. #################################### Grafana.net Auth ####################
  189. [auth.grafananet]
  190. ;enabled = false
  191. ;allow_sign_up = true
  192. ;client_id = some_id
  193. ;client_secret = some_secret
  194. ;scopes = user:email
  195. ;allowed_organizations =
  196. #################################### Auth Proxy ##########################
  197. [auth.proxy]
  198. ;enabled = false
  199. ;header_name = X-WEBAUTH-USER
  200. ;header_property = username
  201. ;auto_sign_up = true
  202. ;ldap_sync_ttl = 60
  203. ;whitelist = 192.168.1.1, 192.168.2.1
  204. #################################### Basic Auth ##########################
  205. [auth.basic]
  206. ;enabled = true
  207. #################################### Auth LDAP ##########################
  208. [auth.ldap]
  209. ;enabled = false
  210. ;config_file = /etc/grafana/ldap.toml
  211. ;allow_sign_up = true
  212. #################################### SMTP / Emailing ##########################
  213. [smtp]
  214. ;enabled = false
  215. ;host = localhost:25
  216. ;user =
  217. # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
  218. ;password =
  219. ;cert_file =
  220. ;key_file =
  221. ;skip_verify = false
  222. ;from_address = admin@grafana.localhost
  223. [emails]
  224. ;welcome_email_on_sign_up = false
  225. #################################### Logging ##########################
  226. [log]
  227. # Either "console", "file", "syslog". Default is console and file
  228. # Use space to separate multiple modes, e.g. "console file"
  229. ;mode = console file
  230. # Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
  231. ;level = info
  232. # optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
  233. ;filters =
  234. # For "console" mode only
  235. [log.console]
  236. ;level =
  237. # log line format, valid options are text, console and json
  238. ;format = console
  239. # For "file" mode only
  240. [log.file]
  241. ;level =
  242. # log line format, valid options are text, console and json
  243. ;format = text
  244. # This enables automated log rotate(switch of following options), default is true
  245. ;log_rotate = true
  246. # Max line number of single file, default is 1000000
  247. ;max_lines = 1000000
  248. # Max size shift of single file, default is 28 means 1 << 28, 256MB
  249. ;max_size_shift = 28
  250. # Segment log daily, default is true
  251. ;daily_rotate = true
  252. # Expired days of log file(delete after max days), default is 7
  253. ;max_days = 7
  254. [log.syslog]
  255. ;level =
  256. # log line format, valid options are text, console and json
  257. ;format = text
  258. # Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
  259. ;network =
  260. ;address =
  261. # Syslog facility. user, daemon and local0 through local7 are valid.
  262. ;facility =
  263. # Syslog tag. By default, the process' argv[0] is used.
  264. ;tag =
  265. #################################### AMQP Event Publisher ##########################
  266. [event_publisher]
  267. ;enabled = false
  268. ;rabbitmq_url = amqp://localhost/
  269. ;exchange = grafana_events
  270. ;#################################### Dashboard JSON files ##########################
  271. [dashboards.json]
  272. ;enabled = false
  273. ;path = /var/lib/grafana/dashboards
  274. #################################### Alerting ############################
  275. [alerting]
  276. # Disable alerting engine & UI features
  277. ;enabled = true
  278. # Makes it possible to turn off alert rule execution but alerting UI is visible
  279. ;execute_alerts = true
  280. #################################### Internal Grafana Metrics ##########################
  281. # Metrics available at HTTP API Url /api/metrics
  282. [metrics]
  283. # Disable / Enable internal metrics
  284. ;enabled = true
  285. # Publish interval
  286. ;interval_seconds = 10
  287. # Send internal metrics to Graphite
  288. [metrics.graphite]
  289. # Enable by setting the address setting (ex localhost:2003)
  290. ;address =
  291. ;prefix = prod.grafana.%(instance_name)s.
  292. #################################### Internal Grafana Metrics ##########################
  293. # Url used to to import dashboards directly from Grafana.net
  294. [grafana_net]
  295. ;url = https://grafana.net
  296. #################################### External image storage ##########################
  297. [external_image_storage]
  298. # Used for uploading images to public servers so they can be included in slack/email messages.
  299. # you can choose between (s3, webdav)
  300. ;provider =
  301. [external_image_storage.s3]
  302. ;bucket_url =
  303. ;access_key =
  304. ;secret_key =
  305. [external_image_storage.webdav]
  306. ;url =
  307. ;username =
  308. ;password =