mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into postgres-query-builder
This commit is contained in:
commit
4acf4f9d36
@ -1,5 +1,6 @@
|
||||
# 5.3.0 (unreleased)
|
||||
|
||||
* **OAuth**: Gitlab OAuth with support for filter by groups [#5623](https://github.com/grafana/grafana/issues/5623), thx [@BenoitKnecht](https://github.com/BenoitKnecht)
|
||||
* **Dataproxy**: Pass configured/auth headers to a Datasource [#10971](https://github.com/grafana/grafana/issues/10971), thx [@mrsiano](https://github.com/mrsiano)
|
||||
* **Cleanup**: Make temp file time to live configurable [#11607](https://github.com/grafana/grafana/issues/11607), thx [@xapon](https://github.com/xapon)
|
||||
* **LDAP**: Define Grafana Admin permission in ldap group mappings [#2469](https://github.com/grafana/grafana/issues/2496), PR [#12622](https://github.com/grafana/grafana/issues/12622)
|
||||
|
@ -115,6 +115,8 @@ and `dimension keys/values`.
|
||||
In place of `region` you can specify `default` to use the default region configured in the datasource for the query,
|
||||
e.g. `metrics(AWS/DynamoDB, default)` or `dimension_values(default, ..., ..., ...)`.
|
||||
|
||||
Read more about the available dimensions in the [CloudWatch Metrics and Dimensions Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html).
|
||||
|
||||
Name | Description
|
||||
------- | --------
|
||||
*regions()* | Returns a list of regions AWS provides their service.
|
||||
|
@ -59,7 +59,6 @@ Content-Type: application/json
|
||||
"panelId": 1,
|
||||
"name": "fire place sensor",
|
||||
"state": "alerting",
|
||||
"message": "Someone is trying to break in through the fire place",
|
||||
"newStateDate": "2018-05-14T05:55:20+02:00",
|
||||
"evalDate": "0001-01-01T00:00:00Z",
|
||||
"evalData": null,
|
||||
|
@ -85,7 +85,7 @@ Status Codes:
|
||||
- **403** – Access denied
|
||||
- **412** – Precondition failed
|
||||
|
||||
The **412** status code is used for explaing that you cannot create the dashboard and why.
|
||||
The **412** status code is used for explaining that you cannot create the dashboard and why.
|
||||
There can be different reasons for this:
|
||||
|
||||
- The dashboard has been changed by someone else, `status=version-mismatch`
|
||||
|
@ -223,7 +223,7 @@ Status Codes:
|
||||
- **404** – Folder not found
|
||||
- **412** – Precondition failed
|
||||
|
||||
The **412** status code is used for explaing that you cannot update the folder and why.
|
||||
The **412** status code is used for explaining that you cannot update the folder and why.
|
||||
There can be different reasons for this:
|
||||
|
||||
- The folder has been changed by someone else, `status=version-mismatch`
|
||||
|
@ -38,6 +38,8 @@ The back-end web server has a number of configuration options. Go to the
|
||||
[Configuration]({{< relref "configuration.md" >}}) page for details on all
|
||||
those options.
|
||||
|
||||
> For any changes to `conf/grafana.ini` (or corresponding environment variables) to take effect you need to restart Grafana by restarting the Docker container.
|
||||
|
||||
## Running a Specific Version of Grafana
|
||||
|
||||
```bash
|
||||
@ -49,10 +51,13 @@ $ docker run \
|
||||
grafana/grafana:5.1.0
|
||||
```
|
||||
|
||||
## Running of the master branch
|
||||
## Running the master branch
|
||||
|
||||
For every successful commit we publish a Grafana container to [`grafana/grafana`](https://hub.docker.com/r/grafana/grafana/tags/) and [`grafana/grafana-dev`](https://hub.docker.com/r/grafana/grafana-dev/tags/). In `grafana/grafana` container we will always overwrite the `master` tag with the latest version. In `grafana/grafana-dev` we will include
|
||||
the git commit in the tag. If you run Grafana master in production we **strongly** recommend that you use the later since different machines might run different version of grafana if they pull the master tag at different times.
|
||||
For every successful build of the master branch we update the `grafana/grafana:master` tag and create a new tag `grafana/grafana-dev:master-<commit hash>` with the hash of the git commit that was built. This means you can always get the latest version of Grafana.
|
||||
|
||||
When running Grafana master in production we **strongly** recommend that you use the `grafana/grafana-dev:master-<commit hash>` tag as that will guarantee that you use a specific version of Grafana instead of whatever was the most recent commit at the time.
|
||||
|
||||
For a list of available tags, check out [grafana/grafana](https://hub.docker.com/r/grafana/grafana/tags/) and [grafana/grafana-dev](https://hub.docker.com/r/grafana/grafana-dev/tags/).
|
||||
|
||||
## Installing Plugins for Grafana
|
||||
|
||||
|
@ -15,10 +15,10 @@ fi
|
||||
echo "pushing ${_docker_repo}:${_grafana_version}"
|
||||
docker push "${_docker_repo}:${_grafana_version}"
|
||||
|
||||
if echo "$_grafana_tag" | grep -q "^v"; then
|
||||
if echo "$_grafana_tag" | grep -q "^v" && echo "$_grafana_tag" | grep -vq "beta"; then
|
||||
echo "pushing ${_docker_repo}:latest"
|
||||
docker push "${_docker_repo}:latest"
|
||||
else
|
||||
elif echo "$_grafana_tag" | grep -q "master"; then
|
||||
echo "pushing grafana/grafana:master"
|
||||
docker push grafana/grafana:master
|
||||
fi
|
||||
|
@ -203,6 +203,7 @@ func (proxy *DataSourceProxy) getDirector() func(req *http.Request) {
|
||||
req.Header.Del("X-Forwarded-Host")
|
||||
req.Header.Del("X-Forwarded-Port")
|
||||
req.Header.Del("X-Forwarded-Proto")
|
||||
req.Header.Set("User-Agent", fmt.Sprintf("Grafana/%s", setting.BuildVersion))
|
||||
|
||||
// set X-Forwarded-For header
|
||||
if req.RemoteAddr != "" {
|
||||
|
@ -212,20 +212,21 @@ func TestDSRouteRule(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("When proxying graphite", func() {
|
||||
setting.BuildVersion = "5.3.0"
|
||||
plugin := &plugins.DataSourcePlugin{}
|
||||
ds := &m.DataSource{Url: "htttp://graphite:8080", Type: m.DS_GRAPHITE}
|
||||
ctx := &m.ReqContext{}
|
||||
|
||||
proxy := NewDataSourceProxy(ds, plugin, ctx, "/render")
|
||||
req, err := http.NewRequest(http.MethodGet, "http://grafana.com/sub", nil)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
requestURL, _ := url.Parse("http://grafana.com/sub")
|
||||
req := http.Request{URL: requestURL}
|
||||
|
||||
proxy.getDirector()(&req)
|
||||
proxy.getDirector()(req)
|
||||
|
||||
Convey("Can translate request url and path", func() {
|
||||
So(req.URL.Host, ShouldEqual, "graphite:8080")
|
||||
So(req.URL.Path, ShouldEqual, "/render")
|
||||
So(req.Header.Get("User-Agent"), ShouldEqual, "Grafana/5.3.0")
|
||||
})
|
||||
})
|
||||
|
||||
@ -243,10 +244,10 @@ func TestDSRouteRule(t *testing.T) {
|
||||
ctx := &m.ReqContext{}
|
||||
proxy := NewDataSourceProxy(ds, plugin, ctx, "")
|
||||
|
||||
requestURL, _ := url.Parse("http://grafana.com/sub")
|
||||
req := http.Request{URL: requestURL}
|
||||
req, err := http.NewRequest(http.MethodGet, "http://grafana.com/sub", nil)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
proxy.getDirector()(&req)
|
||||
proxy.getDirector()(req)
|
||||
|
||||
Convey("Should add db to url", func() {
|
||||
So(req.URL.Path, ShouldEqual, "/db/site/")
|
||||
|
@ -1,67 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
PERMISSIONS_OK=0
|
||||
|
||||
if [ ! -r "$GF_PATHS_CONFIG" ]; then
|
||||
echo "GF_PATHS_CONFIG='$GF_PATHS_CONFIG' is not readable."
|
||||
PERMISSIONS_OK=1
|
||||
fi
|
||||
|
||||
if [ ! -w "$GF_PATHS_DATA" ]; then
|
||||
echo "GF_PATHS_DATA='$GF_PATHS_DATA' is not writable."
|
||||
PERMISSIONS_OK=1
|
||||
fi
|
||||
|
||||
if [ ! -r "$GF_PATHS_HOME" ]; then
|
||||
echo "GF_PATHS_HOME='$GF_PATHS_HOME' is not readable."
|
||||
PERMISSIONS_OK=1
|
||||
fi
|
||||
|
||||
if [ $PERMISSIONS_OK -eq 1 ]; then
|
||||
echo "You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later"
|
||||
fi
|
||||
|
||||
if [ ! -d "$GF_PATHS_PLUGINS" ]; then
|
||||
mkdir "$GF_PATHS_PLUGINS"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -z ${GF_AWS_PROFILES+x} ]; then
|
||||
> "$GF_PATHS_HOME/.aws/credentials"
|
||||
|
||||
for profile in ${GF_AWS_PROFILES}; do
|
||||
access_key_varname="GF_AWS_${profile}_ACCESS_KEY_ID"
|
||||
secret_key_varname="GF_AWS_${profile}_SECRET_ACCESS_KEY"
|
||||
region_varname="GF_AWS_${profile}_REGION"
|
||||
|
||||
if [ ! -z "${!access_key_varname}" -a ! -z "${!secret_key_varname}" ]; then
|
||||
echo "[${profile}]" >> "$GF_PATHS_HOME/.aws/credentials"
|
||||
echo "aws_access_key_id = ${!access_key_varname}" >> "$GF_PATHS_HOME/.aws/credentials"
|
||||
echo "aws_secret_access_key = ${!secret_key_varname}" >> "$GF_PATHS_HOME/.aws/credentials"
|
||||
if [ ! -z "${!region_varname}" ]; then
|
||||
echo "region = ${!region_varname}" >> "$GF_PATHS_HOME/.aws/credentials"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
chmod 600 "$GF_PATHS_HOME/.aws/credentials"
|
||||
fi
|
||||
|
||||
if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then
|
||||
OLDIFS=$IFS
|
||||
IFS=','
|
||||
for plugin in ${GF_INSTALL_PLUGINS}; do
|
||||
IFS=$OLDIFS
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}
|
||||
done
|
||||
fi
|
||||
|
||||
exec grafana-server \
|
||||
--homepath="$GF_PATHS_HOME" \
|
||||
--config="$GF_PATHS_CONFIG" \
|
||||
"$@" \
|
||||
cfg:default.log.mode="console" \
|
||||
cfg:default.paths.data="$GF_PATHS_DATA" \
|
||||
cfg:default.paths.logs="$GF_PATHS_LOGS" \
|
||||
cfg:default.paths.plugins="$GF_PATHS_PLUGINS" \
|
||||
cfg:default.paths.provisioning="$GF_PATHS_PROVISIONING"
|
Loading…
Reference in New Issue
Block a user