2016-10-21 04:01:34 -05:00
+++
title = "Configuration"
description = "Configuration Docs"
keywords = ["grafana", "configuration", "documentation"]
type = "docs"
[menu.docs]
name = "Configuration"
identifier = "config"
parent = "admin"
weight = 1
+++
2015-03-11 09:13:52 -05:00
# Configuration
2015-05-10 15:52:40 -05:00
The Grafana back-end has a number of configuration options that can be
specified in a `.ini` configuration file or specified using environment variables.
2015-03-11 09:13:52 -05:00
2017-08-21 14:28:05 -05:00
## Comments In .ini Files
Semicolons (the `;` char) are the standard way to comment out lines in a `.ini` file.
A common problem is forgetting to uncomment a line in the `custom.ini` (or `grafana.ini` ) file which causes the configuration option to be ignored.
2015-03-11 09:13:52 -05:00
## Config file locations
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
2015-05-10 15:52:40 -05:00
- The custom configuration file path can be overridden using the `--config` parameter
2015-03-11 09:13:52 -05:00
2015-05-10 15:52:40 -05:00
> **Note.** If you have installed Grafana using the `deb` or `rpm`
> packages, then your configuration file is located at
> `/etc/grafana/grafana.ini`. This path is specified in the Grafana
2015-08-11 13:58:30 -05:00
> init.d script using `--config` file parameter.
2015-03-11 09:13:52 -05:00
2015-05-10 15:52:40 -05:00
## Using environment variables
2015-03-11 13:32:06 -05:00
2015-05-10 15:52:40 -05:00
All options in the configuration file (listed below) can be overridden
using environment variables using the syntax:
2015-03-11 13:32:06 -05:00
2017-10-05 12:01:03 -05:00
```bash
GF_< SectionName > _< KeyName >
```
2015-03-11 13:32:06 -05:00
2015-05-10 15:52:40 -05:00
Where the section name is the text within the brackets. Everything
2015-06-17 22:57:23 -05:00
should be upper case, `.` should be replaced by `_` . For example, given these configuration settings:
2015-03-11 13:32:06 -05:00
2017-10-05 12:01:03 -05:00
```bash
# default section
instance_name = ${HOSTNAME}
2016-10-07 01:48:57 -05:00
2017-10-05 12:01:03 -05:00
[security]
admin_user = admin
2015-07-08 03:52:50 -05:00
2017-10-05 12:01:03 -05:00
[auth.google]
client_secret = 0ldS3cretKey
```
2015-03-11 13:32:06 -05:00
2015-08-11 13:58:30 -05:00
Then you can override them using:
2015-03-11 13:32:06 -05:00
2017-10-05 12:01:03 -05:00
```bash
export GF_DEFAULT_INSTANCE_NAME=my-instance
export GF_SECURITY_ADMIN_USER=true
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
```
2015-03-11 13:32:06 -05:00
2015-08-11 13:58:30 -05:00
< hr / >
2015-05-10 15:52:40 -05:00
2016-06-03 11:38:19 -05:00
## instance_name
2017-02-07 03:21:46 -06:00
2016-06-03 11:38:19 -05:00
Set the name of the grafana-server instance. Used in logging and internal metrics and in
2016-07-08 00:12:26 -05:00
clustering info. Defaults to: `${HOSTNAME}` , which will be replaced with
2016-06-03 11:38:19 -05:00
environment variable `HOSTNAME` , if that is empty or does not exist Grafana will try to use
system calls to get the machine name.
2015-04-12 14:31:35 -05:00
## [paths]
### data
2015-05-10 15:52:40 -05:00
Path to where Grafana stores the sqlite3 database (if used), file based
sessions (if used), and other data. This path is usually specified via
command line in the init.d script or the systemd service file.
2015-04-12 14:31:35 -05:00
### logs
2015-05-10 15:52:40 -05:00
Path to where Grafana will store logs. This path is usually specified via
command line in the init.d script or the systemd service file. It can
be overridden in the configuration file or in the default environment variable
file.
2015-04-12 14:31:35 -05:00
2017-11-17 07:48:12 -06:00
### plugins
2017-10-27 09:37:38 -05:00
Directory where grafana will automatically scan and look for plugins
2017-12-07 08:23:14 -06:00
### provisioning
2017-10-27 09:37:38 -05:00
2017-12-05 11:44:31 -06:00
> This feature is available in 5.0+
2017-12-07 08:23:14 -06:00
Folder that contains [provisioning ](/administration/provisioning ) config files that grafana will apply on startup. Dashboards will be reloaded when the json files changes
2017-10-27 09:37:38 -05:00
2015-03-11 09:13:52 -05:00
## [server]
### http_addr
2015-05-10 15:52:40 -05:00
2015-08-11 13:58:30 -05:00
The IP address to bind to. If empty will bind to all interfaces
2015-03-11 09:13:52 -05:00
### http_port
2015-04-01 10:24:08 -05:00
2015-05-10 15:52:40 -05:00
The port to bind to, defaults to `3000` . To use port 80 you need to
either give the Grafana binary permission for example:
2017-10-05 12:01:03 -05:00
```bash
$ sudo setcap 'cap_net_bind_service=+ep' /usr/sbin/grafana-server
```
2015-04-01 10:24:08 -05:00
2015-05-10 15:52:40 -05:00
Or redirect port 80 to the Grafana port using:
2015-03-11 09:13:52 -05:00
2017-10-05 12:01:03 -05:00
```bash
$ sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000
```
2015-05-10 15:52:40 -05:00
Another way is put a webserver like Nginx or Apache in front of Grafana and have them proxy requests to Grafana.
2015-04-07 09:48:30 -05:00
### protocol
2015-05-10 15:52:40 -05:00
2015-04-07 09:48:30 -05:00
`http` or `https`
2016-08-31 01:33:58 -05:00
> **Note** Grafana versions earlier than 3.0 are vulnerable to [POODLE](https://en.wikipedia.org/wiki/POODLE). So we strongly recommend to upgrade to 3.x or use a reverse proxy for ssl termination.
2015-03-11 09:13:52 -05:00
### domain
2015-05-10 15:52:40 -05:00
This setting is only used in as a part of the `root_url` setting (see below). Important if you
use GitHub or Google OAuth.
2015-03-11 09:13:52 -05:00
2015-05-05 04:21:06 -05:00
### enforce_domain
2015-05-10 15:52:40 -05:00
Redirect to correct domain if host header does not match domain.
Prevents DNS rebinding attacks. Default is false.
2015-05-05 04:21:06 -05:00
2015-03-11 09:13:52 -05:00
### root_url
2015-05-10 15:52:40 -05:00
This is the full URL used to access Grafana from a web browser. This is
important if you use Google or GitHub OAuth authentication (for the
callback URL to be correct).
> **Note** This setting is also important if you have a reverse proxy
> in front of Grafana that exposes it through a subpath. In that
> case add the subpath to the end of this URL setting.
2015-03-11 09:13:52 -05:00
### static_root_path
2015-05-10 15:52:40 -05:00
The path to the directory where the front end files (HTML, JS, and CSS
files). Default to `public` which is why the Grafana binary needs to be
executed with working directory set to the installation path.
2015-03-11 09:13:52 -05:00
2015-04-07 09:48:30 -05:00
### cert_file
2015-05-10 15:52:40 -05:00
Path to the certificate file (if `protocol` is set to `https` ).
2015-04-07 09:48:30 -05:00
### cert_key
2015-05-10 15:52:40 -05:00
Path to the certificate key file (if `protocol` is set to `https` ).
2015-04-07 09:48:30 -05:00
2017-03-06 01:26:36 -06:00
### router_logging
Set to true for Grafana to log all HTTP requests (not just errors). These are logged as Info level events
to grafana log.
2015-08-11 13:58:30 -05:00
< hr / >
2015-03-30 02:22:58 -05:00
2015-08-11 13:58:30 -05:00
< hr / >
2015-05-10 15:52:40 -05:00
2015-03-11 09:13:52 -05:00
## [database]
2015-05-10 15:52:40 -05:00
Grafana needs a database to store users and dashboards (and other
things). By default it is configured to use `sqlite3` which is an
embedded database (included in the main Grafana binary).
2015-03-11 09:13:52 -05:00
2016-12-21 16:39:08 -06:00
### url
2017-02-07 03:21:46 -06:00
2016-12-21 16:39:08 -06:00
Use either URL or or the other fields below to configure the database
Example: `mysql://user:secret@host:port/database`
2015-03-11 09:13:52 -05:00
### type
2015-05-10 15:52:40 -05:00
2015-03-11 09:13:52 -05:00
Either `mysql` , `postgres` or `sqlite3` , it's your choice.
### path
2015-05-10 15:52:40 -05:00
Only applicable for `sqlite3` database. The file path where the database
will be stored.
2015-03-11 09:13:52 -05:00
### host
2015-05-10 15:52:40 -05:00
Only applicable to MySQL or Postgres. Includes IP or hostname and port.
For example, for MySQL running on the same host as Grafana: `host =
127.0.0.1:3306`
2015-03-11 09:13:52 -05:00
### name
2015-05-10 15:52:40 -05:00
The name of the Grafana database. Leave it set to `grafana` or some
other name.
2015-03-11 09:13:52 -05:00
### user
2015-05-10 15:52:40 -05:00
2015-03-11 09:13:52 -05:00
The database user (not applicable for `sqlite3` ).
### password
2015-05-10 15:52:40 -05:00
2017-12-13 03:55:58 -06:00
The database user's password (not applicable for `sqlite3` ). If the password contains `#` or `;` you have to wrap it with triple quotes. Ex `"""#password;"""`
2015-03-11 09:13:52 -05:00
### ssl_mode
2015-05-10 15:52:40 -05:00
2015-11-24 10:17:21 -06:00
For Postgres, use either `disable` , `require` or `verify-full` .
For MySQL, use either `true` , `false` , or `skip-verify` .
2016-03-10 07:48:28 -06:00
### ca_cert_path
2015-11-24 10:17:21 -06:00
2017-12-13 03:55:58 -06:00
The path to the CA certificate to use. On many linux systems, certs can be found in `/etc/ssl/certs` .
2015-11-24 10:17:21 -06:00
2016-03-10 07:48:28 -06:00
### client_key_path
2015-11-24 10:17:21 -06:00
2017-12-13 03:55:58 -06:00
The path to the client key. Only if server requires client authentication.
2015-11-24 10:17:21 -06:00
2016-03-10 07:48:28 -06:00
### client_cert_path
2015-11-24 10:17:21 -06:00
2017-12-13 03:55:58 -06:00
The path to the client cert. Only if server requires client authentication.
2015-11-24 10:17:21 -06:00
2016-03-10 07:48:28 -06:00
### server_cert_name
2015-11-24 10:17:21 -06:00
2017-12-13 03:55:58 -06:00
The common name field of the certificate used by the `mysql` or `postgres` server. Not necessary if `ssl_mode` is set to `skip-verify` .
2015-03-11 09:13:52 -05:00
2017-06-21 09:41:56 -05:00
### max_idle_conn
The maximum number of connections in the idle connection pool.
2017-07-24 05:37:58 -05:00
### max_open_conn
2017-06-21 09:41:56 -05:00
The maximum number of open connections to the database.
2017-11-06 08:01:31 -06:00
### log_queries
2017-11-03 14:05:32 -05:00
Set to `true` to log the sql calls and execution times.
2015-08-11 13:58:30 -05:00
< hr / >
2015-05-10 15:52:40 -05:00
2015-03-11 11:49:49 -05:00
## [security]
2015-03-11 09:13:52 -05:00
### admin_user
2015-05-10 15:52:40 -05:00
The name of the default Grafana admin user (who has full permissions).
Defaults to `admin` .
2015-03-11 09:13:52 -05:00
### admin_password
2015-05-10 15:52:40 -05:00
2016-05-09 06:44:11 -05:00
The password of the default Grafana admin. Set once on first-run. Defaults to `admin` .
2015-03-11 09:13:52 -05:00
### login_remember_days
2015-05-10 15:52:40 -05:00
2015-03-11 09:13:52 -05:00
The number of days the keep me logged in / remember me cookie lasts.
### secret_key
2015-05-10 15:52:40 -05:00
2015-03-11 09:13:52 -05:00
Used for signing keep me logged in / remember me cookies.
2015-05-01 01:40:13 -05:00
### disable_gravatar
2015-05-10 15:52:40 -05:00
Set to `true` to disable the use of Gravatar for user profile images.
Default is `false` .
2015-05-01 01:40:13 -05:00
2017-04-28 02:21:33 -05:00
### data_source_proxy_whitelist
Define a white list of allowed ips/domains to use in data sources. Format: `ip_or_domain:port` separated by spaces
2015-08-11 13:58:30 -05:00
< hr / >
2015-05-10 15:52:40 -05:00
2015-05-01 08:01:31 -05:00
## [users]
2015-03-11 11:49:49 -05:00
### allow_sign_up
2015-05-10 15:52:40 -05:00
Set to `false` to prohibit users from being able to sign up / create
2017-07-24 05:37:58 -05:00
user accounts. Defaults to `false` . The admin user can still create
2017-02-07 03:21:46 -06:00
users from the [Grafana Admin Pages ](../../reference/admin )
2015-03-11 11:49:49 -05:00
### allow_org_create
2015-05-10 15:52:40 -05:00
Set to `false` to prohibit users from creating new organizations.
2017-07-24 05:37:58 -05:00
Defaults to `false` .
2015-03-11 11:49:49 -05:00
### auto_assign_org
2015-05-10 15:52:40 -05:00
Set to `true` to automatically add new users to the main organization
(id 1). When set to `false` , new users will automatically cause a new
organization to be created for that new user.
2015-03-11 11:49:49 -05:00
### auto_assign_org_role
2015-05-10 15:52:40 -05:00
The role new users will be assigned for the main organization (if the
above setting is set to true). Defaults to `Viewer` , other valid
2017-12-13 11:53:42 -06:00
options are `Admin` and `Editor` . e.g. :
2016-12-23 02:41:28 -06:00
2017-12-13 11:53:42 -06:00
`auto_assign_org_role = Viewer`
2016-12-23 02:41:28 -06:00
2017-12-13 11:53:42 -06:00
### viewers can edit
Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
Defaults to `false` .
2015-03-11 11:49:49 -05:00
2015-03-11 12:13:48 -05:00
< hr >
2015-05-10 15:52:40 -05:00
2016-09-28 08:27:08 -05:00
## [auth]
### disable_login_form
Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false.
2017-03-29 04:33:28 -05:00
### disable_signout_menu
Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false.
2016-09-28 08:27:08 -05:00
< hr >
2015-03-11 12:13:48 -05:00
## [auth.anonymous]
### enabled
2015-05-10 15:52:40 -05:00
2015-03-11 12:13:48 -05:00
Set to `true` to enable anonymous access. Defaults to `false`
2015-05-10 15:52:40 -05:00
2015-03-11 12:13:48 -05:00
### org_name
2015-05-10 15:52:40 -05:00
Set the organization name that should be used for anonymous users. If
you change your organization name in the Grafana UI this setting needs
to be updated to match the new name.
2015-03-11 12:13:48 -05:00
### org_role
2015-05-10 15:52:40 -05:00
Specify role for anonymous users. Defaults to `Viewer` , other valid
options are `Editor` and `Admin` .
2015-03-11 12:13:48 -05:00
## [auth.github]
2015-05-10 15:52:40 -05:00
2017-09-19 05:08:41 -05:00
You need to create a GitHub OAuth application (you find this under the GitHub
settings page). When you create the application you will need to specify
2015-05-10 15:52:40 -05:00
a callback URL. Specify this as callback:
2015-03-11 12:13:48 -05:00
2017-10-05 12:01:03 -05:00
```bash
http://< my_grafana_server_name_or_ip > :< grafana_server_port > /login/github
```
2015-03-11 12:13:48 -05:00
2015-05-10 15:52:40 -05:00
This callback URL must match the full HTTP address that you use in your
browser to access Grafana, but with the prefix path of `/login/github` .
2017-09-19 05:08:41 -05:00
When the GitHub OAuth application is created you will get a Client ID and a
2015-05-10 15:52:40 -05:00
Client Secret. Specify these in the Grafana configuration file. For
example:
2015-03-11 12:13:48 -05:00
2017-10-05 12:01:03 -05:00
```bash
[auth.github]
enabled = true
allow_sign_up = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
api_url = https://api.github.com/user
team_ids =
allowed_organizations =
```
2015-03-11 12:13:48 -05:00
2015-05-10 15:52:40 -05:00
Restart the Grafana back-end. You should now see a GitHub login button
on the login page. You can now login or sign up with your GitHub
accounts.
2015-03-11 12:13:48 -05:00
2015-05-10 15:52:40 -05:00
You may allow users to sign-up via GitHub authentication by setting the
`allow_sign_up` option to `true` . When this option is set to `true` , any
user successfully authenticating via GitHub authentication will be
automatically signed up.
2015-04-09 20:15:19 -05:00
2015-04-29 03:33:37 -05:00
### team_ids
2015-05-10 15:52:40 -05:00
Require an active team membership for at least one of the given teams on
2015-10-09 10:05:46 -05:00
GitHub. If the authenticated user isn't a member of at least one of the
2015-05-10 15:52:40 -05:00
teams they will not be able to register or authenticate with your
Grafana instance. For example:
2015-04-29 03:33:37 -05:00
2017-10-05 12:01:03 -05:00
```bash
[auth.github]
enabled = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email,read:org
team_ids = 150,300
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
allow_sign_up = true
```
2015-04-29 03:33:37 -05:00
2016-09-15 04:29:03 -05:00
### allowed_organizations
Require an active organization membership for at least one of the given
organizations on GitHub. If the authenticated user isn't a member of at least
one of the organizations they will not be able to register or authenticate with
your Grafana instance. For example
2017-10-05 12:01:03 -05:00
```bash
[auth.github]
enabled = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email,read:org
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
allow_sign_up = true
# space-delimited organization names
allowed_organizations = github google
```
2016-09-15 04:29:03 -05:00
2015-07-15 07:48:39 -05:00
< hr >
2015-03-11 12:13:48 -05:00
## [auth.google]
2015-05-10 15:52:40 -05:00
You need to create a Google project. You can do this in the [Google
Developer Console](https://console.developers.google.com/project). When
you create the project you will need to specify a callback URL. Specify
this as callback:
2015-03-11 12:13:48 -05:00
2017-10-05 12:01:03 -05:00
```bash
http://< my_grafana_server_name_or_ip > :< grafana_server_port > /login/google
```
2015-03-11 12:13:48 -05:00
2015-05-10 15:52:40 -05:00
This callback URL must match the full HTTP address that you use in your
browser to access Grafana, but with the prefix path of `/login/google` .
When the Google project is created you will get a Client ID and a Client
Secret. Specify these in the Grafana configuration file. For example:
2015-03-11 12:13:48 -05:00
2017-10-05 12:01:03 -05:00
```bash
[auth.google]
enabled = true
client_id = YOUR_GOOGLE_APP_CLIENT_ID
client_secret = YOUR_GOOGLE_APP_CLIENT_SECRET
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
allowed_domains = mycompany.com mycompany.org
allow_sign_up = true
```
2015-03-11 12:13:48 -05:00
2015-05-10 15:52:40 -05:00
Restart the Grafana back-end. You should now see a Google login button
on the login page. You can now login or sign up with your Google
2015-06-02 10:45:44 -05:00
accounts. The `allowed_domains` option is optional, and domains were separated by space.
2015-03-11 12:13:48 -05:00
2015-05-10 15:52:40 -05:00
You may allow users to sign-up via Google authentication by setting the
`allow_sign_up` option to `true` . When this option is set to `true` , any
user successfully authenticating via Google authentication will be
automatically signed up.
2015-04-09 20:15:19 -05:00
2016-09-07 04:06:59 -05:00
## [auth.generic_oauth]
This option could be used if have your own oauth service.
This callback URL must match the full HTTP address that you use in your
browser to access Grafana, but with the prefix path of `/login/generic_oauth` .
2017-10-05 12:01:03 -05:00
```bash
[auth.generic_oauth]
enabled = true
client_id = YOUR_APP_CLIENT_ID
client_secret = YOUR_APP_CLIENT_SECRET
scopes =
auth_url =
token_url =
api_url =
allowed_domains = mycompany.com mycompany.org
allow_sign_up = true
```
2016-09-07 04:06:59 -05:00
2017-03-20 02:36:43 -05:00
Set api_url to the resource that returns [OpenID UserInfo ](https://connect2id.com/products/server/docs/api/userinfo ) compatible information.
2016-10-22 01:51:32 -05:00
2017-10-09 08:41:14 -05:00
### Set up oauth2 with Okta
First set up Grafana as an OpenId client "webapplication" in Okta. Then set the Base URIs to `https://<grafana domain>/` and set the Login redirect URIs to `https://<grafana domain>/login/generic_oauth` .
Finaly set up the generic oauth module like this:
```bash
[auth.generic_oauth]
name = Okta
enabled = true
scopes = openid profile email
client_id = < okta application Client ID >
client_secret = < okta application Client Secret >
auth_url = https://< okta domain > /oauth2/v1/authorize
token_url = https://< okta domain > /oauth2/v1/token
api_url = https://< okta domain > /oauth2/v1/userinfo
```
### Set up oauth2 with Bitbucket
```bash
[auth.generic_oauth]
name = BitBucket
enabled = true
allow_sign_up = true
client_id = < client id >
client_secret = < secret >
scopes = account email
auth_url = https://bitbucket.org/site/oauth2/authorize
token_url = https://bitbucket.org/site/oauth2/access_token
api_url = https://api.bitbucket.org/2.0/user
team_ids =
allowed_organizations =
```
2015-03-11 11:49:49 -05:00
< hr >
2015-05-10 15:52:40 -05:00
2015-07-15 07:48:39 -05:00
## [auth.basic]
2015-07-30 03:37:49 -05:00
### enabled
When enabled is `true` (default) the http api will accept basic authentication.
2015-07-15 07:48:39 -05:00
< hr >
## [auth.ldap]
2015-07-30 03:37:49 -05:00
### enabled
2015-08-11 21:46:37 -05:00
Set to `true` to enable LDAP integration (default: `false` )
2015-07-15 07:48:39 -05:00
### config_file
2015-08-11 21:46:37 -05:00
Path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml` )
2015-07-15 07:48:39 -05:00
2017-03-29 01:42:10 -05:00
### allow_sign_up
Allow sign up should almost always be true (default) to allow new Grafana users to be created (if ldap authentication is ok). If set to
false only pre-existing Grafana users will be able to login (if ldap authentication is ok).
2016-11-14 04:34:58 -06:00
> For details on LDAP Configuration, go to the [LDAP Integration]({{< relref "ldap.md" >}}) page.
2015-07-15 07:48:39 -05:00
< hr >
2015-07-30 03:37:49 -05:00
## [auth.proxy]
2017-06-08 06:38:18 -05:00
2015-07-30 03:37:49 -05:00
This feature allows you to handle authentication in a http reverse proxy.
### enabled
2017-06-08 06:38:18 -05:00
2015-07-30 03:37:49 -05:00
Defaults to `false`
### header_name
2017-06-08 06:38:18 -05:00
2015-07-30 03:37:49 -05:00
Defaults to X-WEBAUTH-USER
#### header_property
2017-06-08 06:38:18 -05:00
2015-07-30 03:37:49 -05:00
Defaults to username but can also be set to email
### auto_sign_up
2017-06-08 06:38:18 -05:00
2015-07-30 03:37:49 -05:00
Set to `true` to enable auto sign up of users who do not exist in Grafana DB. Defaults to `true` .
2017-06-08 06:38:18 -05:00
### whitelist
Limit where auth proxy requests come from by configuring a list of IP addresses. This can be used to prevent users spoofing the X-WEBAUTH-USER header.
2015-07-30 03:37:49 -05:00
< hr >
2015-03-11 09:13:52 -05:00
## [session]
### provider
2015-05-10 15:52:40 -05:00
2016-03-10 07:48:28 -06:00
Valid values are `memory` , `file` , `mysql` , `postgres` , `memcache` or `redis` . Default is `file` .
2015-03-11 09:13:52 -05:00
### provider_config
2015-05-10 15:52:40 -05:00
This option should be configured differently depending on what type of
session provider you have configured.
2015-03-11 09:13:52 -05:00
- **file:** session file path, e.g. `data/sessions`
2015-07-08 07:40:43 -05:00
- **mysql:** go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
2017-10-31 07:55:32 -05:00
- **postgres:** ex: user=a password=b host=localhost port=5432 dbname=c sslmode=verify-full
2015-12-08 07:35:09 -06:00
- **memcache:** ex: 127.0.0.1:11211
2016-09-19 10:12:43 -05:00
- **redis:** ex: `addr=127.0.0.1:6379,pool_size=100,prefix=grafana`
2015-03-11 09:13:52 -05:00
2015-05-10 15:52:40 -05:00
If you use MySQL or Postgres as the session store you need to create the
session table manually.
2015-03-11 09:13:52 -05:00
Mysql Example:
2015-03-11 12:13:48 -05:00
2017-10-05 12:01:03 -05:00
```bash
CREATE TABLE `session` (
`key` CHAR(16) NOT NULL,
`data` BLOB,
`expiry` INT(11) UNSIGNED NOT NULL,
PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
```
2017-03-06 01:26:36 -06:00
2017-03-01 04:35:12 -06:00
Postgres Example:
2017-10-05 12:01:03 -05:00
```bash
CREATE TABLE session (
key CHAR(16) NOT NULL,
data BYTEA,
expiry INTEGER NOT NULL,
PRIMARY KEY (key)
);
```
2017-03-06 01:26:36 -06:00
2017-10-31 07:55:32 -05:00
Postgres valid `sslmode` are `disable` , `require` , `verify-ca` , and `verify-full` (default).
2015-03-11 09:13:52 -05:00
### cookie_name
2015-05-10 15:52:40 -05:00
The name of the Grafana session cookie.
2015-03-11 09:13:52 -05:00
### cookie_secure
2015-05-10 15:52:40 -05:00
2015-08-11 13:58:30 -05:00
Set to true if you host Grafana behind HTTPS only. Defaults to `false` .
2015-03-11 09:13:52 -05:00
### session_life_time
2015-05-10 15:52:40 -05:00
2015-03-11 09:13:52 -05:00
How long sessions lasts in seconds. Defaults to `86400` (24 hours).
2015-08-11 13:58:30 -05:00
< hr / >
2015-07-15 07:48:39 -05:00
2015-03-30 02:22:58 -05:00
## [analytics]
2015-03-30 10:39:16 -05:00
### reporting_enabled
2015-05-10 15:52:40 -05:00
2016-03-10 07:48:28 -06:00
When enabled Grafana will send anonymous usage statistics to
2015-08-11 13:58:30 -05:00
`stats.grafana.org` . No IP addresses are being tracked, only simple counters to
track running instances, versions, dashboard & error counts. It is very helpful
2016-03-10 07:48:28 -06:00
to us, so please leave this enabled. Counters are sent every 24 hours. Default
2015-08-11 13:58:30 -05:00
value is `true` .
2015-03-30 02:22:58 -05:00
### google_analytics_ua_id
2015-05-10 15:52:40 -05:00
2015-08-11 13:58:30 -05:00
If you want to track Grafana usage via Google analytics specify *your* Universal
Analytics ID here. By default this feature is disabled.
2015-07-08 03:52:50 -05:00
2015-08-11 13:58:30 -05:00
< hr / >
2015-07-15 07:48:39 -05:00
2017-11-17 07:48:12 -06:00
## [dashboards]
### versions_to_keep (introduced in v5.0)
Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1.
2015-07-08 03:52:50 -05:00
## [dashboards.json]
2017-12-07 08:23:14 -06:00
> This have been replaced with dashboards [provisioning](/administration/provisioning) in 5.0+
2015-07-08 03:52:50 -05:00
### enabled
`true` or `false` . Is disabled by default.
### path
The full path to a directory containing your json dashboards.
2016-06-03 11:38:19 -05:00
2016-09-30 00:40:58 -05:00
## [smtp]
Email server settings.
### enabled
defaults to false
### host
defaults to localhost:25
### user
In case of SMTP auth, defaults to `empty`
### password
In case of SMTP auth, defaults to `empty`
### cert_file
File path to a cert file, defaults to `empty`
### key_file
File path to a key file, defaults to `empty`
### skip_verify
Verify SSL for smtp server? defaults to `false`
### from_address
Address used when sending out emails, defaults to `admin@grafana.localhost`
2017-02-14 15:07:29 -06:00
### from_name
2017-02-15 03:45:04 -06:00
Name to be used when sending out emails, defaults to `Grafana`
2017-02-14 15:07:29 -06:00
2017-09-22 16:29:56 -05:00
### ehlo_identity
Name to be used as client identity for EHLO in SMTP dialog, defaults to instance_name.
2016-06-21 09:29:17 -05:00
## [log]
### mode
Either "console", "file", "syslog". Default is console and file
Use space to separate multiple modes, e.g. "console file"
### level
Either "debug", "info", "warn", "error", "critical", default is "info"
2016-10-07 03:39:01 -05:00
### filters
2016-06-21 09:29:17 -05:00
optional settings to set different levels for specific loggers.
Ex `filters = sqlstore:debug`
2016-06-03 11:38:19 -05:00
## [metrics]
### enabled
2017-11-16 02:38:37 -06:00
Enable metrics reporting. defaults true. Available via HTTP API `/metrics` .
2016-06-03 11:38:19 -05:00
### interval_seconds
2016-08-17 03:01:55 -05:00
Flush/Write interval when sending metrics to external TSDB. Defaults to 10s.
2016-06-03 11:38:19 -05:00
## [metrics.graphite]
Include this section if you want to send internal Grafana metrics to Graphite.
### address
Format `<Hostname or ip>` :port
### prefix
Graphite metric prefix. Defaults to `prod.grafana.%(instance_name)s.`
2016-08-02 02:35:15 -05:00
## [snapshots]
### external_enabled
Set to false to disable external snapshot publish endpoint (default true)
### external_snapshot_url
Set root url to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots-origin.raintank.io)
### external_snapshot_name
Set name for external snapshot button. Defaults to `Publish to snapshot.raintank.io`
2016-09-26 07:46:03 -05:00
### remove expired snapshot
Enabled to automatically remove expired snapshots
### remove snapshots after 90 days
Time to live for snapshots.
2016-11-06 08:40:02 -06:00
## [external_image_storage]
These options control how images should be made public so they can be shared on services like slack.
### provider
2017-08-06 10:04:38 -05:00
You can choose between (s3, webdav, gcs). If left empty Grafana will ignore the upload action.
2016-11-06 08:40:02 -06:00
## [external_image_storage.s3]
2017-10-04 14:04:20 -05:00
2017-09-19 03:17:22 -05:00
### bucket
Bucket name for S3. e.g. grafana.snapshot
2017-10-04 14:04:20 -05:00
2017-09-19 03:17:22 -05:00
### region
Region name for S3. e.g. 'us-east-1', 'cn-north-1', etc
2016-11-06 08:40:02 -06:00
2017-10-04 14:04:20 -05:00
### path
Optional extra path inside bucket, useful to apply expiration policies
2016-11-06 08:40:02 -06:00
### bucket_url
2017-09-19 03:17:22 -05:00
(for backward compatibility, only works when no bucket or region are configured)
2017-03-06 01:26:36 -06:00
Bucket URL for S3. AWS region can be specified within URL or defaults to 'us-east-1', e.g.
2017-02-21 03:09:50 -06:00
- http://grafana.s3.amazonaws.com/
- https://grafana.s3-ap-southeast-2.amazonaws.com/
2016-11-06 08:40:02 -06:00
### access_key
2017-02-21 03:09:50 -06:00
Access key. e.g. AAAAAAAAAAAAAAAAAAAA
Access key requires permissions to the S3 bucket for the 's3:PutObject' and 's3:PutObjectAcl' actions.
2016-11-06 08:40:02 -06:00
### secret_key
2017-02-21 03:09:50 -06:00
Secret key. e.g. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2016-11-06 08:40:02 -06:00
## [external_image_storage.webdav]
### url
2016-11-08 00:04:46 -06:00
Url to where Grafana will send PUT request with images
2016-11-08 04:05:38 -06:00
2017-03-23 10:23:46 -05:00
### public_url
2017-04-25 10:20:03 -05:00
Optional parameter. Url to send to users in notifications, directly appended with the resulting uploaded file name.
2017-03-23 10:23:46 -05:00
2016-11-06 08:40:02 -06:00
### username
2016-11-08 00:04:46 -06:00
basic auth username
2016-11-08 04:05:38 -06:00
2016-11-06 08:40:02 -06:00
### password
2016-11-08 00:04:46 -06:00
basic auth password
2016-11-08 04:05:38 -06:00
2017-08-06 10:04:38 -05:00
## [external_image_storage.gcs]
2017-08-04 16:46:26 -05:00
### key_file
Path to JSON key file associated with a Google service account to authenticate and authorize.
Service Account keys can be created and downloaded from https://console.developers.google.com/permissions/serviceaccounts.
2017-08-07 08:17:16 -05:00
Service Account should have "Storage Object Writer" role.
2017-08-04 16:46:26 -05:00
### bucket name
2017-10-05 12:01:03 -05:00
Bucket Name on Google Cloud Storage.
2017-08-04 16:46:26 -05:00
2017-11-19 20:26:46 -06:00
### path
Optional extra path inside bucket
2016-11-08 04:05:38 -06:00
## [alerting]
2017-01-25 06:33:27 -06:00
### enabled
Defaults to true. Set to false to disable alerting engine and hide Alerting from UI.
### execute_alerts
2016-11-08 04:05:38 -06:00
### execute_alerts = true
Makes it possible to turn off alert rule execution.