Grafana 2.1 ships with strong LDAP integration feature. The LDAP integration in Grafan allows your
Grafana 2.1 ships with a strong LDAP integration feature. The LDAP integration in Grafana allows your Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP group memberships and Grafana Organization user roles.
Grafan users to login with their LDAP credentials. You can also specify mappings between LDAP
group memberships and Grafana Organization user roles.
## Configuration
## Configuration
You turn on ldap in the [main config file](configuration/#authldap) as well as specify the path to the ldap
You turn on LDAP in the [main config file](configuration/#authldap) as well as specify the path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml`).
specific configuration file (default: `/etc/grafana/ldap.toml`).
### Example config
### Example config
...
@@ -23,7 +20,7 @@ verbose_logging = false
...
@@ -23,7 +20,7 @@ verbose_logging = false
[[servers]]
[[servers]]
# Ldap server host
# Ldap server host
host="127.0.0.1"
host="127.0.0.1"
# Default port is 389 or 636 if use_ssl = true
# Default port is 389, or 636 if use_ssl = true
port=389
port=389
# Set to true if ldap server supports TLS
# Set to true if ldap server supports TLS
use_ssl=false
use_ssl=false
...
@@ -67,7 +64,7 @@ org_role = "Viewer"
...
@@ -67,7 +64,7 @@ org_role = "Viewer"
## Bind & Bind Password
## Bind & Bind Password
By default the configuration expects you to specify a bind DN and bind password. This should be a read only user that can perform ldap searches.
By default the configuration expects you to specify a bind DN and bind password. This should be a read only user that can perform LDAP searches.
When the user DN is found a second bind is performed with the user provided username & password (in the normal Grafana login form).
When the user DN is found a second bind is performed with the user provided username & password (in the normal Grafana login form).
```
```
...
@@ -77,7 +74,7 @@ bind_password = "grafana"
...
@@ -77,7 +74,7 @@ bind_password = "grafana"
### Single bind Example
### Single bind Example
If you can provide a single bind expression that matches all possible users you can skip the second bind and bind against the user DN directly.
If you can provide a single bind expression that matches all possible users, you can skip the second bind and bind against the user DN directly.
This allows you to not specify a bind_password in the configuration file.
This allows you to not specify a bind_password in the configuration file.
In this case you skip providing a `bind_password` and instead provide a `bind_dn` value with a `%s` somewhere. This will be replaced with the username
In this case you skip providing a `bind_password` and instead provide a `bind_dn` value with a `%s` somewhere. This will be replaced with the username
entered in on the Grafana login page. The search filter and search bases settings are still needed to perform the ldap search to retreive the other ldap
entered in on the Grafana login page. The search filter and search bases settings are still needed to perform the LDAP search to retreive the other LDAP
information (like ldap groups and email).
information (like LDAP groups and email).
## LDAP to Grafana Org Role Sync
## Ldap to Grafana Org Role Sync
In the `[[servers.group_mappings]]` you can map a LDAP group to a grafana organization and role. These will be synced every time the user logs in. So
In the `[[servers.group_mappings]]` you can map a LDAP group to a grafana organization and role. These will be synced every time the user logs in. So
if you change a users role in the Grafana Org. Users page, this change will be reset the next time the user logs in. Similarly if you
if you change a users role in the Grafana Org. Users page, this change will be reset the next time the user logs in. Similarly if you
can LDAP groups for a user in LDAP the change will take effect the next time the user logs in to Grafana.
can LDAP groups for a user in LDAP the change will take effect the next time the user logs in to Grafana.
@@ -10,25 +10,40 @@ Here are links for how to install Grafana (and some include Graphite or
...
@@ -10,25 +10,40 @@ Here are links for how to install Grafana (and some include Graphite or
InfluxDB as well) via a provisioning system. These are not maintained by
InfluxDB as well) via a provisioning system. These are not maintained by
any core Grafana team member and might be out of date.
any core Grafana team member and might be out of date.
## Puppet
Some of the linked cookbooks/manifests/etc. will install and configure Grafana 2.x, while some will only install the older Grafana 1.x versions. They've been broken apart below for your convenience.
*[forge.puppetlabs.com/bfraser/grafana](https://forge.puppetlabs.com/bfraser/grafana)**Note:** The current version works with Grafana 2.x. To install older versions of Grafana use the 1.x series of releases.
*[github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)**Note:** The current version works with Grafana 2.x. To install older versions of Grafana use the 1.x series of releases.
go run build.go setup (only needed once to install godep)
go run build.go setup # (only needed once to install godep)
$GOPATH/bin/godep restore (will pull down all golang lib dependecies in your current GOPATH)
$GOPATH/bin/godep restore # (will pull down all golang lib dependecies in your current GOPATH)
go build .
go run build.go build # (or 'go build .')
```
```
#### Building on Windows
#### Building on Windows
...
@@ -44,13 +44,20 @@ npm install -g grunt-cli
...
@@ -44,13 +44,20 @@ npm install -g grunt-cli
grunt
grunt
```
```
## Recompile backend on source change
To rebuild on source change (requires that you executed godep restore)
```
go get github.com/Unknwon/bra
bra run
```
## Running Grafana Locally
## Running Grafana Locally
You can run a local instance of Grafana by running:
You can run a local instance of Grafana by running:
```
```
./grafana-server
./bin/grafana-server # if you build the binary with 'go run build.go build'. If you built it with 'go build .', run './grafana')
```
```
Open grafana in your browser (default [http://localhost:3000](http://localhost:3000)) and login with user/pass = admin/admin.
Open grafana in your browser (default [http://localhost:3000](http://localhost:3000)) and login with admin user (default user/pass = admin/admin).
## Developing for Grafana
## Developing for Grafana
To add features, customize your config, etc, you'll need to rebuild on source change (requires that you executed [godep restore](#build-the-backend), as outlined above).
To add features, customize your config, etc, you'll need to rebuild on source change (requires that you executed [godep restore](#build-the-backend), as outlined above).
...
@@ -75,6 +82,8 @@ You only need to add the options you want to override. Config files are applied
...
@@ -75,6 +82,8 @@ You only need to add the options you want to override. Config files are applied
1. grafana.ini
1. grafana.ini
2. custom.ini
2. custom.ini
Learn more about Grafana config options in the [Configuration section](/installation/configuration/)
## Create a pull requests
## Create a pull requests
Please contribute to the Grafana project and submit a pull request! Build new features, write or update documentation, fix bugs and generally make Grafana even more awesome.
Please contribute to the Grafana project and submit a pull request! Build new features, write or update documentation, fix bugs and generally make Grafana even more awesome.