diff --git a/.editorconfig b/.editorconfig
index 146224e7330..84bbaf8a420 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,6 +7,8 @@ indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+max_line_length = 120
+insert_final_newline = true
[*.go]
indent_style = tab
diff --git a/.gitignore b/.gitignore
index 12e7bed3f46..deb1c1f882a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,3 +60,4 @@ debug.test
/vendor/**/*_test.go
/vendor/**/.editorconfig
/vendor/**/appengine*
+*.orig
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb0d2e026b9..da4fe019959 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,8 @@ Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w:
Config files for provisioning datasources as configuration have changed from `/conf/datasources` to `/conf/provisioning/datasources`.
From `/etc/grafana/datasources` to `/etc/grafana/provisioning/datasources` when installed with deb/rpm packages.
+The pagerduty notifier now defaults to not auto resolve incidents. More details at [#10222](https://github.com/grafana/grafana/issues/10222)
+
## New Features
* **Data Source Proxy**: Add support for whitelisting specified cookies that will be passed through to the data source when proxying data source requests [#5457](https://github.com/grafana/grafana/issues/5457), thanks [@robingustafsson](https://github.com/robingustafsson)
* **Postgres/MySQL**: add __timeGroup macro for mysql [#9596](https://github.com/grafana/grafana/pull/9596), thanks [@svenklemm](https://github.com/svenklemm)
@@ -36,6 +38,7 @@ From `/etc/grafana/datasources` to `/etc/grafana/provisioning/datasources` when
* **Dashboard as cfg**: Load dashboards from file into Grafana on startup/change [#9654](https://github.com/grafana/grafana/issues/9654) [#5269](https://github.com/grafana/grafana/issues/5269)
* **Prometheus**: Grafana can now send alerts to Prometheus Alertmanager while firing [#7481](https://github.com/grafana/grafana/issues/7481), thx [@Thib17](https://github.com/Thib17) and [@mtanda](https://github.com/mtanda)
* **Table**: Support multiple table formated queries in table panel [#9170](https://github.com/grafana/grafana/issues/9170), thx [@davkal](https://github.com/davkal)
+
## Minor
* **Alert panel**: Adds placeholder text when no alerts are within the time range [#9624](https://github.com/grafana/grafana/issues/9624), thx [@straend](https://github.com/straend)
* **Mysql**: MySQL enable MaxOpenCon and MaxIdleCon regards how constring is configured. [#9784](https://github.com/grafana/grafana/issues/9784), thx [@dfredell](https://github.com/dfredell)
@@ -46,6 +49,8 @@ From `/etc/grafana/datasources` to `/etc/grafana/provisioning/datasources` when
* **Github**: Use organizations_url provided from github to verify user belongs in org. [#10111](https://github.com/grafana/grafana/issues/10111), thx
[@adiletmaratov](https://github.com/adiletmaratov)
* **Backend**: Fixed bug where Grafana exited before all sub routines where finished [#10131](https://github.com/grafana/grafana/issues/10131)
+* **Azure**: Adds support for Azure blob storage as external image stor [#8955](https://github.com/grafana/grafana/issues/8955), thx [@saada](https://github.com/saada)
+* **Telegram**: Add support for inline image uploads to telegram notifier plugin [#9967](https://github.com/grafana/grafana/pull/9967), thx [@rburchell](https://github.com/rburchell)
## Tech
* **RabbitMq**: Remove support for publishing events to RabbitMQ [#9645](https://github.com/grafana/grafana/issues/9645)
@@ -55,6 +60,7 @@ From `/etc/grafana/datasources` to `/etc/grafana/provisioning/datasources` when
* **Sensu**: Send alert message to sensu output [#9551](https://github.com/grafana/grafana/issues/9551), thx [@cjchand](https://github.com/cjchand)
* **Singlestat**: suppress error when result contains no datapoints [#9636](https://github.com/grafana/grafana/issues/9636), thx [@utkarshcmu](https://github.com/utkarshcmu)
* **Postgres/MySQL**: Control quoting in SQL-queries when using template variables [#9030](https://github.com/grafana/grafana/issues/9030), thanks [@svenklemm](https://github.com/svenklemm)
+* **Pagerduty**: Pagerduty dont auto resolve incidents by default anymore. [#10222](https://github.com/grafana/grafana/issues/10222)
# 4.6.3 (2017-12-14)
diff --git a/conf/defaults.ini b/conf/defaults.ini
index e16ef95178a..4e2929096a6 100644
--- a/conf/defaults.ini
+++ b/conf/defaults.ini
@@ -473,7 +473,7 @@ sampler_param = 1
#################################### External Image Storage ##############
[external_image_storage]
-# You can choose between (s3, webdav, gcs)
+# You can choose between (s3, webdav, gcs, azure_blob)
provider =
[external_image_storage.s3]
@@ -493,4 +493,9 @@ public_url =
[external_image_storage.gcs]
key_file =
bucket =
-path =
\ No newline at end of file
+path =
+
+[external_image_storage.azure_blob]
+account_name =
+account_key =
+container_name =
diff --git a/conf/sample.ini b/conf/sample.ini
index 544fa7e0c7d..d297d2db66a 100644
--- a/conf/sample.ini
+++ b/conf/sample.ini
@@ -417,7 +417,7 @@ log_queries =
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
-# you can choose between (s3, webdav, gcs)
+# you can choose between (s3, webdav, gcs, azure_blob)
;provider =
[external_image_storage.s3]
@@ -436,4 +436,9 @@ log_queries =
[external_image_storage.gcs]
;key_file =
;bucket =
-;path =
\ No newline at end of file
+;path =
+
+[external_image_storage.azure_blob]
+;account_name =
+;account_key =
+;container_name =
diff --git a/docker/blocks/apache_proxy/Dockerfile b/docker/blocks/apache_proxy/Dockerfile
new file mode 100644
index 00000000000..37c2a4e493b
--- /dev/null
+++ b/docker/blocks/apache_proxy/Dockerfile
@@ -0,0 +1,4 @@
+FROM jmferrer/apache2-reverse-proxy:latest
+
+COPY ports.conf /etc/apache2/sites-enabled
+COPY proxy.conf /etc/apache2/sites-enabled
\ No newline at end of file
diff --git a/docker/blocks/apache_proxy/docker-compose.yaml b/docker/blocks/apache_proxy/docker-compose.yaml
new file mode 100644
index 00000000000..2aec3d4bc4f
--- /dev/null
+++ b/docker/blocks/apache_proxy/docker-compose.yaml
@@ -0,0 +1,9 @@
+# This will proxy all requests for http://localhost:10081/grafana/ to
+# http://localhost:3000 (Grafana running locally)
+#
+# Please note that you'll need to change the root_url in the Grafana configuration:
+# root_url = %(protocol)s://%(domain)s:/grafana/
+
+ apacheproxy:
+ build: blocks/apache_proxy
+ network_mode: host
diff --git a/docker/blocks/apache_proxy/ports.conf b/docker/blocks/apache_proxy/ports.conf
new file mode 100644
index 00000000000..e7a5f9712af
--- /dev/null
+++ b/docker/blocks/apache_proxy/ports.conf
@@ -0,0 +1 @@
+Listen 10081
\ No newline at end of file
diff --git a/docker/blocks/apache_proxy/proxy.conf b/docker/blocks/apache_proxy/proxy.conf
new file mode 100644
index 00000000000..5eb35cbe8b9
--- /dev/null
+++ b/docker/blocks/apache_proxy/proxy.conf
@@ -0,0 +1,4 @@
+
+ ProxyPass /grafana/ http://localhost:3000/
+ ProxyPassReverse /grafana/ http://localhost:3000/
+
\ No newline at end of file
diff --git a/docker/blocks/nginx_proxy/Dockerfile b/docker/blocks/nginx_proxy/Dockerfile
new file mode 100644
index 00000000000..9ded20dfdda
--- /dev/null
+++ b/docker/blocks/nginx_proxy/Dockerfile
@@ -0,0 +1,3 @@
+FROM nginx:alpine
+
+COPY nginx.conf /etc/nginx/nginx.conf
\ No newline at end of file
diff --git a/docker/blocks/nginx_proxy/docker-compose.yaml b/docker/blocks/nginx_proxy/docker-compose.yaml
new file mode 100644
index 00000000000..7c3447ade5c
--- /dev/null
+++ b/docker/blocks/nginx_proxy/docker-compose.yaml
@@ -0,0 +1,9 @@
+# This will proxy all requests for http://localhost:10080/grafana/ to
+# http://localhost:3000 (Grafana running locally)
+#
+# Please note that you'll need to change the root_url in the Grafana configuration:
+# root_url = %(protocol)s://%(domain)s:/grafana/
+
+ nginxproxy:
+ build: blocks/nginx_proxy
+ network_mode: host
diff --git a/docker/blocks/nginx_proxy/nginx.conf b/docker/blocks/nginx_proxy/nginx.conf
new file mode 100644
index 00000000000..18e27b3fb01
--- /dev/null
+++ b/docker/blocks/nginx_proxy/nginx.conf
@@ -0,0 +1,19 @@
+events { worker_connections 1024; }
+
+http {
+ sendfile on;
+
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Host $server_name;
+
+ server {
+ listen 10080;
+
+ location /grafana/ {
+ proxy_pass http://localhost:3000/;
+ }
+ }
+}
\ No newline at end of file
diff --git a/docs/sources/administration/cli.md b/docs/sources/administration/cli.md
index 2be1881cfab..3dc9b0cf3b4 100644
--- a/docs/sources/administration/cli.md
+++ b/docs/sources/administration/cli.md
@@ -10,17 +10,17 @@ weight = 8
# Grafana CLI
-Grafana cli is a small executable that is bundled with grafana server and is suppose to be executed on the same machine as grafana runs.
+Grafana cli is a small executable that is bundled with Grafana-server and is supposed to be executed on the same machine Grafana-server is running on.
## Plugins
-The CLI helps you install, upgrade and manage your plugins on the same machine it CLI is running.
-You can find more information about how to install and manage your plugins at the
-[plugin page]({{< relref "plugins/installation.md" >}}).
+The CLI allows you to install, upgrade and manage your plugins on the machine it is running on.
+You can find more information about how to install and manage your plugins in the
+[plugins page]({{< relref "plugins/installation.md" >}}).
## Admin
-> This feature is only available in grafana 4.1 and above.
+> This feature is only available in Grafana 4.1 and above.
To show all admin commands:
`grafana-cli admin`
@@ -39,7 +39,7 @@ then there are two flags that can be used to set homepath and the config file pa
`grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" newpass`
-If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example with curl using basic auth:
+If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example using curl with basic auth:
```bash
curl -X PUT -H "Content-Type: application/json" -d '{
diff --git a/docs/sources/administration/metrics.md b/docs/sources/administration/metrics.md
index 56d0290bc82..5eed2b7ce15 100644
--- a/docs/sources/administration/metrics.md
+++ b/docs/sources/administration/metrics.md
@@ -10,6 +10,6 @@ weight = 8
# Internal metrics
-Grafana collects some metrics about it self internally. Currently Grafana supports pushing metrics to graphite and exposing them to be scraped by Prometheus.
+Grafana collects some metrics about itself internally. Currently, Grafana supports pushing metrics to Graphite or exposing them to be scraped by Prometheus.
-To enabled internal metrics you have to enable it under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file.If you want to push metrics to graphite you have also have to configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.
+To emit internal metrics you have to enable the option under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file. If you want to push metrics to Graphite, you must also configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.
diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md
index 3dd5c5fd1d3..0750131d42f 100644
--- a/docs/sources/administration/provisioning.md
+++ b/docs/sources/administration/provisioning.md
@@ -12,7 +12,7 @@ weight = 8
## Config file
-Checkout the [configuration](/installation/configuration) page for more information about what you can configure in `grafana.ini`
+Checkout the [configuration](/installation/configuration) page for more information on what you can configure in `grafana.ini`
### Config file locations
@@ -35,7 +35,7 @@ GF__
```
Where the section name is the text within the brackets. Everything
-should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
+should be upper case and `.` should be replaced by `_`. For example, given these configuration settings:
```bash
# default section
@@ -48,7 +48,7 @@ admin_user = admin
client_secret = 0ldS3cretKey
```
-Then you can override them using:
+Overriding will be done like so:
```bash
export GF_DEFAULT_INSTANCE_NAME=my-instance
@@ -60,7 +60,7 @@ export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
## Configuration management tools
-Currently we do not provide any scripts/manifests for configuring Grafana. Rather then spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefor, we heavily relay on the expertise of he community.
+Currently we do not provide any scripts/manifests for configuring Grafana. Rather than spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefore, we heavily relay on the expertise of the community.
Tool | Project
-----|------------
@@ -70,14 +70,14 @@ Ansible | [https://github.com/picotrading/ansible-grafana](https://github.com/pi
Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana)
-## Datasources
+## Datasources
> This feature is available from v5.0
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `delete_datasources`. Grafana will delete datasources listed in `delete_datasources` before inserting/updating those in the `datasource` list.
-### Running multiple grafana instances.
-If you are running multiple instances of Grafana you might run into problems if they have different versions of the datasource.yaml configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way old configs cannot overwrite newer configs if they restart at the same time.
+### Running multiple Grafana instances.
+If you are running multiple instances of Grafana you might run into problems if they have different versions of the `datasource.yaml` configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way, old configs cannot overwrite newer configs if they restart at the same time.
### Example datasource config file
```yaml
@@ -86,7 +86,7 @@ delete_datasources:
- name: Graphite
org_id: 1
-# list of datasources to insert/update depending
+# list of datasources to insert/update depending
# whats available in the datbase
datasources:
# name of the datasource. Required
@@ -116,7 +116,7 @@ datasources:
# mark as default datasource. Max one per org
is_default:
#