Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/master'
Browse files Browse the repository at this point in the history
* grafana/master:
  prom_docker: give targets correct job name
  testdata: add bucket scenarios for heatmap
  dev-docker: add grafana as target
  changelog: add note ablout closing grafana#9319
  introduce smtp config option for EHLO identity
  changelog: note about closing grafana#9250
  go fmt
  docs: update docs
  allow ssl renegotiation for datasources
  • Loading branch information
ryantxu committed Sep 25, 2017
2 parents cdae904 + ff108bd commit 00ad8e7
Show file tree
Hide file tree
Showing 19 changed files with 174 additions and 54 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
* **Graph**: Add support for local formating in axis. [#1395](https://github.com/grafana/grafana/issues/1395), thx [@m0nhawk](https://github.com/m0nhawk)
* **Jaeger**: Add support for open tracing using jaeger in Grafana. [#9213](https://github.com/grafana/grafana/pull/9213)
* **Unit types**: New date & time unit types added, useful in singlestat to show dates & times. [#3678](https://github.com/grafana/grafana/issues/3678), [#6710](https://github.com/grafana/grafana/issues/6710), [#2764](https://github.com/grafana/grafana/issues/6710)
* **Cli**: Make it possible to install plugins from any url [#5873](https://github.com/grafana/grafana/issues/5873)
* **CLI**: Make it possible to install plugins from any url [#5873](https://github.com/grafana/grafana/issues/5873)

## Minor
* **SMTP**: Make it possible to set specific EHLO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
* **Dataproxy**: Allow grafan to renegotiate tls connection [#9250](https://github.com/grafana/grafana/issues/9250)

# 4.5.2 (2017-09-22)

Expand Down
1 change: 1 addition & 0 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ key_file =
skip_verify = false
from_address = admin@grafana.localhost
from_name = Grafana
ehlo_identity =

[emails]
welcome_email_on_sign_up = false
Expand Down
2 changes: 2 additions & 0 deletions conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@
;skip_verify = false
;from_address = admin@grafana.localhost
;from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com

[emails]
;welcome_email_on_sign_up = false
Expand Down
25 changes: 12 additions & 13 deletions docker/blocks/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@ alerting:
- targets:
- "127.0.0.1:9093"


# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']

# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 10s
scrape_timeout: 10s

# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.

- job_name: 'node_exporter'
static_configs:
- targets: ['127.0.0.1:9100']

- job_name: 'fake-data-gen'
static_configs:
- targets: ['127.0.0.1:9091']

- job_name: 'grafana'
static_configs:
#- targets: ['localhost:9090', '172.17.0.1:9091', '172.17.0.1:9100', '172.17.0.1:9150']
- targets: ['localhost:9090', '127.0.0.1:9091', '127.0.0.1:9100', '127.0.0.1:9150']
- targets: ['127.0.0.1:3000']
2 changes: 1 addition & 1 deletion docs/sources/features/panels/dashlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ weight = 4

# Dashboard List Panel

<img class="no-shadow" src="/img/docs/v45/dashboard-list-panels.png">
{{< docs-imagebox img="/img/docs/v45/dashboard-list-panels.png" max-width= "800px" >}}

The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, recently viewed dashboards, a search query and/or dashboard tags.

Expand Down
15 changes: 8 additions & 7 deletions docs/sources/features/panels/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ weight = 1

The main panel in Grafana is simply named Graph. It provides a very rich set of graphing options.

<img src="/img/docs/v45/graph_overview.png" class="no-shadow">
{{< docs-imagebox img="/img/docs/v45/graph_overview.png" class="docs-image--no-shadow" max-width= "900px" >}}

1. Clicking the title for a panel exposes a menu. The `edit` option opens additional configuration
options for the panel.
1. Clicking the title for a panel exposes a menu. The `edit` option opens additional configuration options for the panel.
2. Click to open color & axis selection.
3. Click to only show this series. Shift/Ctrl + click to hide series.

## General

![](/img/docs/v43/graph_general.png)
{{< docs-imagebox img="/img/docs/v43/graph_general.png" max-width= "900px" >}}

The general tab allows customization of a panel's appearance and menu options.

Expand Down Expand Up @@ -54,7 +53,7 @@ options.

## Axes

![](/img/docs/v43/graph_axes_grid_options.png)
{{< docs-imagebox img="/img/docs/v43/graph_axes_grid_options.png" max-width= "900px" >}}

The Axes tab controls the display of axes, grids and legend. The ``Left Y`` and ``Right Y`` can be customized using:

Expand Down Expand Up @@ -103,7 +102,7 @@ It is just the sum of all data points received by Grafana.

## Display styles

![](/img/docs/v43/graph_display_styles.png)
{{< docs-imagebox img="/img/docs/v43/graph_display_styles.png" max-width= "900px" >}}

Display styles control visual properties of the graph.

Expand Down Expand Up @@ -158,4 +157,6 @@ There is an option under Series overrides to draw lines as dashes. Set Dashes to

## Time Range

<img src="/img/docs/v45/graph-time-range.png" class="no-shadow">
The time range tab allows you to override the dashboard time range and specify a panel specific time. Either through a relative from now time option or through a timeshift.

{{< docs-imagebox img="/img/docs/v45/graph-time-range.png" max-width= "900px" >}}
10 changes: 8 additions & 2 deletions docs/sources/features/panels/singlestat.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ weight = 2

# Singlestat Panel

{{< docs-imagebox img="/img/docs/v45/singlestat-panel.png" class="docs-image--no-shadow">}}
{{< docs-imagebox img="/img/docs/v45/singlestat-panel.png" max-width="900px" >}}

The Singlestat Panel allows you to show the one main summary stat of a SINGLE series. It reduces the series into a single number (by looking at the max, min, average, or sum of values in the series). Singlestat also provides thresholds to color the stat or the Panel background. It can also translate the single number into a text value, and show a sparkline summary of the series.

### Singlestat Panel Configuration

The singlestat panel has a normal query editor to allow you define your exact metric queries like many other Panels. Through the Options tab, you can access the Singlestat-specific functionality.

<img class="no-shadow" src="/img/docs/v45/singlestat-value-options.png">
{{< docs-imagebox img="/img/docs/v45/singlestat-value-options.png" class="docs-image--no-shadow" max-width= "900px" >}}

1. `Stats`: The Stats field let you set the function (min, max, average, current, total, first, delta, range) that your entire query is reduced into a single value with. This reduces the entire query into a single summary value that is displayed.
* `min` - The smallest value in the series
Expand Down Expand Up @@ -60,6 +60,8 @@ Sparklines are a great way of seeing the historical data related to the summary
3. `Line Color`: This color selection applies to the color of the sparkline itself.
4. `Fill Color`: This color selection applies to the area below the sparkline.

<div class="clearfix"></div>

> ***Pro-tip:*** Reduce the opacity on fill colors for nice looking panels.
### Gauge
Expand All @@ -73,12 +75,16 @@ Gauges gives a clear picture of how high a value is in it's context. It's a grea
3. `Threshold Labels`: Check if you want to show the threshold labels. Thresholds are set in the color options.
4. `Threshold Markers`: Check if you want to have a second meter showing the thresholds.

<div class="clearfix"></div>

### Value to text mapping

{{< docs-imagebox img="/img/docs/v45/singlestat-value-mapping.png" class="docs-image--right docs-image--no-shadow">}}

Value to text mapping allows you to translate the value of the summary stat into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the number of the main Singlestat value into a context-specific human-readable word or message.

<div class="clearfix"></div>

## Troubleshooting

### Multiple Series Error
Expand Down
1 change: 1 addition & 0 deletions docs/sources/http_api/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Only works with Basic Authentication (username and password). See [introduction]
"enabled":"false",
"from_address":"admin@grafana.localhost",
"from_name":"Grafana",
"ehlo_identity":"dashboard.example.com",
"host":"localhost:25",
"key_file":"",
"password":"************",
Expand Down
3 changes: 3 additions & 0 deletions docs/sources/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@ Address used when sending out emails, defaults to `admin@grafana.localhost`
### from_name
Name to be used when sending out emails, defaults to `Grafana`

### ehlo_identity
Name to be used as client identity for EHLO in SMTP dialog, defaults to instance_name.

## [log]

### mode
Expand Down
10 changes: 5 additions & 5 deletions docs/sources/installation/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ weight = 1

Description | Download
------------ | -------------
Stable for Debian-based Linux | [grafana_4.5.1_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.1_amd64.deb)
Stable for Debian-based Linux | [grafana_4.5.2_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.2_amd64.deb)

<!-- Beta for Debian-based Linux | [grafana_4.5.0-beta1_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.0-beta1_amd64.deb) -->

Expand All @@ -26,18 +26,18 @@ installation.


```bash
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.1_amd64.deb
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.2_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_4.5.1_amd64.deb
sudo dpkg -i grafana_4.5.2_amd64.deb
```

<!--
## Install Latest Beta
```bash
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.0-beta1_amd64.deb
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.2-beta1_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_4.5.0-beta1_amd64.deb
sudo dpkg -i grafana_4.5.2-beta1_amd64.deb
```
-->

Expand Down
32 changes: 32 additions & 0 deletions docs/sources/installation/mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,35 @@ To upgrade grafana if you've installed from HEAD:
```
brew reinstall --HEAD grafana/grafana/grafana
```

### Starting Grafana

To start Grafana using homebrew services first make sure homebrew/services is installed.

```
brew tap homebrew/services
```

Then start Grafana using:

```
brew services start grafana
```


### Configuration

The Configuration file should be located at `/usr/local/etc/grafana/grafana.ini`.

### Logs

The log file should be located at `/usr/local/var/log/grafana/grafana.log`.

### Plugins

If you want to manually install a plugin place it here: `/usr/local/var/lib/grafana/plugins`.

### Database

The default sqlite database is located at `/usr/local/var/lib/grafana`

10 changes: 5 additions & 5 deletions docs/sources/installation/rpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ weight = 2

Description | Download
------------ | -------------
Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [4.5.1 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.1-1.x86_64.rpm)
Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [4.5.2 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.2-1.x86_64.rpm)

<!-- Latest Beta for CentOS / Fedora / OpenSuse / Redhat Linux | [4.5.0-beta1 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.0-beta1.x86_64.rpm) -->

Expand All @@ -26,19 +26,19 @@ installation.

You can install Grafana using Yum directly.

$ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.1-1.x86_64.rpm
$ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.2-1.x86_64.rpm

Or install manually using `rpm`.

#### On CentOS / Fedora / Redhat:

$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.1-1.x86_64.rpm
$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.2-1.x86_64.rpm
$ sudo yum install initscripts fontconfig
$ sudo rpm -Uvh grafana-4.5.1-1.x86_64.rpm
$ sudo rpm -Uvh grafana-4.5.2-1.x86_64.rpm

#### On OpenSuse:

$ sudo rpm -i --nodeps grafana-4.5.1-1.x86_64.rpm
$ sudo rpm -i --nodeps grafana-4.5.2-1.x86_64.rpm

## Install via YUM Repository

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ weight = 3

Description | Download
------------ | -------------
Latest stable package for Windows | [grafana.4.5.1.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.1.windows-x64.zip)
Latest stable package for Windows | [grafana.4.5.2.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.2.windows-x64.zip)

Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
installation.
Expand Down
14 changes: 7 additions & 7 deletions packaging/publish/publish_both.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env bash
version=4.5.1
version=4.5.2

wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${version}_amd64.deb

Expand All @@ -8,15 +8,15 @@ package_cloud push grafana/stable/debian/wheezy grafana_${version}_amd64.deb
package_cloud push grafana/stable/debian/stretch grafana_${version}_amd64.deb

package_cloud push grafana/testing/debian/jessie grafana_${version}_amd64.deb
package_cloud push grafana/testing/debian/wheezy grafana_${version}_amd64.deb
package_cloud push grafana/testing/debian/stretch grafana_${version}_amd64.deb
package_cloud push grafana/testing/debian/wheezy grafana_${version}_amd64.deb --verbose
package_cloud push grafana/testing/debian/stretch grafana_${version}_amd64.deb --verbose

wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${version}-1.x86_64.rpm

package_cloud push grafana/testing/el/6 grafana-${version}-1.x86_64.rpm
package_cloud push grafana/testing/el/7 grafana-${version}-1.x86_64.rpm
package_cloud push grafana/testing/el/6 grafana-${version}-1.x86_64.rpm --verbose
package_cloud push grafana/testing/el/7 grafana-${version}-1.x86_64.rpm --verbose

package_cloud push grafana/stable/el/7 grafana-${version}-1.x86_64.rpm
package_cloud push grafana/stable/el/6 grafana-${version}-1.x86_64.rpm
package_cloud push grafana/stable/el/7 grafana-${version}-1.x86_64.rpm --verbose
package_cloud push grafana/stable/el/6 grafana-${version}-1.x86_64.rpm --verbose

rm grafana*.{deb,rpm}
7 changes: 5 additions & 2 deletions pkg/api/app_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ import (
)

var pluginProxyTransport = &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
Renegotiation: tls.RenegotiateFreelyAsClient,
},
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
Expand Down
1 change: 1 addition & 0 deletions pkg/models/datasource_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (ds *DataSource) GetHttpTransport() (*http.Transport, error) {
transport := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
Renegotiation: tls.RenegotiateFreelyAsClient,
},
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
Expand Down
6 changes: 5 additions & 1 deletion pkg/services/notifications/mailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ func createDialer() (*gomail.Dialer, error) {

d := gomail.NewDialer(host, iPort, setting.Smtp.User, setting.Smtp.Password)
d.TLSConfig = tlsconfig
d.LocalName = setting.InstanceName
if setting.Smtp.EhloIdentity != "" {
d.LocalName = setting.Smtp.EhloIdentity
} else {
d.LocalName = setting.InstanceName
}
return d, nil
}

Expand Down
20 changes: 11 additions & 9 deletions pkg/setting/setting_smtp.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package setting

type SmtpSettings struct {
Enabled bool
Host string
User string
Password string
CertFile string
KeyFile string
FromAddress string
FromName string
SkipVerify bool
Enabled bool
Host string
User string
Password string
CertFile string
KeyFile string
FromAddress string
FromName string
EhloIdentity string
SkipVerify bool

SendWelcomeEmailOnSignUp bool
TemplatesPattern string
Expand All @@ -25,6 +26,7 @@ func readSmtpSettings() {
Smtp.KeyFile = sec.Key("key_file").String()
Smtp.FromAddress = sec.Key("from_address").String()
Smtp.FromName = sec.Key("from_name").String()
Smtp.EhloIdentity = sec.Key("ehlo_identity").String()
Smtp.SkipVerify = sec.Key("skip_verify").MustBool(false)

emails := Cfg.Section("emails")
Expand Down
Loading

0 comments on commit 00ad8e7

Please sign in to comment.