Added patch from ct

This commit is contained in:
Matt Toback 2015-08-11 14:58:30 -04:00
parent d132d3abfd
commit 511a592ec8
10 changed files with 93 additions and 71 deletions

View File

@ -18,7 +18,7 @@ specified in a `.ini` configuration file or specified using environment variable
> **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
> init.d script using `-config` file parameter.
> init.d script using `--config` file parameter.
## Using environment variables
@ -37,12 +37,12 @@ should be upper case, `.` should be replaced by `_`. For example, given these co
client_secret = 0ldS3cretKey
Then you can override that using:
Then you can override them using:
export GF_SECURITY_ADMIN_USER=true
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
<hr>
<hr />
## [paths]
@ -63,7 +63,7 @@ file.
### http_addr
The IP address to bind to, if empty will bind to all interfaces
The IP address to bind to. If empty will bind to all interfaces
### http_port
@ -116,9 +116,9 @@ Path to the certificate file (if `protocol` is set to `https`).
Path to the certificate key file (if `protocol` is set to `https`).
<hr>
<hr />
<hr>
<hr />
## [database]
@ -158,7 +158,7 @@ The database user's password (not applicable for `sqlite3`).
For `postgres` only, either `disable`, `require` or `verify-full`.
<hr>
<hr />
## [security]
@ -184,7 +184,7 @@ Used for signing keep me logged in / remember me cookies.
Set to `true` to disable the use of Gravatar for user profile images.
Default is `false`.
<hr>
<hr />
## [users]
@ -384,29 +384,30 @@ The name of the Grafana session cookie.
### cookie_secure
Set to true if you host Grafana behind HTTPs only. Defaults to `false`.
Set to true if you host Grafana behind HTTPS only. Defaults to `false`.
### session_life_time
How long sessions lasts in seconds. Defaults to `86400` (24 hours).
<hr>
<hr />
## [analytics]
### reporting_enabled
When enabled Grafana will send anonymous usage statistics to `stats.grafana.org`.
No IP addresses are being tracked, only simple counters to track running instances,
versions, dashboard & error counts. It is very helpful to us, please leave this
enabled. Counters are sent every 24 hours. Default value is `true`.
When enabled Grafana will send anonymous usage statistics to
`stats.grafana.org`. No IP addresses are being tracked, only simple counters to
track running instances, versions, dashboard & error counts. It is very helpful
to us, so please leave this enabled. Counters are sent every 24 hours. Default
value is `true`.
### google_analytics_ua_id
If you want to track Grafana usage via Google analytics specify *your* Universal Analytics ID
here. By default this feature is disabled.
If you want to track Grafana usage via Google analytics specify *your* Universal
Analytics ID here. By default this feature is disabled.
<hr>
<hr />
## [dashboards.json]

View File

