diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md index a08873f552c..fc821ed37dc 100644 --- a/docs/sources/installation/configuration.md +++ b/docs/sources/installation/configuration.md @@ -6,27 +6,29 @@ page_keywords: grafana, configuration, documentation # Configuration -The Grafana backend has a number of configuration options that can be specified in a `.ini` config file -or specified using `ENV` variables. +The Grafana back-end has a number of configuration options that can be +specified in a `.ini` configuration file or specified using environment variables. ## Config file locations - Default configuration from `$WORKING_DIR/conf/defaults.ini` - Custom configuration from `$WORKING_DIR/conf/custom.ini` -- The custom config file path can be overriden using the `--config` parameter +- The custom configuration file path can be overridden using the `--config` parameter -> **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. +> **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. -## Using ENV variables -All options in the config file (listed below) can be overriden using ENV variables using the syntax: +## Using environment variables + +All options in the configuration file (listed below) can be overridden +using environment variables using the syntax: GF__ -Where the section name is the text within the brackets. Everything should be upper case. - -Example, given this config setting: +Where the section name is the text within the brackets. Everything +should be upper case. For example, given this configuration setting: [security] admin_user = admin @@ -36,149 +38,206 @@ Then you can override that using: export GF_SECURITY_ADMIN_USER=true
+ ## [paths] ### data -Path to where grafana can store 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. + +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. ### logs -Path to where grafana can store logs. This path is usually specified via command line in the init.d script or the systemd service file. -It can be overriden in the config file or in the default environment variable file. + +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. ## [server] ### 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 -The port to bind to, defaults to `3000`. To use port 80 you need to either give the grafana binary permission for example: -``` -$ sudo setcap 'cap_net_bind_service=+ep' /opt/grafana/current/grafana -``` +The port to bind to, defaults to `3000`. To use port 80 you need to +either give the Grafana binary permission for example: -Or redirect port 80 to the grafana port using: -``` -$ sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000 -``` + $ sudo setcap 'cap_net_bind_service=+ep' /opt/grafana/current/grafana -Another way is put nginx or apache infront of Grafana and have them proxy requests to Grafana. +Or redirect port 80 to the Grafana port using: + + $ sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000 + +Another way is put a webserver like Nginx or Apache in front of Grafana and have them proxy requests to Grafana. ### protocol + `http` or `https` ### domain -This setting is only used in as a part of the root_url setting (see below). Important if you -use github or google oauth. + +This setting is only used in as a part of the `root_url` setting (see below). Important if you +use GitHub or Google OAuth. ### enforce_domain -Redirect to correct domain if host header does not match domain. Prevents DNS rebinding attacks. Default is false. + +Redirect to correct domain if host header does not match domain. +Prevents DNS rebinding attacks. Default is false. ### root_url -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 infront of Grafana -> that exposes grafana through a subpath. In that case add the subpath to the end of this url setting. +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. ### static_root_path -The path to the directory where the frontend files (html & js & css). Default to `public` which is -why the Grafana binary needs to be executed with working directory set to the installation path. + +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. ### cert_file -Path to cert file (if protocol is https) + +Path to the certificate file (if `protocol` is set to `https`). ### cert_key -Path to cert key file (if protocol is https) + +Path to the certificate key file (if `protocol` is set to `https`).

