Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/master'
Browse files Browse the repository at this point in the history
* grafana/master: (368 commits)
  Adhoc-filtering for prometheus dashboards (grafana#13212)
  fix: url update loop fix (grafana#13243)
  fix theme parameter not working problem while prefer theme set to light (grafana#13232)
  fix: added type export to fix failing test
  fix: fixed typescript test error
  another circleci fix
  Another circleci fix
  changed gometalinter to use github master
  commented out metalinter as gopkg is having issues
  Fix prometheus label filtering for comparison queries (grafana#13213)
  Upgrade react and enzyme (grafana#13224)
  Teams page replace mobx (grafana#13219)
  upgrade of typescript and tslint and jest (grafana#13223)
  fix nil pointer dereference (grafana#13221)
  removes protoc from makefile
  changelog: note about closing grafana#11681
  Adding Centrify configuration for Oauth
  refactor: moved stuff into new features dir manage-dashboards
  move: moved styleguide to admin
  fix: fixed singlestat test broken due to file move
  ...
  • Loading branch information
ryantxu committed Sep 13, 2018
2 parents 048fd87 + a5bcd4b commit 9f4d4a9
Show file tree
Hide file tree
Showing 541 changed files with 14,162 additions and 8,312 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ version: 2
jobs:
mysql-integration-test:
docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.11
- image: circleci/mysql:5.6-ram
environment:
MYSQL_ROOT_PASSWORD: rootpass
Expand All @@ -39,7 +39,7 @@ jobs:

postgres-integration-test:
docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.11
- image: circleci/postgres:9.3-ram
environment:
POSTGRES_USER: grafanatest
Expand Down Expand Up @@ -74,22 +74,22 @@ jobs:

gometalinter:
docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.11
environment:
# we need CGO because of go-sqlite3
CGO_ENABLED: 1
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
- run: 'go get -u gopkg.in/alecthomas/gometalinter.v2'
- run: 'go get -u github.com/alecthomas/gometalinter'
- run: 'go get -u github.com/tsenart/deadcode'
- run: 'go get -u github.com/gordonklaus/ineffassign'
- run: 'go get -u github.com/opennota/check/cmd/structcheck'
- run: 'go get -u github.com/mdempsky/unconvert'
- run: 'go get -u github.com/opennota/check/cmd/varcheck'
- run:
name: run linters
command: 'gometalinter.v2 --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=ineffassign --enable=structcheck --enable=unconvert --enable=varcheck ./...'
command: 'gometalinter --enable-gc --vendor --deadline 10m --disable-all --enable=deadcode --enable=ineffassign --enable=structcheck --enable=unconvert --enable=varcheck ./...'
- run:
name: run go vet
command: 'go vet ./pkg/...'
Expand All @@ -115,7 +115,7 @@ jobs:

test-backend:
docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.11
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand All @@ -125,7 +125,7 @@ jobs:

build-all:
docker:
- image: grafana/build-container:1.0.0
- image: grafana/build-container:1.1.0
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:

build:
docker:
- image: grafana/build-container:1.0.0
- image: grafana/build-container:1.1.0
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down
88 changes: 60 additions & 28 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Golang build container
FROM golang:1.10
FROM golang:1.11

WORKDIR $GOPATH/src/github.com/grafana/grafana

Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ test: test-go test-js

run:
./bin/grafana-server

protoc:
protoc -I pkg/tsdb/models pkg/tsdb/models/*.proto --go_out=plugins=grpc:pkg/tsdb/models/.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ the latest master builds [here](https://grafana.com/grafana/download)

### Dependencies

- Go 1.10
- Go 1.11
- NodeJS LTS

### Building the backend
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ clone_folder: c:\gopath\src\github.com\grafana\grafana
environment:
nodejs_version: "6"
GOPATH: C:\gopath
GOVERSION: 1.10
GOVERSION: 1.11

install:
- rmdir c:\go /s /q
Expand Down
12 changes: 12 additions & 0 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ allow_sign_up = true
client_id = some_id
client_secret = some_secret
scopes = user:email
email_attribute_name = email:primary
auth_url =
token_url =
api_url =
Expand Down Expand Up @@ -467,6 +468,12 @@ enabled = true
# Makes it possible to turn off alert rule execution but alerting UI is visible
execute_alerts = true

# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
error_or_timeout = alerting

# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
nodata_or_nullvalues = no_data

#################################### Explore #############################
[explore]
# Enable the Explore section
Expand Down Expand Up @@ -538,3 +545,8 @@ container_name =

[external_image_storage.local]
# does not require any configuration

[rendering]
# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer
server_url =
callback_url =
11 changes: 11 additions & 0 deletions conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ log_queries =
# Makes it possible to turn off alert rule execution but alerting UI is visible
;execute_alerts = true

# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
;error_or_timeout = alerting

# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
;nodata_or_nullvalues = no_data

#################################### Explore #############################
[explore]
# Enable the Explore section
Expand Down Expand Up @@ -460,3 +466,8 @@ log_queries =

[external_image_storage.local]
# does not require any configuration

[rendering]
# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer
;server_url =
;callback_url =
1 change: 1 addition & 0 deletions docker/blocks/openldap/ldap_dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ email = "email"
[[servers.group_mappings]]
group_dn = "cn=admins,ou=groups,dc=grafana,dc=org"
org_role = "Admin"
grafana_admin = true
# The Grafana organization database id, optional, if left out the default org (id 1) will be used
# org_id = 1

Expand Down
2 changes: 0 additions & 2 deletions docs/sources/administration/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ This admin flag makes a user a `Super Admin`. This means they can access the `Se

### Dashboard & Folder Permissions

> Introduced in Grafana v5.0
{{< docs-imagebox img="/img/docs/v50/folder_permissions.png" max-width="500px" class="docs-image--right" >}}

For dashboards and dashboard folders there is a **Permissions** page that make it possible to
Expand Down
7 changes: 5 additions & 2 deletions docs/sources/administration/provisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/pupp
Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana)
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)
Jsonnet | [https://github.com/grafana/grafonnet-lib/](https://github.com/grafana/grafonnet-lib/)

## Datasources

Expand Down Expand Up @@ -154,8 +155,8 @@ Since not all datasources have the same configuration settings we only have the
| tlsAuthWithCACert | boolean | *All* | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | *All* | Controls whether a client verifies the server's certificate chain and host name. |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Elastic, InfluxDB & Prometheus | Lowest interval/step value that should be used for this data source |
| esVersion | number | Elastic | Elasticsearch version as an number (2/5/56) |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL & MSSQL | Lowest interval/step value that should be used for this data source |
| esVersion | number | Elastic | Elasticsearch version as a number (2/5/56) |
| timeField | string | Elastic | Which field that should be used as timestamp |
| interval | string | Elastic | Index date time format |
| authType | string | Cloudwatch | Auth provider. keys/credentials/arn |
Expand All @@ -165,6 +166,8 @@ Since not all datasources have the same configuration settings we only have the
| tsdbVersion | string | OpenTSDB | Version |
| tsdbResolution | string | OpenTSDB | Resolution |
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
| timescaledb | boolean | PostgreSQL | Enable usage of TimescaleDB extension |

#### Secure Json Data

Expand Down
65 changes: 44 additions & 21 deletions docs/sources/alerting/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ weight = 2
When an alert changes state, it sends out notifications. Each alert rule can have
multiple notifications. In order to add a notification to an alert rule you first need
to add and configure a `notification` channel (can be email, PagerDuty or other integration). This is done from the Notification Channels page.
to add and configure a `notification` channel (can be email, PagerDuty or other integration).
This is done from the Notification Channels page.

## Notification Channel Setup

{{< imgbox max-width="30%" img="/img/docs/v50/alerts_notifications_menu.png" caption="Alerting Notification Channels" >}}

On the Notification Channels page hit the `New Channel` button to go the page where you
can configure and setup a new Notification Channel.

Expand All @@ -30,7 +29,31 @@ sure it's setup correctly.

### Send on all alerts

When checked, this option will nofity for all alert rules - existing and new.
When checked, this option will notify for all alert rules - existing and new.

### Send reminders

> Only available in Grafana v5.3 and above.
{{< docs-imagebox max-width="600px" img="/img/docs/v53/alerting_notification_reminders.png" class="docs-image--right" caption="Alerting notification reminders setup" >}}

When this option is checked additional notifications (reminders) will be sent for triggered alerts. You can specify how often reminders
should be sent using number of seconds (s), minutes (m) or hours (h), for example `30s`, `3m`, `5m` or `1h` etc.

**Important:** Alert reminders are sent after rules are evaluated. Therefore a reminder can never be sent more frequently than a configured [alert rule evaluation interval](/alerting/rules/#name-evaluation-interval).

These examples show how often and when reminders are sent for a triggered alert.

Alert rule evaluation interval | Send reminders every | Reminder sent every (after last alert notification)
---------- | ----------- | -----------
`30s` | `15s` | ~30 seconds
`1m` | `5m` | ~5 minutes
`5m` | `15m` | ~15 minutes
`6m` | `20m` | ~24 minutes
`1h` | `15m` | ~1 hour
`1h` | `2h` | ~2 hours

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

## Supported Notification Types

Expand Down Expand Up @@ -132,23 +155,23 @@ Once these two properties are set, you can send the alerts to Kafka for further

### All supported notifiers

Name | Type |Support images
-----|------------ | ------
Slack | `slack` | yes
Pagerduty | `pagerduty` | yes
Email | `email` | yes
Webhook | `webhook` | link
Kafka | `kafka` | no
Hipchat | `hipchat` | yes
VictorOps | `victorops` | yes
Sensu | `sensu` | yes
OpsGenie | `opsgenie` | yes
Threema | `threema` | yes
Pushover | `pushover` | no
Telegram | `telegram` | no
Line | `line` | no
Prometheus Alertmanager | `prometheus-alertmanager` | no
Microsoft Teams | `teams` | yes
Name | Type |Support images | Support reminders
-----|------------ | ------ | ------ |
Slack | `slack` | yes | yes
Pagerduty | `pagerduty` | yes | yes
Email | `email` | yes | yes
Webhook | `webhook` | link | yes
Kafka | `kafka` | no | yes
Hipchat | `hipchat` | yes | yes
VictorOps | `victorops` | yes | yes
Sensu | `sensu` | yes | yes
OpsGenie | `opsgenie` | yes | yes
Threema | `threema` | yes | yes
Pushover | `pushover` | no | yes
Telegram | `telegram` | no | yes
Line | `line` | no | yes
Microsoft Teams | `teams` | yes | yes
Prometheus Alertmanager | `prometheus-alertmanager` | no | no



Expand Down
5 changes: 5 additions & 0 deletions docs/sources/alerting/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ So as you can see from the above scenario Grafana will not send out notification
to fire if the rule already is in state `Alerting`. To improve support for queries that return multiple series
we plan to track state **per series** in a future release.

> Starting with Grafana v5.3 you can configure reminders to be sent for triggered alerts. This will send additional notifications
> when an alert continues to fire. If other series (like server2 in the example above) also cause the alert rule to fire they will
> be included in the reminder notification. Depending on what notification channel you're using you may be able to take advantage
> of this feature for identifying new/existing series causing alert to fire. [Read more about notification reminders here](/alerting/notifications/#send-reminders).
### No Data / Null values

Below your conditions you can configure how the rule evaluation engine should handle queries that return no data or only null values.
Expand Down
Loading

0 comments on commit 9f4d4a9

Please sign in to comment.