Commit baffdb15 by Carl Bergquist Committed by GitHub

Merge pull request #10510 from nir0s/fix-docs

Fix docs
parents 77b5dee4 b7d4a188
...@@ -10,17 +10,17 @@ weight = 8 ...@@ -10,17 +10,17 @@ weight = 8
# Grafana CLI # Grafana CLI
Grafana cli is a small executable that is bundled with grafana server and is suppose to be executed on the same machine as grafana runs. Grafana cli is a small executable that is bundled with Grafana-server and is supposed to be executed on the same machine Grafana-server is running on.
## Plugins ## Plugins
The CLI helps you install, upgrade and manage your plugins on the same machine it CLI is running. The CLI allows you to install, upgrade and manage your plugins on the machine it is running on.
You can find more information about how to install and manage your plugins at the You can find more information about how to install and manage your plugins in the
[plugin page]({{< relref "plugins/installation.md" >}}). [plugins page]({{< relref "plugins/installation.md" >}}).
## Admin ## Admin
> This feature is only available in grafana 4.1 and above. > This feature is only available in Grafana 4.1 and above.
To show all admin commands: To show all admin commands:
`grafana-cli admin` `grafana-cli admin`
...@@ -39,7 +39,7 @@ then there are two flags that can be used to set homepath and the config file pa ...@@ -39,7 +39,7 @@ then there are two flags that can be used to set homepath and the config file pa
`grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" newpass` `grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" newpass`
If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example with curl using basic auth: If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example using curl with basic auth:
```bash ```bash
curl -X PUT -H "Content-Type: application/json" -d '{ curl -X PUT -H "Content-Type: application/json" -d '{
......
...@@ -10,6 +10,6 @@ weight = 8 ...@@ -10,6 +10,6 @@ weight = 8
# Internal metrics # 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.
...@@ -12,7 +12,7 @@ weight = 8 ...@@ -12,7 +12,7 @@ weight = 8
## Config file ## Config file
Checkout the [configuration](/installation/configuration) page for more information about what you can configure in `grafana.ini` Checkout the [configuration](/installation/configuration) page for more information on what you can configure in `grafana.ini`
### Config file locations ### Config file locations
...@@ -35,7 +35,7 @@ GF_<SectionName>_<KeyName> ...@@ -35,7 +35,7 @@ GF_<SectionName>_<KeyName>
``` ```
Where the section name is the text within the brackets. Everything Where the section name is the text within the brackets. Everything
should be upper case, `.` should be replaced by `_`. For example, given these configuration settings: should be upper case and `.` should be replaced by `_`. For example, given these configuration settings:
```bash ```bash
# default section # default section
...@@ -48,7 +48,7 @@ admin_user = admin ...@@ -48,7 +48,7 @@ admin_user = admin
client_secret = 0ldS3cretKey client_secret = 0ldS3cretKey
``` ```
Then you can override them using: Overriding will be done like so:
```bash ```bash
export GF_DEFAULT_INSTANCE_NAME=my-instance export GF_DEFAULT_INSTANCE_NAME=my-instance
...@@ -60,7 +60,7 @@ export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey ...@@ -60,7 +60,7 @@ export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
## Configuration management tools ## Configuration management tools
Currently we do not provide any scripts/manifests for configuring Grafana. Rather then spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefor, we heavily relay on the expertise of he community. Currently we do not provide any scripts/manifests for configuring Grafana. Rather than spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefore, we heavily relay on the expertise of the community.
Tool | Project Tool | Project
-----|------------ -----|------------
...@@ -76,8 +76,8 @@ Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://gith ...@@ -76,8 +76,8 @@ Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://gith
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `delete_datasources`. Grafana will delete datasources listed in `delete_datasources` before inserting/updating those in the `datasource` list. It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `delete_datasources`. Grafana will delete datasources listed in `delete_datasources` before inserting/updating those in the `datasource` list.
### Running multiple grafana instances. ### Running multiple Grafana instances.
If you are running multiple instances of Grafana you might run into problems if they have different versions of the datasource.yaml configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way old configs cannot overwrite newer configs if they restart at the same time. If you are running multiple instances of Grafana you might run into problems if they have different versions of the `datasource.yaml` configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way, old configs cannot overwrite newer configs if they restart at the same time.
### Example datasource config file ### Example datasource config file
```yaml ```yaml
...@@ -132,7 +132,7 @@ datasources: ...@@ -132,7 +132,7 @@ datasources:
#### Json data #### Json data
Since all datasources dont have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `json_data` field. Here are the most common settings that the core datasources use. Since not all datasources have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `json_data` field. Here are the most common settings that the core datasources use.
| Name | Type | Datasource |Description | | Name | Type | Datasource |Description |
| ----| ---- | ---- | --- | | ----| ---- | ---- | --- |
...@@ -157,7 +157,7 @@ Since all datasources dont have the same configuration settings we only have the ...@@ -157,7 +157,7 @@ Since all datasources dont have the same configuration settings we only have the
{"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"} {"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"}
Secure json data is a map of settings that will be encrypted with [secret key](/installation/configuration/#secret-key) from the grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to request on the server side. All these settings are optional. Secure json data is a map of settings that will be encrypted with [secret key](/installation/configuration/#secret-key) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
| Name | Type | Datasource | Description | | Name | Type | Datasource | Description |
| ----| ---- | ---- | --- | | ----| ---- | ---- | --- |
...@@ -169,9 +169,9 @@ Secure json data is a map of settings that will be encrypted with [secret key](/ ...@@ -169,9 +169,9 @@ Secure json data is a map of settings that will be encrypted with [secret key](/
### Dashboards ### Dashboards
It's possible to manage dashboards in Grafana by adding one or more yaml config files in the [`provisioning/dashboards`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `dashboards providers` that will load dashboards into grafana. Currently we only support reading dashboards from file but we will add more providers in the future. It's possible to manage dashboards in Grafana by adding one or more yaml config files in the [`provisioning/dashboards`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `dashboards providers` that will load dashboards into Grafana. Currently we only support reading dashboards from file but we will add more providers in the future.
The dashboard provider config file looks like this The dashboard provider config file looks somewhat like this:
```yaml ```yaml
- name: 'default' - name: 'default'
...@@ -182,4 +182,4 @@ The dashboard provider config file looks like this ...@@ -182,4 +182,4 @@ The dashboard provider config file looks like this
folder: /var/lib/grafana/dashboards folder: /var/lib/grafana/dashboards
``` ```
When grafana starts it will update/insert all dashboards available in the configured folders. If you modify the file the dashboard will also be updated. When Grafana starts, it will update/insert all dashboards available in the configured folders. If you modify the file, the dashboard will also be updated.
\ No newline at end of file
...@@ -13,7 +13,7 @@ weight = 2 ...@@ -13,7 +13,7 @@ weight = 2
> Alerting is only available in Grafana v4.0 and above. > 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 Description | Type | Metric name
---------- | ----------- | ---------- ---------- | ----------- | ----------
......
...@@ -14,9 +14,9 @@ weight = 2 ...@@ -14,9 +14,9 @@ weight = 2
> Alerting is only available in Grafana v4.0 and above. > Alerting is only available in Grafana v4.0 and above.
When an alert changes state it sends out notifications. Each alert rule can have 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 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 ## Notification Channel Setup
...@@ -25,12 +25,12 @@ to add and configure a `notification` channel (can be email, Pagerduty or other ...@@ -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 On the Notification Channels page hit the `New Channel` button to go the page where you
can configure and setup a new Notification Channel. 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 You specify a name and a type, and type specific options. You can also test the notification to make
sure it's working and setup correctly. sure it's setup correctly.
### Send on all alerts ### 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 ## Supported Notification Types
...@@ -38,39 +38,39 @@ Grafana ships with the following set of notification types: ...@@ -38,39 +38,39 @@ Grafana ships with the following set of notification types:
### Email ### Email
To enable email notification you have to setup [SMTP settings](/installation/configuration/#smtp) To enable email notifications 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 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 in the email. external image destination if available or fallback to attaching the image to the email.
### Slack ### Slack
{{< imgbox max-width="40%" img="/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}} {{< 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 set up slack you need to configure an incoming webhook url at slack. You can follow their guide on how
to do that https://api.slack.com/incoming-webhooks If you want to include screenshots of the firing alerts 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, 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 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 Setting | Description
---------- | ----------- ---------- | -----------
Recipient | allows you to override the slack recipient. 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 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. Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
### PagerDuty ### 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 Setting | Description
---------- | ----------- ---------- | -----------
Integration Key | Integration key for pagerduty. Integration Key | Integration key for PagerDuty.
Auto resolve incidents | Resolve incidents in pagerduty once the alert goes back to ok Auto resolve incidents | Resolve incidents in PagerDuty once the alert goes back to ok
### Webhook ### Webhook
The webhook notification is a simple way to send information about an state change over HTTP to a custom endpoint. 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 any system you choose, by yourself. Using this notification you could integrate Grafana into a system of your choosing.
Example json body: Example json body:
...@@ -117,14 +117,14 @@ Dingtalk supports the following "message type": `text`, `link` and `markdown`. O ...@@ -117,14 +117,14 @@ Dingtalk supports the following "message type": `text`, `link` and `markdown`. O
### Kafka ### 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). 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 couple of configurations options which need to be set in Grafana UI under Kafka Settings: There are a couple of configuration options which need to be set up in Grafana UI under Kafka Settings:
1. Kafka REST Proxy endpoint. 1. Kafka REST Proxy endpoint.
2. Kafka Topic. 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 ### All supported notifier
...@@ -154,9 +154,9 @@ Amazon S3, Webdav, and Azure Blob Storage for this. So to set that up you need t ...@@ -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. 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 # 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. This url is based on the [domain](/installation/configuration/#domain) setting in Grafana.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment