1 ##################### Grafana Configuration Example #####################
3 # Everything has defaults so you only need to uncomment things you want to
6 # possible values : production, development
7 ; app_mode = production
9 # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
10 ; instance_name = ${HOSTNAME}
12 #################################### Paths ####################################
14 # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
16 ;data = /var/lib/grafana
18 # Directory where grafana can store logs
20 ;logs = /var/log/grafana
22 # Directory where grafana will automatically scan and look for plugins
24 ;plugins = /var/lib/grafana/plugins
27 #################################### Server ####################################
29 # Protocol (http, https, socket)
32 # The ip address to bind to, empty will bind to all interfaces
35 # The http port to use
38 # The public facing domain name used to access grafana from a browser
41 # Redirect to correct domain if host header does not match domain
42 # Prevents DNS rebinding attacks
43 ;enforce_domain = false
45 # The full public facing url you use in browser, used for redirects and emails
46 # If you use reverse proxy and sub path specify full url (with sub path)
47 ;root_url = http://localhost:3000
50 ;router_logging = false
52 # the path relative working path
53 ;static_root_path = public
58 # https certs & key file
65 #################################### Database ####################################
67 # You can configure the database connection by specifying type, host, name, user and password
68 # as seperate properties or as on string using the url propertie.
70 # Either "mysql", "postgres" or "sqlite3", it's your choice
72 ;host = 127.0.0.1:3306
75 # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
78 # Use either URL or the previous fields to configure the database
79 # Example: mysql://user:secret@host:port/database
82 # For "postgres" only, either "disable", "require" or "verify-full"
85 # For "sqlite3" only, path relative to data_path setting
88 # Max conn setting default is 0 (mean not set)
93 #################################### Session ####################################
95 # Either "memory", "file", "redis", "mysql", "postgres", default is "file"
98 # Provider config options
99 # memory: not have any config yet
100 # file: session dir path, is relative to grafana data_path
101 # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
102 # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
103 # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
104 ;provider_config = sessions
106 # Session cookie name
107 ;cookie_name = grafana_sess
109 # If you use session in https only, default is false
110 ;cookie_secure = false
112 # Session life time, default is 86400
113 ;session_life_time = 86400
115 #################################### Data proxy ###########################
118 # This enables data proxy logging, default is false
122 #################################### Analytics ####################################
124 # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
125 # No ip addresses are being tracked, only simple counters to track
126 # running instances, dashboard and error counts. It is very helpful to us.
127 # Change this option to false to disable reporting.
128 ;reporting_enabled = true
130 # Set to false to disable all checks to https://grafana.net
131 # for new vesions (grafana itself and plugins), check is used
132 # in some UI views to notify that grafana or plugin update exists
133 # This option does not cause any auto updates, nor send any information
134 # only a GET request to http://grafana.com to get latest versions
135 ;check_for_updates = true
137 # Google Analytics universal tracking code, only enabled if you specify an id here
138 ;google_analytics_ua_id =
140 #################################### Security ####################################
142 # default admin user, created on startup
145 # default admin password, can be changed before first start of grafana, or in profile settings
146 ;admin_password = admin
149 ;secret_key = SW2YcwTIb9zpOOhoPsMm
151 # Auto-login remember days
152 ;login_remember_days = 7
153 ;cookie_username = grafana_user
154 ;cookie_remember_name = grafana_remember
156 # disable gravatar profile images
157 ;disable_gravatar = false
159 # data source proxy whitelist (ip_or_domain:port separated by spaces)
160 ;data_source_proxy_whitelist =
163 # snapshot sharing options
164 ;external_enabled = true
165 ;external_snapshot_url = https://snapshots-origin.raintank.io
166 ;external_snapshot_name = Publish to snapshot.raintank.io
168 # remove expired snapshot
169 ;snapshot_remove_expired = true
171 # remove snapshots after 90 days
172 ;snapshot_TTL_days = 90
174 #################################### Users ####################################
176 # disable user signup / registration
177 ;allow_sign_up = true
179 # Allow non admin users to create organizations
180 ;allow_org_create = true
182 # Set to true to automatically assign new users to the default organization (id 1)
183 ;auto_assign_org = true
185 # Default role new users will be automatically assigned (if disabled above is set to true)
186 ;auto_assign_org_role = Viewer
188 # Background text for the user field on the login page
189 ;login_hint = email or username
191 # Default UI theme ("dark" or "light")
192 ;default_theme = dark
195 # Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
196 ;disable_login_form = false
198 # Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false
199 ;disable_signout_menu = false
201 #################################### Anonymous Auth ##########################
203 # enable anonymous access
206 # specify organization name that should be used for unauthenticated users
207 ;org_name = Main Org.
209 # specify role for unauthenticated users
212 #################################### Github Auth ##########################
215 ;allow_sign_up = true
217 ;client_secret = some_secret
218 ;scopes = user:email,read:org
219 ;auth_url = https://github.com/login/oauth/authorize
220 ;token_url = https://github.com/login/oauth/access_token
221 ;api_url = https://api.github.com/user
223 ;allowed_organizations =
225 #################################### Google Auth ##########################
228 ;allow_sign_up = true
229 ;client_id = some_client_id
230 ;client_secret = some_client_secret
231 ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
232 ;auth_url = https://accounts.google.com/o/oauth2/auth
233 ;token_url = https://accounts.google.com/o/oauth2/token
234 ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
237 #################################### Generic OAuth ##########################
241 ;allow_sign_up = true
243 ;client_secret = some_secret
244 ;scopes = user:email,read:org
245 ;auth_url = https://foo.bar/login/oauth/authorize
246 ;token_url = https://foo.bar/login/oauth/access_token
247 ;api_url = https://foo.bar/user
249 ;allowed_organizations =
251 #################################### Grafana.com Auth ####################
254 ;allow_sign_up = true
256 ;client_secret = some_secret
258 ;allowed_organizations =
260 #################################### Auth Proxy ##########################
263 ;header_name = X-WEBAUTH-USER
264 ;header_property = username
267 ;whitelist = 192.168.1.1, 192.168.2.1
269 #################################### Basic Auth ##########################
273 #################################### Auth LDAP ##########################
276 ;config_file = /etc/grafana/ldap.toml
277 ;allow_sign_up = true
279 #################################### SMTP / Emailing ##########################
284 # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
289 ;from_address = admin@grafana.localhost
293 ;welcome_email_on_sign_up = false
295 #################################### Logging ##########################
297 # Either "console", "file", "syslog". Default is console and file
298 # Use space to separate multiple modes, e.g. "console file"
301 # Either "debug", "info", "warn", "error", "critical", default is "info"
304 # optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
308 # For "console" mode only
312 # log line format, valid options are text, console and json
315 # For "file" mode only
319 # log line format, valid options are text, console and json
322 # This enables automated log rotate(switch of following options), default is true
325 # Max line number of single file, default is 1000000
328 # Max size shift of single file, default is 28 means 1 << 28, 256MB
331 # Segment log daily, default is true
334 # Expired days of log file(delete after max days), default is 7
340 # log line format, valid options are text, console and json
343 # Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
347 # Syslog facility. user, daemon and local0 through local7 are valid.
350 # Syslog tag. By default, the process' argv[0] is used.
354 #################################### AMQP Event Publisher ##########################
357 ;rabbitmq_url = amqp://localhost/
358 ;exchange = grafana_events
360 #################################### Dashboard JSON files ##########################
363 path = /var/lib/grafana/dashboards
365 #################################### Alerting ############################
367 # Disable alerting engine & UI features
369 # Makes it possible to turn off alert rule execution but alerting UI is visible
370 ;execute_alerts = true
372 #################################### Internal Grafana Metrics ##########################
373 # Metrics available at HTTP API Url /api/metrics
375 # Disable / Enable internal metrics
379 ;interval_seconds = 10
381 # Send internal metrics to Graphite
383 # Enable by setting the address setting (ex localhost:2003)
385 ;prefix = prod.grafana.%(instance_name)s.
387 #################################### Grafana.com integration ##########################
388 # Url used to to import dashboards directly from Grafana.com
390 ;url = https://grafana.com
392 #################################### External image storage ##########################
393 [external_image_storage]
394 # Used for uploading images to public servers so they can be included in slack/email messages.
395 # you can choose between (s3, webdav)
398 [external_image_storage.s3]
403 [external_image_storage.webdav]