+ ## [database] -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). +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). ### type + Either `mysql`, `postgres` or `sqlite3`, it's your choice. ### path -Only applicable for `sqlite3` database. The file path where the database will be stored. + +Only applicable for `sqlite3` database. The file path where the database +will be stored. ### host -Only applicable to mysql or postgres. Include ip/hostname & port. -Example for mysql same host as Grafana: `host = 127.0.0.1:3306` + +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` ### name -The name of the grafana database. Leave it set to `grafana` or some other name. + +The name of the Grafana database. Leave it set to `grafana` or some +other name. ### user + The database user (not applicable for `sqlite3`). ### password + The database user's password (not applicable for `sqlite3`). ### ssl_mode -For `postgres` only, either "disable", "require" or "verify-full". + +For `postgres` only, either `disable`, `require` or `verify-full`.
+ ## [security] ### admin_user -The name of the default grafana admin user (who has full permissions). Defaults to `admin`. + +The name of the default Grafana admin user (who has full permissions). +Defaults to `admin`. ### admin_password -The password of the default grafana admin. Defaults to `admin`. + +The password of the default Grafana admin. Defaults to `admin`. ### login_remember_days + The number of days the keep me logged in / remember me cookie lasts. ### secret_key + Used for signing keep me logged in / remember me cookies. ### disable_gravatar -Set to true to disable the use of Gravatar for user profile images. Default is `false`. + +Set to `true` to disable the use of Gravatar for user profile images. +Default is `false`.
+ ## [user] ### allow_sign_up -Set to `false` to prohibit users from being able to sign up / create user accounts. Defaults to `true`. -The admin can still create users from the [Grafana Admin Pages](../reference/admin.md) + +Set to `false` to prohibit users from being able to sign up / create +user accounts. Defaults to `true`. The admin user can still create +users from the [Grafana Admin Pages](../reference/admin.md) ### allow_org_create -Set to `false` to prohibit users from creating new organizations. Defaults to `true`. + +Set to `false` to prohibit users from creating new organizations. +Defaults to `true`. ### auto_assign_org -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. + +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. ### auto_assign_org_role -The role new users will be assigned for the main organization (if the above setting is set to true). -Defaults to `Viewer`, other valid options are `Admin` and `Editor`. + +The role new users will be assigned for the main organization (if the +above setting is set to true). Defaults to `Viewer`, other valid +options are `Admin` and `Editor`.
+ ## [auth.anonymous] ### enabled -Set to `true` to enable anonymous access. Defaults to `false` -### org_name -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. -### org_role -Specify role for anonymous users. Defaults to `Viewer`, other valid options are `Editor` and `Admin`. +Set to `true` to enable anonymous access. Defaults to `false` + +### org_name + +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. + +### org_role + +Specify role for anonymous users. Defaults to `Viewer`, other valid +options are `Editor` and `Admin`. ## [auth.github] -You need to create a github application (you find this under the github profile page). When -you create the application you will need to specify a callback URL. Specify this as callback: + +You need to create a GitHub application (you find this under the GitHub +profile page). When you create the application you will need to specify +a callback URL. Specify this as callback: http://:/login/github -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`. When the github application is created you will get a -Client ID and a Client Secret. Specify these in the grafana config file. Example: +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`. +When the GitHub application is created you will get a Client ID and a +Client Secret. Specify these in the Grafana configuration file. For +example: [auth.github] enabled = true @@ -190,16 +249,21 @@ Client ID and a Client Secret. Specify these in the grafana config file. Example allow_sign_up = false team_ids = -Restart the grafana backend. You should now see a github login button on the login page. You can -now login or signup with your github accounts. +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. -You may allow users to sign-up via github auth by setting allow_sign_up to true. When this option is -set to true, any user successfully authenticating via github auth will be automatically signed up. +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. ### team_ids -Require an active team membership for at least one of the given teams on GitHub. -If the authenticated user isn't a member of at least one the teams they will not -be able to register or authenticate with your Grafana instance. Example: + +Require an active team membership for at least one of the given teams on +GitHub. If the authenticated user isn't a member of at least one the +teams they will not be able to register or authenticate with your +Grafana instance. For example: [auth.github] enabled = true @@ -212,14 +276,18 @@ be able to register or authenticate with your Grafana instance. Example: allow_sign_up = false ## [auth.google] -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: + +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: http://:/login/google -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 config file. Example: +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: [auth.google] enabled = true @@ -231,25 +299,34 @@ Client ID and a Client Secret. Specify these in the grafana config file. Example allowed_domains = mycompany.com allow_sign_up = false -Restart the grafana backend. You should now see a google login button on the login page. You can -now login or signup with your google accounts. `allowed_domains` option is optional. +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 +accounts. The `allowed_domains` option is optional. -You may allow users to sign-up via google auth by setting allow_sign_up to true. When this option is -set to true, any user successfully authenticating via google auth will be automatically signed up. +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.
+ ## [session] ### provider -Valid values are "memory", "file", "mysql", 'postgres'. Default is "file". + +Valid values are `memory`, `file`, `mysql`, `postgres`. Default is `file`. ### provider_config -This option should be configured differently depending on what type of session provider you have configured. + +This option should be configured differently depending on what type of +session provider you have configured. - **file:** session file path, e.g. `data/sessions` - **mysql:** go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name` -if you use mysql or postgres as session store you need to create the session table manually. +If you use MySQL or Postgres as the session store you need to create the +session table manually. + Mysql Example: CREATE TABLE `session` ( @@ -260,22 +337,27 @@ Mysql Example: ) ENGINE=MyISAM DEFAULT CHARSET=utf8; ### cookie_name -The name of the grafana session cookie + +The name of the Grafana session cookie. ### cookie_secure + 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). ## [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, + +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`. ### google_analytics_ua_id -If you want to track Grafana usage via Google analytics specify *your* Univeral Analytics ID -here. By defualt 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. diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index c042de15ec6..07a7d451626 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -29,7 +29,8 @@ candidates. deb https://packagecloud.io/grafana/testing/debian/ wheezy main -Then add the [Package Cloud](https://packagecloud.io/grafana) key (signs repo metadata). +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 - @@ -47,10 +48,10 @@ HTTPS. ## Package details - Installs binary to `/usr/sbin/grafana-server` -- Init.d script to `/etc/init.d/grafana-server` -- Default file (environment vars) to `/etc/default/grafana-server` -- Configuration file to `/etc/grafana/grafana.ini` -- Systemd service (if systemd is available) name `grafana-server.service` +- Installs Init.d script to `/etc/init.d/grafana-server` +- Creates default file (environment vars) to `/etc/default/grafana-server` +- Installs configuration file to `/etc/grafana/grafana.ini` +- Installs systemd service (if systemd is available) name `grafana-server.service` - The default configuration sets the log file at `/var/log/grafana/grafana.log` - The default configuration specifies an sqlite3 db at `/var/lib/grafana/grafana.db` @@ -93,13 +94,15 @@ By default Grafana will log to `/var/log/grafana` ### Database -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. +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. ## Configuration -The configuration file is located at `/etc/grafana/grafana.ini`. Go the [Configuration](/installation/configuration) page for details -on all those options. +The configuration file is located at `/etc/grafana/grafana.ini`. Go the +[Configuration](/installation/configuration) page for details on all +those options. ### Adding data sources @@ -115,8 +118,9 @@ 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 `conf/defaults.ini`. +To configure Grafana add a configuration file named `custom.ini` to the +`conf` folder and override any of the settings defined in +`conf/defaults.ini`. Start Grafana by executing `./grafana web`. The `grafana` binary needs the working directory to be the root install directory (where the binary diff --git a/docs/sources/installation/docker.md b/docs/sources/installation/docker.md index 29526715f9e..456b4c54b31 100644 --- a/docs/sources/installation/docker.md +++ b/docs/sources/installation/docker.md @@ -8,27 +8,31 @@ page_keywords: grafana, installation, docker, container, guide ## Install from offical docker image -Grafana has an offical docker container. +Grafana has an official Docker container. $ docker run -i -p 3000:3000 grafana/grafana -All grafana configuration settings can be defined using ENVIRONMENT variables, this is especially useful when using the -above container. +All Grafana configuration settings can be defined using environment +variables, this is especially useful when using the above container. ## Docker volumes & ENV config -The docker container exposes two volumes, the sqlite3 database in the folder `/var/lib/grafana` and -configuration files is in `/etc/grafana/` folder. You can map these volumes to host folders when you start the container: +The Docker container exposes two volumes, the sqlite3 database in the +folder `/var/lib/grafana` and configuration files is in `/etc/grafana/` +folder. You can map these volumes to host folders when you start the +container: $ docker run -d -p 3000:3000 \ -v /var/lib/grafana:/var/lib/grafana \ -e "GF_SECURITY_ADMIN_PASSWORD=secret \ grafana/grafana:develop -In the above example I map the data folder and set a config option via an `ENV` variable. +In the above example I map the data folder and sets a configuration option via +an `ENV` instruction. ## Configuration -The backend web server has a number of configuration options. Go the [Configuration](/installation/configuration) page for details -on all those options. +The back-end web server has a number of configuration options. Go the +[Configuration](/installation/configuration) page for details on all +those options. diff --git a/docs/sources/installation/index.md b/docs/sources/installation/index.md index 1f9baf7332f..8116a44d2bd 100644 --- a/docs/sources/installation/index.md +++ b/docs/sources/installation/index.md @@ -6,9 +6,12 @@ page_keywords: grafana, installation, documentation # Installation -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 from source](../project/building_from_source) instructions for more information. +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 +from source](../project/building_from_source) instructions for more +information. - [Installing on Debian / Ubuntu](debian.md) - [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](rpm.md) diff --git a/docs/sources/installation/mac.md b/docs/sources/installation/mac.md index a5703b4ed7e..a585b748630 100644 --- a/docs/sources/installation/mac.md +++ b/docs/sources/installation/mac.md @@ -6,7 +6,8 @@ page_keywords: grafana, installation, mac, osx, guide # Installing on Mac -There are currently no binary build for Mac. But read the [build from source](../project/building_from_source) -page for instructions on how to build it yourself. +There is currently no binary build for Mac. But read the [build from +source](../project/building_from_source) page for instructions on how to +build it yourself. diff --git a/docs/sources/installation/migrating_to2.md b/docs/sources/installation/migrating_to2.md index 658f48743af..497b53e77e2 100644 --- a/docs/sources/installation/migrating_to2.md +++ b/docs/sources/installation/migrating_to2.md @@ -31,8 +31,10 @@ can be configured to communicate with your data source using a back-end mode which can eliminate many CORS-related issues, as well as provide more secure authentication to your data sources. -> *Note* When you add your data sources please name them exactly as you named them in `config.js` in Grafana 1.x. That name is referenced by panels -> , annotation and template queries. That way when you import your old dashboard they will work without any changes. +> *Note* When you add your data sources please name them exactly as you +> named them in `config.js` in Grafana 1.x. That name is referenced by +> panels, annotation and template queries. That way when you import +> your old dashboard they will work without any changes. ## Importing your existing dashboards diff --git a/docs/sources/installation/performance.md b/docs/sources/installation/performance.md index ce41e7a0548..6dcc38b5f78 100644 --- a/docs/sources/installation/performance.md +++ b/docs/sources/installation/performance.md @@ -8,9 +8,15 @@ page_keywords: grafana, performance, documentation ## Graphite -Graphite 0.9.13 adds a much needed feature to the json rendering API that is very important for Grafana. If you are experiance slow -load & 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 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). +Graphite 0.9.13 adds a much needed feature to the JSON rendering API +that is very important for Grafana. If you are experiencing slow load & +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 +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). diff --git a/docs/sources/installation/provisioning.md b/docs/sources/installation/provisioning.md index 1520c56f7ec..ea57b0d00dd 100644 --- a/docs/sources/installation/provisioning.md +++ b/docs/sources/installation/provisioning.md @@ -6,8 +6,9 @@ page_keywords: grafana, provisioning, documentation # Provisioning -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. +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 diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index 12f735b6cb6..ab0f5e3be24 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -12,17 +12,18 @@ Description | Download ------------ | ------------- .RPM for Fedora / RHEL / CentOS Linux | [grafana-2.0.2-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-2.0.2-1.x86_64.rpm) -## Install -You can install using yum +## Install from package file + +You can install Grafana using Yum directly. $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-2.0.2-1.x86_64.rpm -Or manually using `rpm` +Or install manually using `rpm`. $ sudo yum install initscripts fontconfig $ sudo rpm -Uvh grafana-2.0.1-1.x86_64.rpm -## YUM Repository +## Install via YUM Repository Add the following to a new file at `/etc/yum.repos.d/grafana.repo` @@ -36,33 +37,43 @@ Add the following to a new file at `/etc/yum.repos.d/grafana.repo` sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt -There is also testing repository if you want beta or release candidates. +There is also a testing repository if you want beta or release +candidates. baseurl=https://packagecloud.io/grafana/testing/el/6/$basearch -Install Grafana +Then install Grafana via the `yum` command. $ sudo yum install grafana ### RPM GPG Key -The rpms are signed, you can verify the signature with this [public GPG key](https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana). + +The RPMs are signed, you can verify the signature with this [public GPG +key](https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana). ## Package details - Installs binary to `/usr/sbin/grafana-server` -- Init.d script to `/etc/init.d/grafana-server` -- Default file (environment vars) to `/etc/sysconfig/grafana-server` -- Configuration file to `/etc/grafana/grafana.ini` -- Systemd service (if systemd is available) name `grafana-server.service` -- The default configuration specifies log file at `/var/log/grafana/grafana.log` -- The default configuration specifies sqlite3 db at `/var/lib/grafana/grafana.db` +- Copies init.d script to `/etc/init.d/grafana-server` +- Installs default file (environment vars) to `/etc/sysconfig/grafana-server` +- Copies configuration file to `/etc/grafana/grafana.ini` +- Installs systemd service (if systemd is available) name `grafana-server.service` +- The default configuration uses a log file at `/var/log/grafana/grafana.log` +- The default configuration specifies an sqlite3 database at `/var/lib/grafana/grafana.db` ## Start the server (init.d service) -- Start grafana by `sudo service grafana-server start` -- This will start the grafana-server process as the `grafana` user (created during package install) -- Default http port is `3000`, and default user is admin/admin -- To configure grafana server to start at boot time: `sudo /sbin/chkconfig --add grafana-server` +You can start Grafana by running: + + $ sudo service grafana-server start + +This will start the `grafana-server` process as the `grafana` user, +which is created during package installation. The default HTTP port is +`3000`, and default user and group is `admin`. + +To configure the Grafana server to start at boot time: + + $ sudo /sbin/chkconfig --add grafana-server ## Start the server (via systemd) @@ -70,29 +81,32 @@ The rpms are signed, you can verify the signature with this [public GPG key](htt $ systemctl start grafana-server $ systemctl status grafana-server -### Enable the systemd service (so grafana starts at boot) +### Enable the systemd service to start at boot sudo systemctl enable grafana-server.service ## Environment file -The systemd service file and init.d script both use the file located at `/etc/sysconfig/grafana-server` for -environment variables used when starting the backend. Here you can override log directory, data directory and other -variables. +The systemd service file and init.d script both use the file located at +`/etc/sysconfig/grafana-server` for environment variables used when +starting the back-end. Here you can override log directory, data +directory and other variables. ### Logging -By default grafana will log to `/var/log/grafana` +By default Grafana will log to `/var/log/grafana` ### Database -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. +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. ## Configuration -The configuration file is located at `/etc/grafana/grafana.ini`. Go the [Configuration](/installation/configuration) page for details -on all those options. +The configuration file is located at `/etc/grafana/grafana.ini`. Go the +[Configuration](/installation/configuration) page for details on all +those options. ### Adding data sources diff --git a/docs/sources/installation/windows.md b/docs/sources/installation/windows.md index 51d2101ec0d..97d128f61a0 100644 --- a/docs/sources/installation/windows.md +++ b/docs/sources/installation/windows.md @@ -13,21 +13,30 @@ Description | Download Zip package for Windows | [grafana.2.0.2.windows-x64.zip](https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-2.0.2.windows-x64.zip) ## Configure -The zip file contains a folder with the current Grafana version. Extract this folder to anywhere you want Grafana to run from. -Go into the `conf` directory and copy `sample.ini` to `custom.ini`. You should edit `custom.ini`, never `defaults.ini`. -The default Grafana port is `3000`, this port requires extra permissions on windows. Edit `custom.ini` and uncomment the `http_port` -configuration option and change it to something like `8080` or similar. That port should not require extra Windows privileges. +The zip file contains a folder with the current Grafana version. Extract +this folder to anywhere you want Grafana to run from. Go into the +`conf` directory and copy `sample.ini` to `custom.ini`. You should edit +`custom.ini`, never `defaults.ini`. -Start Grafana by executing `grafana-server.exe`, preferably from the command line. If you want to run Grafana as -windows service, download [NSSM](https://nssm.cc/). It is very easy add Grafana as a Windows service using that tool. +The default Grafana port is `3000`, this port requires extra permissions +on windows. Edit `custom.ini` and uncomment the `http_port` +configuration option and change it to something like `8080` or similar. +That port should not require extra Windows privileges. + +Start Grafana by executing `grafana-server.exe`, preferably from the +command line. If you want to run Grafana as windows service, download +[NSSM](https://nssm.cc/). It is very easy add Grafana as a Windows +service using that tool. Read more about the [configuration options](/installation/configuration). ## Building on Windows -The Grafana backend includes Sqlite3 which requires GCC to compile. So in order to compile Grafana on Windows you need -to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download). +The Grafana backend includes Sqlite3 which requires GCC to compile. So +in order to compile Grafana on Windows you need to install GCC. We +recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download). -Copy `conf/sample.ini` to a file named `conf/custom.ini` and change the web server port to something like 8080. The default -Grafana port, 3000, requires special privileges on Windows. +Copy `conf/sample.ini` to a file named `conf/custom.ini` and change the +web server port to something like 8080. The default Grafana port, 3000, +requires special privileges on Windows.