Просмотр исходного кода

Merge remote-tracking branch 'grafana/master' into influx-db-query2

ryan 8 лет назад
Родитель
Сommit
cf81b5caf6

+ 20 - 2
docs/sources/alerting/notifications.md

@@ -92,6 +92,26 @@ Example json body:
 
 - **state** - The possible values for alert state are: `ok`, `paused`, `alerting`, `pending`, `no_data`.
 
+### 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).
+
+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:
@@ -112,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

+ 14 - 0
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.
+
+    <img src="/img/docs/v4/x_axis_mode_series.png" class="no-shadow">
+
+- 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).
+
+    <img src="/img/docs/v43/heatmap_histogram.png" class="no-shadow">
+
 ### Legend
 
 The legend hand be hidden by checking the ``Show`` checkbox.  If it's shown, it can be

+ 1 - 0
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**:
 

+ 1 - 0
docs/sources/reference/sharing.md

@@ -65,6 +65,7 @@ Example:
 ```
 
 Below there should be an interactive Grafana graph embedded in an iframe:
+
 <iframe src="https://snapshot.raintank.io/dashboard-solo/snapshot/y7zwi2bZ7FcoTlB93WN7yWO4aMiz3pZb?from=1493369923321&to=1493377123321&panelId=4" width="650" height="300" frameborder="0"></iframe>
 
 ### Export Panel Data

+ 1 - 1
pkg/services/alerting/notifiers/dingding.go

@@ -19,7 +19,7 @@ func init() {
       <h3 class="page-heading">DingDing settings</h3>
       <div class="gf-form">
         <span class="gf-form-label width-10">Url</span>
-        <input type="text" required class="gf-form-input max-width-26" ng-model="ctrl.model.settings.url"></input>
+        <input type="text" required class="gf-form-input max-width-26" ng-model="ctrl.model.settings.url" placeholder="https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx"></input>
       </div>
     `,
 	})

+ 6 - 1
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(),
 	}

+ 1 - 1
public/app/plugins/datasource/cloudwatch/partials/query.parameter.html

@@ -49,7 +49,7 @@
 				<li>{{stat}}</li>
 				<li>{{namespace}}</li>
 				<li>{{region}}</li>
-				<li>{{DIMENSION_NAME}}</li>
+				<li>{{YOUR_DIMENSION_NAME}}</li>
 			</ul>
 		</info-popover>
 	</div>