· 9 years ago · Jun 28, 2016, 12:57 PM
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#################################### Paths ####################################
10[paths]
11# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
12#
13data = data
14#
15# Directory where grafana can store logs
16#
17logs = data/log
18#
19# Directory where grafana will automatically scan and look for plugins
20#
21plugins = data/plugins
22
23#################################### Server ####################################
24[server]
25# Protocol (http or https)
26protocol = http
27
28# The ip address to bind to, empty will bind to all interfaces
29http_addr =
30
31# The http port to use
32http_port = 3000
33
34# The public facing domain name used to access grafana from a browser
35domain = localhost
36
37# Redirect to correct domain if host header does not match domain
38# Prevents DNS rebinding attacks
39enforce_domain = false
40
41# The full public facing url
42root_url = %(protocol)s://%(domain)s:%(http_port)s/
43
44# Log web requests
45router_logging = false
46
47# the path relative working path
48static_root_path = public
49
50# enable gzip
51enable_gzip = false
52
53# https certs & key file
54cert_file =
55cert_key =
56
57#################################### Database ####################################
58[database]
59# Either "mysql", "postgres" or "sqlite3", it's your choice
60type = sqlite3
61host = 127.0.0.1:3306
62name = grafana
63user = root
64password =
65
66# For "postgres", use either "disable", "require" or "verify-full"
67# For "mysql", use either "true", "false", or "skip-verify".
68ssl_mode = disable
69
70ca_cert_path =
71client_key_path =
72client_cert_path =
73server_cert_name =
74
75# For "sqlite3" only, path relative to data_path setting
76path = grafana.db
77
78#################################### Session ####################################
79[session]
80# Either "memory", "file", "redis", "mysql", "postgres", "memcache", default is "file"
81provider = file
82
83# Provider config options
84# memory: not have any config yet
85# file: session dir path, is relative to grafana data_path
86# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
87# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
88# mysql: go-sql-driver/mysql dsn config string, examples:
89# `user:password@tcp(127.0.0.1:3306)/database_name`
90# `user:password@unix(/var/run/mysqld/mysqld.sock)/database_name`
91# memcache: 127.0.0.1:11211
92
93
94provider_config = sessions
95
96# Session cookie name
97cookie_name = grafana_sess
98
99# If you use session in https only, default is false
100cookie_secure = false
101
102# Session life time, default is 86400
103session_life_time = 86400
104gc_interval_time = 86400
105
106#################################### Analytics ####################################
107[analytics]
108# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
109# No ip addresses are being tracked, only simple counters to track
110# running instances, dashboard and error counts. It is very helpful to us.
111# Change this option to false to disable reporting.
112reporting_enabled = true
113
114# Set to false to disable all checks to https://grafana.net
115# for new vesions (grafana itself and plugins), check is used
116# in some UI views to notify that grafana or plugin update exists
117# This option does not cause any auto updates, nor send any information
118# only a GET request to http://grafana.net to get latest versions
119check_for_updates = true
120
121# Google Analytics universal tracking code, only enabled if you specify an id here
122google_analytics_ua_id =
123
124# Google Tag Manager ID, only enabled if you specify an id here
125google_tag_manager_id =
126
127#################################### Security ####################################
128[security]
129# default admin user, created on startup
130admin_user = admin
131
132# default admin password, can be changed before first start of grafana, or in profile settings
133admin_password = admin
134
135# used for signing
136secret_key = SW2YcwTIb9zpOOhoPsMm
137
138# Auto-login remember days
139login_remember_days = 7
140cookie_username = grafana_user
141cookie_remember_name = grafana_remember
142
143# disable gravatar profile images
144disable_gravatar = false
145
146# data source proxy whitelist (ip_or_domain:port seperated by spaces)
147data_source_proxy_whitelist =
148
149[snapshots]
150# snapshot sharing options
151external_enabled = true
152external_snapshot_url = https://snapshots-origin.raintank.io
153external_snapshot_name = Publish to snapshot.raintank.io
154
155#################################### Users ####################################
156[users]
157# disable user signup / registration
158allow_sign_up = true
159
160# Allow non admin users to create organizations
161allow_org_create = true
162
163# Set to true to automatically assign new users to the default organization (id 1)
164auto_assign_org = true
165
166# Default role new users will be automatically assigned (if auto_assign_org above is set to true)
167auto_assign_org_role = Viewer
168
169# Require email validation before sign up completes
170verify_email_enabled = false
171
172# Background text for the user field on the login page
173login_hint = email or username
174
175#################################### Anonymous Auth ##########################
176[auth.anonymous]
177# enable anonymous access
178enabled = false
179
180# specify organization name that should be used for unauthenticated users
181org_name = Main Org.
182
183# specify role for unauthenticated users
184org_role = Viewer
185
186#################################### Github Auth ##########################
187[auth.github]
188enabled = false
189allow_sign_up = false
190client_id = some_id
191client_secret = some_secret
192scopes = user:email
193auth_url = https://github.com/login/oauth/authorize
194token_url = https://github.com/login/oauth/access_token
195api_url = https://api.github.com/user
196team_ids =
197allowed_organizations =
198
199#################################### Google Auth ##########################
200[auth.google]
201enabled = false
202allow_sign_up = false
203client_id = some_client_id
204client_secret = some_client_secret
205scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
206auth_url = https://accounts.google.com/o/oauth2/auth
207token_url = https://accounts.google.com/o/oauth2/token
208api_url = https://www.googleapis.com/oauth2/v1/userinfo
209allowed_domains =
210
211#################################### Basic Auth ##########################
212[auth.basic]
213enabled = true
214
215#################################### Auth Proxy ##########################
216[auth.proxy]
217enabled = false
218header_name = X-WEBAUTH-USER
219header_property = username
220auto_sign_up = true
221
222#################################### Auth LDAP ##########################
223[auth.ldap]
224enabled = false
225config_file = /etc/grafana/ldap.toml
226
227#################################### SMTP / Emailing ##########################
228[smtp]
229enabled = false
230host = localhost:25
231user =
232password =
233cert_file =
234key_file =
235skip_verify = false
236from_address = admin@grafana.localhost
237
238[emails]
239welcome_email_on_sign_up = false
240templates_pattern = emails/*.html
241
242#################################### Logging ##########################
243[log]
244# Either "console", "file", "syslog". Default is console and file
245# Use comma to separate multiple modes, e.g. "console, file"
246mode = console, file
247
248# Buffer length of channel, keep it as it is if you don't know what it is.
249buffer_len = 10000
250
251# Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
252level = Info
253
254# For "console" mode only
255[log.console]
256level =
257# Set formatting to "false" to disable color formatting of console logs
258formatting = false
259
260# For "file" mode only
261[log.file]
262level =
263# This enables automated log rotate(switch of following options), default is true
264log_rotate = true
265
266# Max line number of single file, default is 1000000
267max_lines = 1000000
268
269# Max size shift of single file, default is 28 means 1 << 28, 256MB
270max_lines_shift = 28
271
272# Segment log daily, default is true
273daily_rotate = true
274
275# Expired days of log file(delete after max days), default is 7
276max_days = 7
277
278[log.syslog]
279level =
280# Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
281network =
282address =
283
284# Syslog facility. user, daemon and local0 through local7 are valid.
285facility =
286
287# Syslog tag. By default, the process' argv[0] is used.
288tag =
289
290#################################### AMPQ Event Publisher ##########################
291[event_publisher]
292enabled = false
293rabbitmq_url = amqp://localhost/
294exchange = grafana_events
295
296#################################### Dashboard JSON files ##########################
297[dashboards.json]
298enabled = false
299path = /var/lib/grafana/dashboards
300
301#################################### Usage Quotas ##########################
302[quota]
303enabled = false
304
305#### set quotas to -1 to make unlimited. ####
306# limit number of users per Org.
307org_user = 10
308
309# limit number of dashboards per Org.
310org_dashboard = 100
311
312# limit number of data_sources per Org.
313org_data_source = 10
314
315# limit number of api_keys per Org.
316org_api_key = 10
317
318# limit number of orgs a user can create.
319user_org = 10
320
321# Global limit of users.
322global_user = -1
323
324# global limit of orgs.
325global_org = -1
326
327# global limit of dashboards
328global_dashboard = -1
329
330# global limit of api_keys
331global_api_key = -1
332
333# global limit on number of logged in users.
334global_session = -1