· 7 years ago · Oct 04, 2018, 07:56 AM
1##################### Grafana Configuration Defaults #####################
2#
3# Do not modify this file in grafana installs
4#
5
6# possible values : production, development
7app_mode = production
8
9# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
10instance_name = ${HOSTNAME}
11
12#################################### Paths ###############################
13[paths]
14# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
15data = data
16
17# Temporary files in `data` directory older than given duration will be removed
18temp_data_lifetime = 24h
19
20# Directory where grafana can store logs
21logs = data/log
22
23# Directory where grafana will automatically scan and look for plugins
24plugins = data/plugins
25
26# folder that contains provisioning config files that grafana will apply on startup and while running.
27provisioning = conf/provisioning
28
29#################################### Server ##############################
30[server]
31
32# Protocol (http, https, socket)
33protocol = http
34
35# The ip address to bind to, empty will bind to all interfaces
36http_addr =
37
38# The http port to use
39http_port = 3000
40
41# The public facing domain name used to access grafana from a browser
42domain = localhost
43
44# Redirect to correct domain if host header does not match domain
45# Prevents DNS rebinding attacks
46enforce_domain = false
47
48# The full public facing url
49root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
50# root_url = %(protocol)s://%(domain)s:%(http_port)s/
51
52# Log web requests
53router_logging = false
54
55# the path relative working path
56static_root_path = public
57
58# enable gzip
59enable_gzip = false
60
61# https certs & key file
62cert_file =
63cert_key =
64
65# Unix socket path
66socket = /tmp/grafana.sock
67
68#################################### Database ############################
69[database]
70# You can configure the database connection by specifying type, host, name, user and password
71# as separate properties or as on string using the url property.
72
73# Either "mysql", "postgres" or "sqlite3", it's your choice
74type = sqlite3
75host = 127.0.0.1:3306
76name = grafana
77user = root
78# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
79password =
80# Use either URL or the previous fields to configure the database
81# Example: mysql://user:secret@host:port/database
82url =
83
84# Max idle conn setting default is 2
85max_idle_conn = 2
86
87# Max conn setting default is 0 (mean not set)
88max_open_conn =
89
90# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
91conn_max_lifetime = 14400
92
93# Set to true to log the sql calls and execution times.
94log_queries =
95
96# For "postgres", use either "disable", "require" or "verify-full"
97# For "mysql", use either "true", "false", or "skip-verify".
98ssl_mode = disable
99
100ca_cert_path =
101client_key_path =
102client_cert_path =
103server_cert_name =
104
105# For "sqlite3" only, path relative to data_path setting
106path = grafana.db
107
108#################################### Session #############################
109[session]
110# Either "memory", "file", "redis", "mysql", "postgres", "memcache", default is "file"
111provider = file
112
113# Provider config options
114# memory: not have any config yet
115# file: session dir path, is relative to grafana data_path
116# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
117# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
118# mysql: go-sql-driver/mysql dsn config string, examples:
119# `user:password@tcp(127.0.0.1:3306)/database_name`
120# `user:password@unix(/var/run/mysqld/mysqld.sock)/database_name`
121# memcache: 127.0.0.1:11211
122
123
124provider_config = sessions
125
126# Session cookie name
127cookie_name = grafana_sess
128
129# If you use session in https only, default is false
130cookie_secure = false
131
132# Session life time, default is 86400
133session_life_time = 86400
134gc_interval_time = 86400
135
136# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
137conn_max_lifetime = 14400
138
139#################################### Data proxy ###########################
140[dataproxy]
141
142# This enables data proxy logging, default is false
143logging = false
144
145#################################### Analytics ###########################
146[analytics]
147# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
148# No ip addresses are being tracked, only simple counters to track
149# running instances, dashboard and error counts. It is very helpful to us.
150# Change this option to false to disable reporting.
151reporting_enabled = true
152
153# Set to false to disable all checks to https://grafana.com
154# for new versions (grafana itself and plugins), check is used
155# in some UI views to notify that grafana or plugin update exists
156# This option does not cause any auto updates, nor send any information
157# only a GET request to https://grafana.com to get latest versions
158check_for_updates = true
159
160# Google Analytics universal tracking code, only enabled if you specify an id here
161google_analytics_ua_id =
162
163# Google Tag Manager ID, only enabled if you specify an id here
164google_tag_manager_id =
165
166#################################### Security ############################
167[security]
168# default admin user, created on startup
169admin_user = admin
170
171# default admin password, can be changed before first start of grafana, or in profile settings
172admin_password = admin
173
174# used for signing
175secret_key = SW2YcwTIb9zpOOhoPsMm
176
177# Auto-login remember days
178login_remember_days = 7
179cookie_username = grafana_user
180cookie_remember_name = grafana_remember
181
182# disable gravatar profile images
183disable_gravatar = false
184
185# data source proxy whitelist (ip_or_domain:port separated by spaces)
186data_source_proxy_whitelist =
187
188# disable protection against brute force login attempts
189disable_brute_force_login_protection = false
190
191#################################### Snapshots ###########################
192[snapshots]
193# snapshot sharing options
194external_enabled = true
195external_snapshot_url = https://snapshots-origin.raintank.io
196external_snapshot_name = Publish to snapshot.raintank.io
197
198# remove expired snapshot
199snapshot_remove_expired = true
200
201#################################### Dashboards ##################
202
203[dashboards]
204# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
205versions_to_keep = 20
206
207#################################### Users ###############################
208[users]
209# disable user signup / registration
210allow_sign_up = false
211
212# Allow non admin users to create organizations
213allow_org_create = false
214
215# Set to true to automatically assign new users to the default organization (id 1)
216auto_assign_org = true
217
218# Set this value to automatically add new users to the provided organization (if auto_assign_org above is set to true)
219auto_assign_org_id = 1
220
221# Default role new users will be automatically assigned (if auto_assign_org above is set to true)
222auto_assign_org_role = Viewer
223
224# Require email validation before sign up completes
225verify_email_enabled = false
226
227# Background text for the user field on the login page
228login_hint = email or username
229
230# Default UI theme ("dark" or "light")
231default_theme = dark
232
233# External user management
234external_manage_link_url =
235external_manage_link_name =
236external_manage_info =
237
238# Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
239viewers_can_edit = false
240
241[auth]
242# Set to true to disable (hide) the login form, useful if you use OAuth
243disable_login_form = false
244
245# Set to true to disable the signout link in the side menu. useful if you use auth.proxy
246disable_signout_menu = false
247
248# URL to redirect the user to after sign out
249signout_redirect_url =
250
251#################################### Anonymous Auth ######################
252[auth.anonymous]
253# enable anonymous access
254enabled = false
255
256# specify organization name that should be used for unauthenticated users
257org_name = Main Org.
258
259# specify role for unauthenticated users
260org_role = Viewer
261
262#################################### Github Auth #########################
263[auth.github]
264enabled = false
265allow_sign_up = true
266client_id = some_id
267client_secret = some_secret
268scopes = user:email,read:org
269auth_url = https://github.com/login/oauth/authorize
270token_url = https://github.com/login/oauth/access_token
271api_url = https://api.github.com/user
272team_ids =
273allowed_organizations =
274
275#################################### GitLab Auth #########################
276[auth.gitlab]
277enabled = false
278allow_sign_up = true
279client_id = some_id
280client_secret = some_secret
281scopes = api
282auth_url = https://gitlab.com/oauth/authorize
283token_url = https://gitlab.com/oauth/token
284api_url = https://gitlab.com/api/v4
285allowed_groups =
286
287#################################### Google Auth #########################
288[auth.google]
289enabled = false
290allow_sign_up = true
291client_id = some_client_id
292client_secret = some_client_secret
293scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
294auth_url = https://accounts.google.com/o/oauth2/auth
295token_url = https://accounts.google.com/o/oauth2/token
296api_url = https://www.googleapis.com/oauth2/v1/userinfo
297allowed_domains =
298hosted_domain =
299
300#################################### Grafana.com Auth ####################
301# legacy key names (so they work in env variables)
302[auth.grafananet]
303enabled = false
304allow_sign_up = true
305client_id = some_id
306client_secret = some_secret
307scopes = user:email
308allowed_organizations =
309
310[auth.grafana_com]
311enabled = false
312allow_sign_up = true
313client_id = some_id
314client_secret = some_secret
315scopes = user:email
316allowed_organizations =
317
318#################################### Generic OAuth #######################
319[auth.generic_oauth]
320name = OAuth
321enabled = false
322allow_sign_up = true
323client_id = some_id
324client_secret = some_secret
325scopes = user:email
326email_attribute_name = email:primary
327auth_url =
328token_url =
329api_url =
330team_ids =
331allowed_organizations =
332tls_skip_verify_insecure = false
333tls_client_cert =
334tls_client_key =
335tls_client_ca =
336
337#################################### Basic Auth ##########################
338[auth.basic]
339enabled = true
340
341#################################### Auth Proxy ##########################
342[auth.proxy]
343enabled = false
344header_name = X-WEBAUTH-USER
345header_property = username
346auto_sign_up = true
347ldap_sync_ttl = 60
348whitelist =
349
350#################################### Auth LDAP ###########################
351[auth.ldap]
352enabled = false
353config_file = /etc/grafana/ldap.toml
354allow_sign_up = true
355
356#################################### SMTP / Emailing #####################
357[smtp]
358enabled = false
359host = localhost:25
360user =
361# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
362password =
363cert_file =
364key_file =
365skip_verify = false
366from_address = admin@grafana.localhost
367from_name = Grafana
368ehlo_identity =
369
370[emails]
371welcome_email_on_sign_up = false
372templates_pattern = emails/*.html
373
374#################################### Logging ##########################
375[log]
376# Either "console", "file", "syslog". Default is console and file
377# Use space to separate multiple modes, e.g. "console file"
378mode = console file
379
380# Either "debug", "info", "warn", "error", "critical", default is "info"
381level = info
382
383# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
384filters =
385
386# For "console" mode only
387[log.console]
388level =
389
390# log line format, valid options are text, console and json
391format = console
392
393# For "file" mode only
394[log.file]
395level =
396
397# log line format, valid options are text, console and json
398format = text
399
400# This enables automated log rotate(switch of following options), default is true
401log_rotate = true
402
403# Max line number of single file, default is 1000000
404max_lines = 1000000
405
406# Max size shift of single file, default is 28 means 1 << 28, 256MB
407max_size_shift = 28
408
409# Segment log daily, default is true
410daily_rotate = true
411
412# Expired days of log file(delete after max days), default is 7
413max_days = 7
414
415[log.syslog]
416level =
417
418# log line format, valid options are text, console and json
419format = text
420
421# Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
422network =
423address =
424
425# Syslog facility. user, daemon and local0 through local7 are valid.
426facility =
427
428# Syslog tag. By default, the process' argv[0] is used.
429tag =
430
431#################################### Usage Quotas ########################
432[quota]
433enabled = false
434
435#### set quotas to -1 to make unlimited. ####
436# limit number of users per Org.
437org_user = 10
438
439# limit number of dashboards per Org.
440org_dashboard = 100
441
442# limit number of data_sources per Org.
443org_data_source = 10
444
445# limit number of api_keys per Org.
446org_api_key = 10
447
448# limit number of orgs a user can create.
449user_org = 10
450
451# Global limit of users.
452global_user = -1
453
454# global limit of orgs.
455global_org = -1
456
457# global limit of dashboards
458global_dashboard = -1
459
460# global limit of api_keys
461global_api_key = -1
462
463# global limit on number of logged in users.
464global_session = -1
465
466#################################### Alerting ############################
467[alerting]
468# Disable alerting engine & UI features
469enabled = true
470# Makes it possible to turn off alert rule execution but alerting UI is visible
471execute_alerts = true
472
473# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
474error_or_timeout = alerting
475
476# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
477nodata_or_nullvalues = no_data
478
479# Alert notifications can include images, but rendering many images at the same time can overload the server
480# This limit will protect the server from render overloading and make sure notifications are sent out quickly
481concurrent_render_limit = 5
482
483#################################### Explore #############################
484[explore]
485# Enable the Explore section
486enabled = false
487
488#################################### Internal Grafana Metrics ############
489# Metrics available at HTTP API Url /metrics
490[metrics]
491enabled = true
492interval_seconds = 10
493
494# Send internal Grafana metrics to graphite
495[metrics.graphite]
496# Enable by setting the address setting (ex localhost:2003)
497address =
498prefix = prod.grafana.%(instance_name)s.
499
500[grafana_net]
501url = https://grafana.com
502
503[grafana_com]
504url = https://grafana.com
505
506#################################### Distributed tracing ############
507[tracing.jaeger]
508# jaeger destination (ex localhost:6831)
509address =
510# tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2)
511always_included_tag =
512# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
513sampler_type = const
514# jaeger samplerconfig param
515# for "const" sampler, 0 or 1 for always false/true respectively
516# for "probabilistic" sampler, a probability between 0 and 1
517# for "rateLimiting" sampler, the number of spans per second
518# for "remote" sampler, param is the same as for "probabilistic"
519# and indicates the initial sampling rate before the actual one
520# is received from the mothership
521sampler_param = 1
522
523#################################### External Image Storage ##############
524[external_image_storage]
525# You can choose between (s3, webdav, gcs, azure_blob, local)
526provider =
527
528[external_image_storage.s3]
529bucket_url =
530bucket =
531region =
532path =
533access_key =
534secret_key =
535
536[external_image_storage.webdav]
537url =
538username =
539password =
540public_url =
541
542[external_image_storage.gcs]
543key_file =
544bucket =
545path =
546
547[external_image_storage.azure_blob]
548account_name =
549account_key =
550container_name =
551
552[external_image_storage.local]
553# does not require any configuration
554
555[rendering]
556# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer
557server_url =
558callback_url =