@ -14,36 +14,36 @@ Description | Download
## Install
$ wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.1.0_amd64.deb
$ sudo apt-get install -y adduser libfontconfig
$ sudo dpkg -i grafana_2.1.0_amd64.deb
`$ wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.1.0_amd64.deb`
`$ sudo apt-get install -y adduser libfontconfig`
`$ sudo dpkg -i grafana_2.1.0_amd64.deb`
## APT Repository
Add the following line to your `/etc/apt/sources.list` file.
deb https://packagecloud.io/grafana/stable/debian/ wheezy main
`deb https://packagecloud.io/grafana/stable/debian/ wheezy main`
Use the above line even if you are on Ubuntu or another Debian version.
There is also a testing repository if you want beta or release
candidates.
deb https://packagecloud.io/grafana/testing/debian/ wheezy main
`deb https://packagecloud.io/grafana/testing/debian/ wheezy main`
Then add the [Package Cloud](https://packagecloud.io/grafana) key. This
allows you to install signed packages.
$ curl https://packagecloud.io/gpg.key | sudo apt-key add -
`$ curl https://packagecloud.io/gpg.key | sudo apt-key add -`
Update your Apt repositories and install Grafana
$ sudo apt-get update
$ sudo apt-get install grafana
`$ sudo apt-get update`
`$ sudo apt-get install grafana`
On some older versions of Ubuntu and Debian you may need to install the
`apt-transport-https` package which is needed to fetch packages over
HTTPS.
$ sudo apt-get install -y apt-transport-https
`$ sudo apt-get install -y apt-transport-https`
## Package details
@ -57,9 +57,9 @@ HTTPS.
## Start the server (init.d service)
You can start Grafana by running:
Start Grafana by running:
$ sudo service grafana-server start
`$ sudo service grafana-server start`
This will start the `grafana-server` process as the `grafana` user,
which was created during the package installation. The default HTTP port
@ -67,19 +67,19 @@ is `3000` and default user and group is `admin`.
To configure the Grafana server to start at boot time:
$ sudo update-rc.d grafana-server defaults 95 10
`$ sudo update-rc.d grafana-server defaults 95 10`
## Start the server (via systemd)
To start the service using systemd.
To start the service using systemd:
$ systemctl daemon-reload
$ systemctl start grafana-server
$ systemctl status grafana-server
`$ systemctl daemon-reload`
`$ systemctl start grafana-server`
`$ systemctl status grafana-server`
Enable the systemd service so that Grafana starts at boot.
sudo systemctl enable grafana-server.service
`sudo systemctl enable grafana-server.service`
## Environment file
@ -96,7 +96,7 @@ By default Grafana will log to `/var/log/grafana`
The default configuration specifies a sqlite3 database located at
`/var/lib/grafana/grafana.db`. Please backup this database before
upgrades. You can also use MySQL or Postgres as the Grafana database.
upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page](configuration.md#database).
## Configuration
@ -112,11 +112,10 @@ those options.
## Installing from binary tar file
Start by [downloading](http://grafana.org/download/builds) the latest
`.tar.gz` file and extract it. This will extract into a folder named
after the version you downloaded. This folder contains all files
required to run Grafana. There are no init scripts or install scripts
in this package.
Download [the latest `.tar.gz` file](http://grafana.org/download/builds) and
extract it. This will extract into a folder named after the version you
downloaded. This folder contains all files required to run Grafana. There are
no init scripts or install scripts in this package.
To configure Grafana add a configuration file named `custom.ini` to the
`conf` folder and override any of the settings defined in

View File

@ -9,7 +9,7 @@ page_keywords: grafana, installation, documentation
Grafana is easily installed via a Debian/Ubuntu package (.deb), via
Redhat/Centos package (.rpm) or manually via a tarball that contains all
required files and binaries. If you can't find a package or binary for
your platform you might be able to build one your self, read the [build
your platform, you might be able to build one yourself. Read the [build
from source](../project/building_from_source) instructions for more
information.

View File

@ -6,13 +6,10 @@ page_keywords: grafana, ldap, configuration, documentation, integration
# LDAP Integration
Grafana 2.1 ships with strong LDAP integration feature. The LDAP integration in Grafan allows your
Grafan users to login with their LDAP credentials. You can also specify mappings between LDAP
group memberships and Grafana Organization user roles.
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.
## Configuration
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`).
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`).
### Example config
@ -23,7 +20,7 @@ verbose_logging = false
[[servers]]
# Ldap server host
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
# Set to true if ldap server supports TLS
use_ssl = false
@ -67,7 +64,7 @@ org_role = "Viewer"
## 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).
```
@ -77,7 +74,7 @@ bind_password = "grafana"
### 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.
```
@ -85,10 +82,11 @@ bind_dn = "cn=%s,o=users,dc=grafana,dc=org"
```
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
information (like ldap groups and email).
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).
## 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
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.

View File

@ -6,7 +6,7 @@ page_keywords: grafana, installation, mac, osx, guide
# Installing on Mac
There is currently no binary build for Mac. But read the [build from
There is currently no binary build for Mac, but Grafana will happily build on Mac. Read the [build from
source](/project/building_from_source) page for instructions on how to
build it yourself.

View File

@ -14,7 +14,7 @@ rendering times for large time ranges then it is most likely caused by
running Graphite 0.9.12 or lower.
The latest version of Graphite adds a `maxDataPoints` parameter to the
JSON render API, without this feature Graphite can return hundreds of
JSON render API. Without this feature Graphite can return hundreds of
thousands of data points per graph, which can hang your browser. Be sure
to upgrade to
[0.9.13](http://graphite.readthedocs.org/en/latest/releases/0_9_13.html).

View File

@ -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
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)
## Compatible with Grafana 2.x
## Ansible
### Puppet
* [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.
### Ansible
* [github.com/picotrading/ansible-grafana](https://github.com/picotrading/ansible-grafana)
### Docker
* [github.com/grafana/grafana-docker](https://github.com/grafana/grafana-docker)
### Chef
* [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.
* [github.com/Nordstrom/grafana2-cookbook](https://github.com/Nordstrom/grafana2-cookbook)
## Compatible with Grafana 1.x only
### Ansible
* [github.com/bobrik/ansible-grafana](https://github.com/bobrik/ansible-grafana)
* [github.com/bitmazk/ansible-digitalocean-influxdb-grafana](https://github.com/bitmazk/ansible-digitalocean-influxdb-grafana)
* [github.com/picotrading/ansible-grafana](https://github.com/picotrading/ansible-grafana)
## Docker
### Docker
* [github.com/kamon-io/docker-grafana-graphite](https://github.com/kamon-io/docker-grafana-graphite)
* [github.com/kamon-io/docker-grafana-influxdb](https://github.com/kamon-io/docker-grafana-influxdb)
* [github.com/tutumcloud/tutum-docker-grafana](https://github.com/tutumcloud/tutum-docker-grafana)
* [github.com/mingfang/docker-grafana](https://github.com/mingfang/docker-grafana)
## Chef
### Chef
* [github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
* [github.com/dzautner/grafana-cookbook](https://github.com/dzautner/grafana-cookbook)

View File

@ -100,7 +100,7 @@ By default Grafana will log to `/var/log/grafana`
The default configuration specifies a sqlite3 database located at
`/var/lib/grafana/grafana.db`. Please backup this database before
upgrades. You can also use MySQL or Postgres as the Grafana database.
upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page](configuration.md#database).
## Configuration

View File

@ -18,8 +18,8 @@ an error like this:
![](/img/v1/graph_timestore_error.png)
For some type of errors the `View details` link will show you error
details. But for many types of HTTP connection errors there is very
For some types of errors, the `View details` link will show you error
details. For many types of HTTP connection errors, however, there is very
little information. The best way to troubleshoot these issues is use
the [Chrome developer tools](https://developer.chrome.com/devtools/index).
By pressing `F12` you can bring up the chrome dev tools.

View File

@ -21,12 +21,12 @@ export GOPATH=`pwd`
go get github.com/grafana/grafana
```
## Build the Backend
## Building the backend
```
cd $GOPATH/src/github.com/grafana/grafana
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)
go build .
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)
go run build.go build # (or 'go build .')
```
#### Building on Windows
@ -44,13 +44,20 @@ npm install -g grunt-cli
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
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
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
1. grafana.ini
2. custom.ini
Learn more about Grafana config options in the [Configuration section](/installation/configuration/)
## 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.