From a622c55b1b5902ca1427bce1e73f5de69b9365ce Mon Sep 17 00:00:00 2001 From: 0x6875790d0a Date: Fri, 7 Jul 2017 18:20:27 +0900 Subject: [PATCH 1/8] (feat) Add image to LINE notify (#8771) --- pkg/services/alerting/notifiers/line.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/services/alerting/notifiers/line.go b/pkg/services/alerting/notifiers/line.go index 0f544cbdfb6..69ad0d65896 100644 --- a/pkg/services/alerting/notifiers/line.go +++ b/pkg/services/alerting/notifiers/line.go @@ -75,12 +75,17 @@ func (this *LineNotifier) createAlert(evalContext *alerting.EvalContext) error { body := fmt.Sprintf("%s - %s\n%s", evalContext.Rule.Name, ruleUrl, evalContext.Rule.Message) form.Add("message", body) + if evalContext.ImagePublicUrl != "" { + form.Add("imageThumbnail", evalContext.ImagePublicUrl) + form.Add("imageFullsize", evalContext.ImagePublicUrl) + } + cmd := &m.SendWebhookSync{ Url: lineNotifyUrl, HttpMethod: "POST", HttpHeader: map[string]string{ "Authorization": fmt.Sprintf("Bearer %s", this.Token), - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", }, Body: form.Encode(), } From c296e73b83b524318398dea275e4b92df15703b6 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 7 Jul 2017 12:25:28 +0200 Subject: [PATCH 2/8] docs: x-axis mode for graph panel --- docs/sources/features/panels/graph.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/sources/features/panels/graph.md b/docs/sources/features/panels/graph.md index fdd3f271184..5dbf307b484 100644 --- a/docs/sources/features/panels/graph.md +++ b/docs/sources/features/panels/graph.md @@ -67,6 +67,20 @@ The ``Left Y`` and ``Right Y`` can be customized using: Axes can also be hidden by unchecking the appropriate box from `Show Axis`. +### X-Axis Mode + +There are three options: + +- The default option is `Time` and means the x-axis represents time and that the data is grouped by time (for example, by hour or by minute). + +- The `Series` option means that the data is grouped by series and not by time. The y-axis still represents the value. + + + +- The `Histogram` option converts the graph into a histogram. A Histogram is a kind of bar chart that groups numbers into ranges, often called buckets or bins. Taller bars show that more data falls in that range. Histograms and buckets are described in more detail [here](http://docs.grafana.org/features/panels/heatmap/#histograms-and-buckets). + + + ### Legend The legend hand be hidden by checking the ``Show`` checkbox. If it's shown, it can be From fc82de154343d744060e19b030e9fde8ef565da5 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 7 Jul 2017 13:00:13 +0200 Subject: [PATCH 3/8] docs: style fix --- docs/sources/reference/sharing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sources/reference/sharing.md b/docs/sources/reference/sharing.md index 1be446a7bc2..61ae1f761eb 100644 --- a/docs/sources/reference/sharing.md +++ b/docs/sources/reference/sharing.md @@ -65,6 +65,7 @@ Example: ``` Below there should be an interactive Grafana graph embedded in an iframe: + ### Export Panel Data From 3a075be7e901b0a8b5cfc9416c72bdd20aa022a5 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Fri, 7 Jul 2017 18:17:05 +0200 Subject: [PATCH 4/8] cloudwatch: make dimension text in alias popover clearer --- .../plugins/datasource/cloudwatch/partials/query.parameter.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html b/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html index 23261d2fef5..67351358696 100644 --- a/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html +++ b/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html @@ -49,7 +49,7 @@
  • {{stat}}
  • {{namespace}}
  • {{region}}
  • -
  • {{DIMENSION_NAME}}
  • +
  • {{YOUR_DIMENSION_NAME}}
  • From 68e7219135c2f4ea5478573f5f753c80ce8b2af9 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Sun, 9 Jul 2017 02:00:50 +0200 Subject: [PATCH 5/8] docs: add missing parameter api call --- docs/sources/http_api/dashboard.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sources/http_api/dashboard.md b/docs/sources/http_api/dashboard.md index a7b7ae87a62..890156ad635 100644 --- a/docs/sources/http_api/dashboard.md +++ b/docs/sources/http_api/dashboard.md @@ -46,6 +46,7 @@ JSON Body schema: - **dashboard** – The complete dashboard model, id = null to create a new dashboard - **overwrite** – Set to true if you want to overwrite existing dashboard with newer version or with same dashboard title. +- **message** - Set a commit message for the version history. **Example Response**: From 1ccfca109ff831b6497f33df1e97f75ffb39e325 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 10 Jul 2017 12:16:40 +0200 Subject: [PATCH 6/8] docs: instructions for DingDing notifier --- docs/sources/alerting/notifications.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/sources/alerting/notifications.md b/docs/sources/alerting/notifications.md index 3119390b275..8080453adea 100644 --- a/docs/sources/alerting/notifications.md +++ b/docs/sources/alerting/notifications.md @@ -92,6 +92,20 @@ Example json body: - **state** - The possible values for alert state are: `ok`, `paused`, `alerting`, `pending`, `no_data`. +### DingDing + +[Instructions in Chinese](https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.p2lr6t&treeId=257&articleId=105733&docType=1) + +In DingTalk PC Client: +1. Click "more" icon on left bottom of the panel. +2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage". +3. In the "Robot Manage" panel, select "customised: customised robot with Webhook". +4. In the next new panel named "robot detail", click "Add" button. +5. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next". +6. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the grafana Dingtalk setting page and then click "finish". + +Dingtalk supports the following "message type": `text`, `link` and `markdown`. Only the `text` message type is supported. + ### Other Supported Notification Channels Grafana also supports the following Notification Channels: From 1dedc886f28ccba610d80d64fbec06b2bd6171e6 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 10 Jul 2017 12:22:21 +0200 Subject: [PATCH 7/8] docs: DingDing notifier --- docs/sources/alerting/notifications.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/sources/alerting/notifications.md b/docs/sources/alerting/notifications.md index 8080453adea..f3becf18d78 100644 --- a/docs/sources/alerting/notifications.md +++ b/docs/sources/alerting/notifications.md @@ -92,16 +92,22 @@ Example json body: - **state** - The possible values for alert state are: `ok`, `paused`, `alerting`, `pending`, `no_data`. -### DingDing +### DingDing/DingTalk -[Instructions in Chinese](https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.p2lr6t&treeId=257&articleId=105733&docType=1) +[Instructions in Chinese](https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.p2lr6t&treeId=257&articleId=105733&docType=1). In DingTalk PC Client: + 1. Click "more" icon on left bottom of the panel. + 2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage". + 3. In the "Robot Manage" panel, select "customised: customised robot with Webhook". + 4. In the next new panel named "robot detail", click "Add" button. + 5. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next". + 6. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the grafana Dingtalk setting page and then click "finish". Dingtalk supports the following "message type": `text`, `link` and `markdown`. Only the `text` message type is supported. @@ -126,8 +132,6 @@ Grafana also supports the following Notification Channels: - LINE -- DingDing - # Enable images in notifications {#external-image-store} Grafana can render the panel associated with the alert rule and include that in the notification. Most Notification Channels require that this image be publicly accessable (Slack and PagerDuty for example). In order to include images in alert notifications, Grafana can upload the image to an image store. It currently supports From f8d22385ce7a233e0dc7e7e599aec8094a45faad Mon Sep 17 00:00:00 2001 From: Liang Jiameng Date: Mon, 10 Jul 2017 22:51:03 +0800 Subject: [PATCH 8/8] add a placeholder to DingTalk Url (#8820) --- pkg/services/alerting/notifiers/dingding.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/alerting/notifiers/dingding.go b/pkg/services/alerting/notifiers/dingding.go index ad5ccf554c3..db8735bd795 100644 --- a/pkg/services/alerting/notifiers/dingding.go +++ b/pkg/services/alerting/notifiers/dingding.go @@ -19,7 +19,7 @@ func init() {

    DingDing settings

    Url - +
    `, })