Optimize metrics and notifications docs

pull/10510/head
nir0s 7 years ago
parent 71a12c6bb6
commit b7d4a1887c
  1. 4
      docs/sources/administration/metrics.md
  2. 2
      docs/sources/alerting/metrics.md
  3. 54
      docs/sources/alerting/notifications.md

@ -10,6 +10,6 @@ weight = 8
# Internal metrics
Grafana collects some metrics about it self internally. Currently Grafana supports pushing metrics to graphite and exposing them to be scraped by Prometheus.
Grafana collects some metrics about itself internally. Currently, Grafana supports pushing metrics to Graphite or exposing them to be scraped by Prometheus.
To enabled internal metrics you have to enable it under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file.If you want to push metrics to graphite you have also have to configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.
To emit internal metrics you have to enable the option under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file. If you want to push metrics to Graphite, you must also configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.

@ -13,7 +13,7 @@ weight = 2
> Alerting is only available in Grafana v4.0 and above.
The alert engine publishes some internal metrics about itself. You can read more about how Grafana published [internal metrics](/installation/configuration/#metrics).
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics](/installation/configuration/#metrics).
Description | Type | Metric name
---------- | ----------- | ----------

@ -14,9 +14,9 @@ weight = 2
> Alerting is only available in Grafana v4.0 and above.
When an alert changes state it sends out notifications. Each alert rule can have
multiple notifications. But 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.
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.
## Notification Channel Setup
@ -25,12 +25,12 @@ to add and configure a `notification` channel (can be email, Pagerduty or other
On the Notification Channels page hit the `New Channel` button to go the page where you
can configure and setup a new Notification Channel.
You specify name and type, and type specific options. You can also test the notification to make
sure it's working and setup correctly.
You specify a name and a type, and type specific options. You can also test the notification to make
sure it's setup correctly.
### Send on all alerts
When checked this option will make this notification used for all alert rules, existing and new.
When checked, this option will nofity for all alert rules - existing and new.
## Supported Notification Types
@ -38,39 +38,39 @@ Grafana ships with the following set of notification types:
### Email
To enable email notification you have to setup [SMTP settings](/installation/configuration/#smtp)
in the Grafana config. Email notification will upload an image of the alert graph to an
external image destination if available or fallback to attaching the image in the email.
To enable email notifications you have to setup [SMTP settings](/installation/configuration/#smtp)
in the Grafana config. Email notifications will upload an image of the alert graph to an
external image destination if available or fallback to attaching the image to the email.
### Slack
{{< imgbox max-width="40%" img="/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}}
To set up slack you need to configure an incoming webhook url at slack. You can follow their guide for how
to do that https://api.slack.com/incoming-webhooks If you want to include screenshots of the firing alerts
in the slack messages you have to configure either the [external image destination](#external-image-store) in Grafana,
To set up slack you need to configure an incoming webhook url at slack. You can follow their guide on how
to do that [here](https://api.slack.com/incoming-webhooks). If you want to include screenshots of the firing alerts
in the Slack messages you have to configure either the [external image destination](#external-image-store) in Grafana,
or a bot integration via Slack Apps. Follow Slack's guide to set up a bot integration and use the token provided
https://api.slack.com/bot-users, which starts with "xoxb".
(https://api.slack.com/bot-users), which starts with "xoxb".
Setting | Description
---------- | -----------
Recipient | allows you to override the slack recipient.
Mention | make it possible to include a mention in the slack notification sent by Grafana. Ex @here or @channel
Recipient | allows you to override the Slack recipient.
Mention | make it possible to include a mention in the Slack notification sent by Grafana. Ex @here or @channel
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
### PagerDuty
To set up PagerDuty, all you have to do is to provide an api key.
To set up PagerDuty, all you have to do is to provide an API key.
Setting | Description
---------- | -----------
Integration Key | Integration key for pagerduty.
Auto resolve incidents | Resolve incidents in pagerduty once the alert goes back to ok
Integration Key | Integration key for PagerDuty.
Auto resolve incidents | Resolve incidents in PagerDuty once the alert goes back to ok
### Webhook
The webhook notification is a simple way to send information about an state change over HTTP to a custom endpoint.
Using this notification you could integrate Grafana into any system you choose, by yourself.
The webhook notification is a simple way to send information about a state change over HTTP to a custom endpoint.
Using this notification you could integrate Grafana into a system of your choosing.
Example json body:
@ -117,19 +117,19 @@ Dingtalk supports the following "message type": `text`, `link` and `markdown`. O
### Kafka
Notifications can be sent to a Kafka topic from Grafana using [Kafka REST Proxy](https://docs.confluent.io/1.0/kafka-rest/docs/index.html).
There are couple of configurations options which need to be set in Grafana UI under Kafka Settings:
Notifications can be sent to a Kafka topic from Grafana using the [Kafka REST Proxy](https://docs.confluent.io/1.0/kafka-rest/docs/index.html).
There are a couple of configuration options which need to be set up in Grafana UI under Kafka Settings:
1. Kafka REST Proxy endpoint.
2. Kafka Topic.
Once these two properties are set, you can send the alerts to Kafka for further processing or throttling them.
Once these two properties are set, you can send the alerts to Kafka for further processing or throttling.
### All supported notifier
Name | Type |Support images
-----|------------ | ------
Name | Type |Support images
-----|------------ | ------
Slack | `slack` | yes
Pagerduty | `pagerduty` | yes
Email | `email` | yes
@ -154,9 +154,9 @@ Amazon S3, Webdav, and Azure Blob Storage for this. So to set that up you need t
Currently only the Email Channels attaches images if no external image store is specified. To include images in alert notifications for other channels then you need to set up an external image store.
This is an optional requirement, you can get Slack and email notifications without setting this up.
This is an optional requirement. You can get Slack and email notifications without setting this up.
# Configure the link back to Grafana from alert notifications
All alert notifications contains a link back to the triggered alert in the Grafana instance.
All alert notifications contain a link back to the triggered alert in the Grafana instance.
This url is based on the [domain](/installation/configuration/#domain) setting in Grafana.

Loading…
Cancel
Save