The main goal of issue triage is to categorize all incoming Grafana issues and make sure each issue has all basic information needed for anyone else to understand and be able to start working on it.
The main goal of issue triage is to categorize all incoming Grafana issues and make sure each issue has all basic information needed for anyone else to understand and be able to start working on it.
**Note:** This information is for Grafana project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
> **Note:** This information is for Grafana project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
The core maintainers of the Grafana project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Currently one maintainer each week is responsible. Besides that part, triage provides an important way to contribute to an open source project.
The core maintainers of the Grafana project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Currently one maintainer each week is responsible. Besides that part, triage provides an important way to contribute to an open source project.
...
@@ -116,7 +116,7 @@ To make it easier for everyone to understand and find issues they're searching f
...
@@ -116,7 +116,7 @@ To make it easier for everyone to understand and find issues they're searching f
* Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
* Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
* Do your best effort to change title and description or request suggested changes by adding a comment.
* Do your best effort to change title and description or request suggested changes by adding a comment.
Note: Above rules is applicable to both new and existing issues of the Grafana project.
> **Note:** Above rules is applicable to both new and existing issues of the Grafana project.
### Do you have all the information needed to categorize an issue?
### Do you have all the information needed to categorize an issue?
...
@@ -137,18 +137,18 @@ An issue can have multiple of the following labels. Typically, a properly catego
...
@@ -137,18 +137,18 @@ An issue can have multiple of the following labels. Typically, a properly catego
- One label identifying its type (`type/*`).
- One label identifying its type (`type/*`).
- One or multiple labels identifying the functional areas of interest or component (`area/*`) and/or data source (`datasource/*`), if applicable.
- One or multiple labels identifying the functional areas of interest or component (`area/*`) and/or data source (`datasource/*`), if applicable.
@@ -20,7 +20,7 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
...
@@ -20,7 +20,7 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
The Grafana project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater installed.
The Grafana project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater installed.
_Note:_ Since most developers of Grafana still use the `GOPATH` we need to specify `GO111MODULE=on` to make `go mod` and `got get` work as intended. If you have setup Grafana outside of the `GOPATH` on your machine you can skip `GO111MODULE=on` when running the commands below.
> **Note:** Since most developers of Grafana still use the `GOPATH` we need to specify `GO111MODULE=on` to make `go mod` and `got get` work as intended. If you have setup Grafana outside of the `GOPATH` on your machine you can skip `GO111MODULE=on` when running the commands below.
To add or update a new dependency, use the `go get` command:
To add or update a new dependency, use the `go get` command:
The resulting image will be tagged as grafana/grafana:dev.
The resulting image will be tagged as grafana/grafana:dev.
**Note:** If you've already set up a local development environment, and you're running a `linux/amd64` machine, you can speed up building the Docker image:
> **Note:** If you've already set up a local development environment, and you're running a `linux/amd64` machine, you can speed up building the Docker image:
1. Build the frontend: `go run build.go build-frontend`.
1. Build the frontend: `go run build.go build-frontend`.
1. Build the Docker image: `make build-docker-dev`.
1. Build the Docker image: `make build-docker-dev`.
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
> Note: We don't have linting for this enabled because of lots of old code that needs to be fixed first.
> **Note:** We don't have linting for this enabled because of lots of old code that needs to be fixed first.
@@ -23,7 +23,7 @@ Check out the [configuration]({{< relref "configuration.md" >}}) page for more i
...
@@ -23,7 +23,7 @@ Check out the [configuration]({{< relref "configuration.md" >}}) page for more i
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
- The custom configuration file path can be overridden using the `--config` parameter
- The custom configuration file path can be overridden using the `--config` parameter
> **Note.** If you have installed Grafana using the `deb` or `rpm`
> **Note:** If you have installed Grafana using the `deb` or `rpm`
> packages, then your configuration file is located at
> packages, then your configuration file is located at
> `/etc/grafana/grafana.ini`. This path is specified in the Grafana
> `/etc/grafana/grafana.ini`. This path is specified in the Grafana
> init.d script using `--config` file parameter.
> init.d script using `--config` file parameter.
...
@@ -151,7 +151,7 @@ Since not all datasources have the same configuration settings we only have the
...
@@ -151,7 +151,7 @@ Since not all datasources have the same configuration settings we only have the
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
| graphiteVersion | string | Graphite | Graphite version |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source |
| httpMode | string | Influxdb, Prometheus | HTTP Method. 'GET', 'POST', defaults to GET |
| httpMode | string | Influxdb, Prometheus | HTTP Method. 'GET', 'POST', defaults to GET |
| esVersion | number | Elasticsearch | Elasticsearch version as a number (2/5/56/60/70) |
| esVersion | number | Elasticsearch | Elasticsearch version as a number (2/5/56/60/70) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
...
@@ -161,7 +161,7 @@ Since not all datasources have the same configuration settings we only have the
...
@@ -161,7 +161,7 @@ Since not all datasources have the same configuration settings we only have the
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
| defaultRegion | string | Cloudwatch | AWS region |
| defaultRegion | string | Cloudwatch | AWS region |
@@ -301,7 +301,7 @@ If the dashboard in the json file contains an [uid](/reference/dashboard/#json-f
...
@@ -301,7 +301,7 @@ If the dashboard in the json file contains an [uid](/reference/dashboard/#json-f
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.
By default, Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
By default, Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
> **Note.** Provisioning allows you to overwrite existing dashboards
> **Note:** Provisioning allows you to overwrite existing dashboards
> which leads to problems if you re-use settings that are supposed to be unique.
> which leads to problems if you re-use settings that are supposed to be unique.
> Be careful not to re-use the same `title` multiple times within a folder
> Be careful not to re-use the same `title` multiple times within a folder
> or `uid` within the same installation as this will cause weird behaviors.
> or `uid` within the same installation as this will cause weird behaviors.
...
@@ -333,7 +333,7 @@ providers:
...
@@ -333,7 +333,7 @@ providers:
```
```
`server` and `application` will become new folders in Grafana menu.
`server` and `application` will become new folders in Grafana menu.
> **Note.** `folder` and `folderUid` options should be empty or missing to make `foldersFromFilesStructure` work.
> **Note:** `folder` and `folderUid` options should be empty or missing to make `foldersFromFilesStructure` work.
> **Note:** To provision dashboards to the General folder, store them in the root of your `path`.
> **Note:** To provision dashboards to the General folder, store them in the root of your `path`.
...
@@ -409,32 +409,32 @@ delete_notifiers:
...
@@ -409,32 +409,32 @@ delete_notifiers:
The following sections detail the supported settings and secure settings for each alert notification type. Secure settings are stored encrypted in the database and you add them to `secure_settings` in the YAML file instead of `settings`.
The following sections detail the supported settings and secure settings for each alert notification type. Secure settings are stored encrypted in the database and you add them to `secure_settings` in the YAML file instead of `settings`.
> **Note**: Secure settings is supported since Grafana v7.2.
> **Note:** Secure settings is supported since Grafana v7.2.
#### Alert notification `pushover`
#### Alert notification `pushover`
| Name | Secure setting |
| Name | Secure setting |
| -------- | -------------- |
| -------- | -------------- |
| apiToken | yes |
| apiToken | yes |
| userKey | yes |
| userKey | yes |
| device | |
| device | |
| retry | |
| retry | |
| expire | |
| expire | |
#### Alert notification `slack`
#### Alert notification `slack`
| Name | Secure setting |
| Name | Secure setting |
| -------------- | -------------- |
| -------------- | -------------- |
| url | yes |
| url | yes |
| recipient | |
| recipient | |
| username | |
| username | |
| icon_emoji | |
| icon_emoji | |
| icon_url | |
| icon_url | |
| uploadImage | |
| uploadImage | |
| mentionUsers | |
| mentionUsers | |
| mentionGroups | |
| mentionGroups | |
| mentionChannel | |
| mentionChannel | |
| token | yes |
| token | yes |
#### Alert notification `victorops`
#### Alert notification `victorops`
...
@@ -453,33 +453,33 @@ The following sections detail the supported settings and secure settings for eac
...
@@ -453,33 +453,33 @@ The following sections detail the supported settings and secure settings for eac
#### Alert notification `LINE`
#### Alert notification `LINE`
| Name | Secure setting |
| Name | Secure setting |
| ----- | - |
| ----- | -------------- |
| token | yes |
| token | yes |
#### Alert notification `pagerduty`
#### Alert notification `pagerduty`
| Name | Secure setting |
| Name | Secure setting |
| -------------- | - |
| -------------- | -------------- |
| integrationKey | yes |
| integrationKey | yes |
| autoResolve | |
| autoResolve | |
#### Alert notification `sensu`
#### Alert notification `sensu`
| Name | Secure setting |
| Name | Secure setting |
| -------- | - |
| -------- | -------------- |
| url | |
| url | |
| source | |
| source | |
| handler | |
| handler | |
| username | |
| username | |
| password | yes |
| password | yes |
#### Alert notification `prometheus-alertmanager`
#### Alert notification `prometheus-alertmanager`
| Name | Secure setting |
| Name | Secure setting |
| ----------------- | - |
| ----------------- | -------------- |
| url | |
| url | |
| basicAuthUser | |
| basicAuthUser | |
| basicAuthPassword | yes |
| basicAuthPassword | yes |
#### Alert notification `teams`
#### Alert notification `teams`
...
@@ -511,35 +511,35 @@ The following sections detail the supported settings and secure settings for eac
...
@@ -511,35 +511,35 @@ The following sections detail the supported settings and secure settings for eac
> Note: Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
> **Note:** Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
> **Note**: Since Grafana 7.0, writing plugins using Angular is no longer recommended. If you're looking to build a new plugin, refer to [Plugins]({{< relref "../_index.md" >}}).
> **Note:** Since Grafana 7.0, writing plugins using Angular is no longer recommended. If you're looking to build a new plugin, refer to [Plugins]({{< relref "../_index.md" >}}).
You can extend Grafana by writing your own plugins and then share them with other users in [our plugin repository](https://grafana.com/plugins).
You can extend Grafana by writing your own plugins and then share them with other users in [our plugin repository](https://grafana.com/plugins).
| _Name_ | The data source name. This is how you refer to the data source in panels and queries. |
| _Name_ | The data source name. This is how you refer to the data source in panels and queries. |
| _Default_ | Default data source means that it will be pre-selected for new panels. |
| _Default_ | Default data source means that it will be pre-selected for new panels. |
| _Default Region_ | Used in query editor to set region (can be changed on per query basis) |
| _Default Region_ | Used in query editor to set region (can be changed on per query basis) |
| _Custom Metrics namespace_ | Specify the CloudWatch namespace of Custom metrics |
| _Custom Metrics namespace_ | Specify the CloudWatch namespace of Custom metrics |
| _Auth Provider_ | Specify the provider to get credentials. |
| _Auth Provider_ | Specify the provider to get credentials. |
| _Credentials_ profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default. |
| _Credentials_ profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default. |
| _Assume Role Arn_ | Specify the ARN of the role to assume |
| _Assume Role Arn_ | Specify the ARN of the role to assume |
| _External ID_ | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. |
| _External ID_ | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. |
## Authentication
## Authentication
...
@@ -45,7 +45,7 @@ server is running on AWS you can use IAM Roles and authentication will be handle
...
@@ -45,7 +45,7 @@ server is running on AWS you can use IAM Roles and authentication will be handle
See the AWS documentation on [IAM Roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
See the AWS documentation on [IAM Roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
> NOTE: AWS Role Switching as described [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-cli.html) is not supported at the moment.
> **Note:** AWS Role Switching as described [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-cli.html) is not supported at the moment.
## IAM Policies
## IAM Policies
...
@@ -116,7 +116,7 @@ See the AWS documentation on [Configuring the AWS SDK for Go](https://docs.aws.a
...
@@ -116,7 +116,7 @@ See the AWS documentation on [Configuring the AWS SDK for Go](https://docs.aws.a
Create a file at `~/.aws/credentials`. That is the `HOME` path for user running grafana-server.
Create a file at `~/.aws/credentials`. That is the `HOME` path for user running grafana-server.
> NOTE: If you think you have the credentials file in the right place but it is still not working then you might try moving your .aws file to '/usr/share/grafana/' and make sure your credentials file has at most 0644 permissions.
> **Note:** If you think you have the credentials file in the right place but it is still not working then you might try moving your .aws file to '/usr/share/grafana/' and make sure your credentials file has at most 0644 permissions.
@@ -22,14 +22,14 @@ visualize logs or metrics stored in Elasticsearch. You can also annotate your gr
...
@@ -22,14 +22,14 @@ visualize logs or metrics stored in Elasticsearch. You can also annotate your gr
3. Click the `+ Add data source` button in the top header.
3. Click the `+ Add data source` button in the top header.
4. Select *Elasticsearch* from the *Type* dropdown.
4. Select *Elasticsearch* from the *Type* dropdown.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
*Name* | The data source name. This is how you refer to the data source in panels and queries.
| *Name* | The data source name. This is how you refer to the data source in panels and queries. |
*Default* | Default data source means that it will be pre-selected for new panels.
| *Default* | Default data source means that it will be pre-selected for new panels. |
*Url* | The HTTP protocol, IP, and port of your Elasticsearch server.
| *Url* | The HTTP protocol, IP, and port of your Elasticsearch server. |
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
| *Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
...
@@ -68,16 +68,16 @@ A lower limit for the auto group by time interval. Recommended to be set to writ
...
@@ -68,16 +68,16 @@ A lower limit for the auto group by time interval. Recommended to be set to writ
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
Identifier | Description
| Identifier | Description |
------------ | -------------
| ---------- | ----------- |
`y` | year
| `y` | year |
`M` | month
| `M` | month |
`w` | week
| `w` | week |
`d` | day
| `d` | day |
`h` | hour
| `h` | hour |
`m` | minute
| `m` | minute |
`s` | second
| `s` | second |
`ms` | millisecond
| `ms` | millisecond |
### Logs (BETA)
### Logs (BETA)
...
@@ -111,11 +111,11 @@ metrics or group by clauses. Some metrics and group by clauses haves options, cl
...
@@ -111,11 +111,11 @@ metrics or group by clauses. Some metrics and group by clauses haves options, cl
You can control the name for time series via the `Alias` input field.
You can control the name for time series via the `Alias` input field.
*{{term fieldname}}* | replaced with value of a term group by
| *{{term fieldname}}* | replaced with value of a term group by |
*{{metric}}* | replaced with metric name (ex. Average, Min, Max)
| *{{metric}}* | replaced with metric name (ex. Average, Min, Max) |
*{{field}}* | replaced with the metric field name
| *{{field}}* | replaced with the metric field name |
## Pipeline metrics
## Pipeline metrics
...
@@ -136,11 +136,11 @@ types of template variables.
...
@@ -136,11 +136,11 @@ types of template variables.
The Elasticsearch data source supports two types of queries you can use in the *Query* field of *Query* variables. The query is written using a custom JSON string.
The Elasticsearch data source supports two types of queries you can use in the *Query* field of *Query* variables. The query is written using a custom JSON string.
*{"find": "fields", "type": "keyword"}* | Returns a list of field names with the index type `keyword`.
| *{"find": "fields", "type": "keyword"}* | Returns a list of field names with the index type `keyword`. |
*{"find": "terms", "field": "@hostname", "size": 1000}* | Returns a list of values for a field using term aggregation. Query will use current dashboard time range as time range for query.
| *{"find": "terms", "field": "@hostname", "size": 1000}* | Returns a list of values for a field using term aggregation. Query will use current dashboard time range as time range for query. |
*{"find": "terms", "field": "@hostname", "query": '<lucene query>'}* | Returns a list of values for a field using term aggregation and a specified lucene query filter. Query will use current dashboard time range as time range for query.
| *{"find": "terms", "field": "@hostname", "query": '<lucene query>'}* | Returns a list of values for a field using term aggregation and a specified lucene query filter. Query will use current dashboard time range as time range for query. |
There is a default size limit of 500 on terms queries. Set the size property in your query to set a custom limit.
There is a default size limit of 500 on terms queries. Set the size property in your query to set a custom limit.
You can use other variables inside the query. Example query definition for a variable named `$host`.
You can use other variables inside the query. Example query definition for a variable named `$host`.
...
@@ -185,13 +185,13 @@ Example dashboard:
...
@@ -185,13 +185,13 @@ Example dashboard:
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
Query | You can leave the search query blank or specify a lucene query.
| Query | You can leave the search query blank or specify a lucene query. |
Time | The name of the time field, needs to be date field.
| Time | The name of the time field, needs to be date field. |
Time End | Optional name of the time end field needs to be date field. If set, then annotations will be marked as a region between time and time-end.
| Time End | Optional name of the time end field needs to be date field. If set, then annotations will be marked as a region between time and time-end. |
Text | Event description field.
| Text | Event description field. |
Tags | Optional field name to use for event tags (can be an array or a CSV string).
| Tags | Optional field name to use for event tags (can be an array or a CSV string). |
@@ -27,12 +27,12 @@ Just add it as a data source and you are ready to query your log data in [Explor
...
@@ -27,12 +27,12 @@ Just add it as a data source and you are ready to query your log data in [Explor
1. Click the `Add data source` button at the top.
1. Click the `Add data source` button at the top.
1. Select `Loki` from the list of data sources.
1. Select `Loki` from the list of data sources.
> Note: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
| _Name_ | The data source name. This is how you refer to the data source in panels, queries, and Explore. |
| _Name_ | The data source name. This is how you refer to the data source in panels, queries, and Explore. |
| _Default_ | Default data source means that it will be pre-selected for new panels. |
| _Default_ | Default data source means that it will be pre-selected for new panels. |
| _URL_ | The URL of the Loki instance, e.g., `http://localhost:3100` |
| _URL_ | The URL of the Loki instance, e.g., `http://localhost:3100` |
| _Maximum lines_ | Upper limit for number of log lines returned by Loki (default is 1000). Decrease if your browser is sluggish when displaying logs in Explore. |
| _Maximum lines_ | Upper limit for number of log lines returned by Loki (default is 1000). Decrease if your browser is sluggish when displaying logs in Explore. |
...
@@ -124,7 +124,7 @@ The following filter types are currently supported:
...
@@ -124,7 +124,7 @@ The following filter types are currently supported:
*`|~` line matches regular expression.
*`|~` line matches regular expression.
*`!~` line does not match regular expression.
*`!~` line does not match regular expression.
> Note: For more details about LogQL, Loki's query language, refer to the [documentation](https://grafana.com/docs/loki/latest/logql/)
> **Note:** For more details about LogQL, Loki's query language, refer to the [documentation](https://grafana.com/docs/loki/latest/logql/)
## Live tailing
## Live tailing
...
@@ -135,7 +135,7 @@ Note that Live Tailing relies on two Websocket connections: one between the brow
...
@@ -135,7 +135,7 @@ Note that Live Tailing relies on two Websocket connections: one between the brow
> Note: This feature is only available in Grafana v6.3+
> **Note:** This feature is only available in Grafana v6.3+
## Log Context
## Log Context
...
@@ -143,7 +143,7 @@ When using a search expression as detailed above, you now have the ability to re
...
@@ -143,7 +143,7 @@ When using a search expression as detailed above, you now have the ability to re
By clicking the `Show Context` link on the filtered rows, you'll be able to investigate the log messages that came before and after the
By clicking the `Show Context` link on the filtered rows, you'll be able to investigate the log messages that came before and after the
log message you're interested in.
log message you're interested in.
> Note: This feature is only available in Grafana v6.3+
> **Note:** This feature is only available in Grafana v6.3+
## Templating
## Templating
...
@@ -155,7 +155,7 @@ Check out the [Templating]({{< relref "../../variables/templates-and-variables"
...
@@ -155,7 +155,7 @@ Check out the [Templating]({{< relref "../../variables/templates-and-variables"
You can use any non-metric Loki query as a source for annotations. Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
You can use any non-metric Loki query as a source for annotations. Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
> Note: Annotations for Loki are only available in Grafana v6.4+
> **Note:** Annotations for Loki are only available in Grafana v6.4+
@@ -21,16 +21,16 @@ Grafana ships with advanced support for OpenTSDB.
...
@@ -21,16 +21,16 @@ Grafana ships with advanced support for OpenTSDB.
3. Click the `+ Add data source` button in the top header.
3. Click the `+ Add data source` button in the top header.
4. Select *OpenTSDB* from the *Type* dropdown.
4. Select *OpenTSDB* from the *Type* dropdown.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
*Name* | The data source name. This is how you refer to the data source in panels and queries.
| *Name* | The data source name. This is how you refer to the data source in panels and queries. |
*Default* | Default data source means that it will be pre-selected for new panels.
| *Default* | Default data source means that it will be pre-selected for new panels. |
*Url* | The HTTP protocol, ip and port of you opentsdb server (default port is usually 4242)
| *Url* | The HTTP protocol, ip and port of you opentsdb server (default port is usually 4242) |
*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
| *Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
*Version* | Version = opentsdb version, either <=2.1 or 2.2
| *Version* | Version = opentsdb version, either <=2.1 or 2.2 |
*Resolution* | Metrics from opentsdb may have datapoints with either second or millisecond resolution.
| *Resolution* | Metrics from opentsdb may have datapoints with either second or millisecond resolution. |
## Query editor
## Query editor
...
@@ -40,7 +40,7 @@ can be used to query opentsdb. Fill Policy is also introduced in OpenTSDB 2.2.
...
@@ -40,7 +40,7 @@ can be used to query opentsdb. Fill Policy is also introduced in OpenTSDB 2.2.
![](/img/docs/v43/opentsdb_query_editor.png)
![](/img/docs/v43/opentsdb_query_editor.png)
> Note: While using OpenTSDB 2.2 data source, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.
> **Note:** While using OpenTSDB 2.2 data source, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.
### Auto complete suggestions
### Auto complete suggestions
...
@@ -63,13 +63,13 @@ that fetch the values from OpenTSDB. For example, metric names, tag names, or ta
...
@@ -63,13 +63,13 @@ that fetch the values from OpenTSDB. For example, metric names, tag names, or ta
When using OpenTSDB with a template variable of `query` type you can use following syntax for lookup.
When using OpenTSDB with a template variable of `query` type you can use following syntax for lookup.
*tag_values(cpu, hostname, env=$env)* | Return tag values for cpu metric, selected env tag value and tag key hostname
| *tag_values(cpu, hostname, env=$env)* | Return tag values for cpu metric, selected env tag value and tag key hostname |
*tag_values(cpu, hostname, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
| *tag_values(cpu, hostname, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname |
For details on OpenTSDB metric queries, check out the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
For details on OpenTSDB metric queries, check out the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
@@ -51,12 +51,12 @@ SELECT BUCKET(StartTime, 1h), AVG(Temperature) AS Temp, Location FROM T
...
@@ -51,12 +51,12 @@ SELECT BUCKET(StartTime, 1h), AVG(Temperature) AS Temp, Location FROM T
Might return a table with three columns that each respectively have data types time, number, and string.
Might return a table with three columns that each respectively have data types time, number, and string.
| StartTime | Temp | Location |
| StartTime | Temp | Location |
| ---------- | ---- | -------- |
| --------- | ---- | -------- |
| 09:00 | 24 | LGA |
| 09:00 | 24 | LGA |
| 09:00 | 20 | BOS |
| 09:00 | 20 | BOS |
| 10:00 | 26 | LGA |
| 10:00 | 26 | LGA |
| 10:00 | 22 | BOS |
| 10:00 | 22 | BOS |
The table format is _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
The table format is _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
...
@@ -66,22 +66,22 @@ Individual time series from the set are extracted by using the time typed column
...
@@ -66,22 +66,22 @@ Individual time series from the set are extracted by using the time typed column
If the query is updated to select and group by more than just one string column, for example, `GROUP BY BUCKET(StartTime, 1h), Location, Sensor`, then an additional dimension is added:
If the query is updated to select and group by more than just one string column, for example, `GROUP BY BUCKET(StartTime, 1h), Location, Sensor`, then an additional dimension is added:
| StartTime | Temp | Location | Sensor |
| StartTime | Temp | Location | Sensor |
| ---------- | ---- | -------- | ------ |
| --------- | ---- | -------- | ------ |
| 09:00 | 24 | LGA | A |
| 09:00 | 24 | LGA | A |
| 09:00 | 24.1 | LGA | B |
| 09:00 | 24.1 | LGA | B |
| 09:00 | 20 | BOS | A |
| 09:00 | 20 | BOS | A |
| 09:00 | 20.2 | BOS | B |
| 09:00 | 20.2 | BOS | B |
| 10:00 | 26 | LGA | A |
| 10:00 | 26 | LGA | A |
| 10:00 | 26.1 | LGA | B |
| 10:00 | 26.1 | LGA | B |
| 10:00 | 22 | BOS | A |
| 10:00 | 22 | BOS | A |
| 10:00 | 22.2 | BOS | B |
| 10:00 | 22.2 | BOS | B |
In this case the labels that represent the dimensions will have two keys based on the two string typed columns `Location` and `Sensor`. This data results four series: `Temp {Location=LGA,Sensor=A}`, `Temp {Location=LGA,Sensor=B}`, `Temp {Location=BOS,Sensor=A}`, and `Temp {Location=BOS,Sensor=B}`.
In this case the labels that represent the dimensions will have two keys based on the two string typed columns `Location` and `Sensor`. This data results four series: `Temp {Location=LGA,Sensor=A}`, `Temp {Location=LGA,Sensor=B}`, `Temp {Location=BOS,Sensor=A}`, and `Temp {Location=BOS,Sensor=B}`.
**Note:** More than one dimension for SQL data sources is currently only supported in the Analytics services with the Azure monitor service as of version 7.1. Support for SQL data sources such as MySQL, Postgres, and MSSQL is planned to be added for 7.2.
> **Note:** More than one dimension for SQL data sources is currently only supported in the Analytics services with the Azure monitor service as of version 7.1. Support for SQL data sources such as MySQL, Postgres, and MSSQL is planned to be added for 7.2.
**Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{<relref"../alerting/create-alerts.md#multiple-series">}}).
> **Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{< relref "../alerting/create-alerts.md#multiple-series" >}}).
@@ -28,7 +28,7 @@ Organizations via a role. That role can be:
...
@@ -28,7 +28,7 @@ Organizations via a role. That role can be:
-`Editor`: Can view, update and create dashboards.
-`Editor`: Can view, update and create dashboards.
-`Admin`: Everything an Editor can plus edit and add data sources and organization users.
-`Admin`: Everything an Editor can plus edit and add data sources and organization users.
> **Note** A `Viewer` can still view all metrics exposed through a data source, not only
> **Note:** A `Viewer` can still view all metrics exposed through a data source, not only
> the metrics used in already existing dashboards. That is because there are not
> the metrics used in already existing dashboards. That is because there are not
> per series permissions in Graphite, InfluxDB or OpenTSDB.
> per series permissions in Graphite, InfluxDB or OpenTSDB.
...
@@ -100,7 +100,7 @@ The top header has gotten a major streamlining in Grafana V2.0.
...
@@ -100,7 +100,7 @@ The top header has gotten a major streamlining in Grafana V2.0.
5.`Save dashboard`: Save the current Dashboard with the current name.
5.`Save dashboard`: Save the current Dashboard with the current name.
6.`Settings`: Manage Dashboard settings and features such as Templating, Annotations and the name.
6.`Settings`: Manage Dashboard settings and features such as Templating, Annotations and the name.
> **Note** In Grafana v2.0 when you change the title of a dashboard and then save it, it will no
> **Note:** In Grafana v2.0 when you change the title of a dashboard and then save it, it will no
> longer create a new Dashboard. It will just change the name for the current Dashboard.
> longer create a new Dashboard. It will just change the name for the current Dashboard.
> To change name and create a new Dashboard use the `Save As...` menu option
> To change name and create a new Dashboard use the `Save As...` menu option
...
@@ -170,6 +170,6 @@ Here you can update your user details, UI Theme, and change your password.
...
@@ -170,6 +170,6 @@ Here you can update your user details, UI Theme, and change your password.
Grafana now supports server-side PNG rendering. From the Panel share dialog you now have access to a link that will render a particular Panel to a PNG image.
Grafana now supports server-side PNG rendering. From the Panel share dialog you now have access to a link that will render a particular Panel to a PNG image.
> **Note** This requires that your Data Source is accessible from your Grafana instance.
> **Note:** This requires that your Data Source is accessible from your Grafana instance.
@@ -72,4 +72,4 @@ Using the Token that was created in the previous step, you can create a dashboar
...
@@ -72,4 +72,4 @@ Using the Token that was created in the previous step, you can create a dashboar
}' http://localhost:3000/api/dashboards/db
}' http://localhost:3000/api/dashboards/db
```
```
> **Note.** If you export a dashboard for sharing externally using the Share > Export menu in the Grafana UI, you cannot import that dashboard. Instead, click **View JSON** and save it to a file or fetch the JSON output through the API.
> **Note:** If you export a dashboard for sharing externally using the Share > Export menu in the Grafana UI, you cannot import that dashboard. Instead, click **View JSON** and save it to a file or fetch the JSON output through the API.
@@ -52,7 +52,7 @@ Grafana supports the following databases:
...
@@ -52,7 +52,7 @@ Grafana supports the following databases:
By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location.
By default, Grafana installs with and uses SQLite, which is an embedded database stored in the Grafana installation location.
> NOTE: PostgreSQL versions 9.5.18, 9.4.23, 9.6.14, 10.9, 11.4, and 12-beta2 are affected by a bug (tracked by the PostgreSQL project as [bug #15865](https://www.postgresql.org/message-id/flat/15865-17940eacc8f8b081%40postgresql.org)) which prevents those versions from being used with Grafana. The bug has been fixed in more recent versions of PostgreSQL.
> **Note:** PostgreSQL versions 9.5.18, 9.4.23, 9.6.14, 10.9, 11.4, and 12-beta2 are affected by a bug (tracked by the PostgreSQL project as [bug #15865](https://www.postgresql.org/message-id/flat/15865-17940eacc8f8b081%40postgresql.org)) which prevents those versions from being used with Grafana. The bug has been fixed in more recent versions of PostgreSQL.
## Supported web browsers
## Supported web browsers
...
@@ -64,4 +64,4 @@ Grafana is supported in the current version of the following browsers. Older ver
...
@@ -64,4 +64,4 @@ Grafana is supported in the current version of the following browsers. Older ver
- Microsoft Edge
- Microsoft Edge
- Internet Explorer 11 is only fully supported in Grafana versions prior v6.0.
- Internet Explorer 11 is only fully supported in Grafana versions prior v6.0.
> Note: Always enable JavaScript in your browser. Running Grafana without JavaScript enabled in the browser is not supported.
> **Note:** Always enable JavaScript in your browser. Running Grafana without JavaScript enabled in the browser is not supported.
@@ -231,7 +231,7 @@ Chrome 80 treats cookies as `SameSite=Lax` by default if no `SameSite` attribute
...
@@ -231,7 +231,7 @@ Chrome 80 treats cookies as `SameSite=Lax` by default if no `SameSite` attribute
Due to this change in Chrome, the `[security]` setting `cookie_samesite` configured to `none` now renders cookies with `SameSite=None` attribute compared to before where no `SameSite` attribute was added to cookies. To get the old behavior, use value `disabled` instead of `none`, see [cookie_samesite in Configuration]({{<relref"../administration/configuration/#cookie-samesite">}}) for more information.
Due to this change in Chrome, the `[security]` setting `cookie_samesite` configured to `none` now renders cookies with `SameSite=None` attribute compared to before where no `SameSite` attribute was added to cookies. To get the old behavior, use value `disabled` instead of `none`, see [cookie_samesite in Configuration]({{<relref"../administration/configuration/#cookie-samesite">}}) for more information.
**Note:** There is currently a bug affecting Mac OSX and iOS that causes `SameSite=None` cookies to be treated as `SameSite=Strict` and therefore not sent with cross-site requests, see https://bugs.webkit.org/show_bug.cgi?id=198181 for details. Until this is fixed, `SameSite=None` might not work properly on Safari.
> **Note:** There is currently a bug affecting Mac OSX and iOS that causes `SameSite=None` cookies to be treated as `SameSite=Strict` and therefore not sent with cross-site requests, see https://bugs.webkit.org/show_bug.cgi?id=198181 for details. Until this is fixed, `SameSite=None` might not work properly on Safari.
This version of Chrome also rejects insecure `SameSite=None` cookies. See https://www.chromestatus.com/feature/5633521622188032 for more information. Make sure that you
This version of Chrome also rejects insecure `SameSite=None` cookies. See https://www.chromestatus.com/feature/5633521622188032 for more information. Make sure that you
change the `[security]` setting `cookie_secure` to `true` and use HTTPS when `cookie_samesite` is configured to `none`, otherwise authentication in Grafana won't work properly.
change the `[security]` setting `cookie_secure` to `true` and use HTTPS when `cookie_samesite` is configured to `none`, otherwise authentication in Grafana won't work properly.
| [applyTemplateVariables(query, scopedVars)](#applytemplatevariables-method) | | Override to apply template variables. The result is usually also <code>TQuery</code>, but sometimes this can be used to modify the query structure before sending to the backend.<!-- -->NOTE: if you do modify the structure or use template variables, alerting queries may not work as expected |
| [applyTemplateVariables(query, scopedVars)](#applytemplatevariables-method) | | Override to apply template variables. The result is usually also <code>TQuery</code>, but sometimes this can be used to modify the query structure before sending to the backend.<!-- -->NOTE: if you do modify the structure or use template variables, alerting queries may not work as expected |
| [callHealthCheck()](#callhealthcheck-method) | | Run the datasource healthcheck |
| [callHealthCheck()](#callhealthcheck-method) | | Run the datasource healthcheck |
| [filterQuery(query)](#filterquery-method) | | Override to skip executing a query |
| [filterQuery(query)](#filterquery-method) | | Override to skip executing a query |
| [getResource(path, params)](#getresource-method) | | Make a GET request to the datasource resource path |
| [getResource(path, params)](#getresource-method) | | Make a GET request to the datasource resource path |
| [postResource(path, body)](#postresource-method) | | Send a POST request to the datasource resource path |
| [postResource(path, body)](#postresource-method) | | Send a POST request to the datasource resource path |
| [processResponse(res)](#processresponse-method) | | Optionally augment the response before returning the results to the |
| [processResponse(res)](#processresponse-method) | | Optionally augment the response before returning the results to the |
| [query(request)](#query-method) | | Ideally final -- any other implementation may not work as expected |
| [query(request)](#query-method) | | Ideally final -- any other implementation may not work as expected |
| [testDatasource()](#testdatasource-method) | | Checks the plugin health |
| [testDatasource()](#testdatasource-method) | | Checks the plugin health |
Override to apply template variables. The result is usually also `TQuery`<!-- -->, but sometimes this can be used to modify the query structure before sending to the backend.
Override to apply template variables. The result is usually also `TQuery`<!-- -->, but sometimes this can be used to modify the query structure before sending to the backend.
NOTE: if you do modify the structure or use template variables, alerting queries may not work as expected
> **Note:** if you do modify the structure or use template variables, alerting queries may not work as expected
<b>Signature</b>
<b>Signature</b>
...
@@ -69,10 +69,10 @@ applyTemplateVariables(query: TQuery, scopedVars: ScopedVars): Record<string, an
...
@@ -69,10 +69,10 @@ applyTemplateVariables(query: TQuery, scopedVars: ScopedVars): Record<string, an
@@ -38,7 +38,7 @@ Each organization can have one or more data sources.
...
@@ -38,7 +38,7 @@ Each organization can have one or more data sources.
All dashboards are owned by a particular organization.
All dashboards are owned by a particular organization.
> Note: Most metric databases do not provide per-user series authentication. This means that organization data sources and dashboards are available to all users in a particular organization.
> **Note:** Most metric databases do not provide per-user series authentication. This means that organization data sources and dashboards are available to all users in a particular organization.
Refer to [Organization roles]({{<relref"../permissions/organization_roles.md">}}) for more information.
Refer to [Organization roles]({{<relref"../permissions/organization_roles.md">}}) for more information.
@@ -39,7 +39,7 @@ Each organization can have one or more data sources.
...
@@ -39,7 +39,7 @@ Each organization can have one or more data sources.
All dashboards are owned by a particular organization.
All dashboards are owned by a particular organization.
> Note: Most metric databases do not provide per-user series authentication. This means that organization data sources and dashboards are available to all users in a particular organization.
> **Note:** Most metric databases do not provide per-user series authentication. This means that organization data sources and dashboards are available to all users in a particular organization.
Refer to [Organization roles]({{<relref"../permissions/organization_roles.md">}}) for more information.
Refer to [Organization roles]({{<relref"../permissions/organization_roles.md">}}) for more information.
@@ -22,7 +22,7 @@ To view the JSON of a dashboard, follow the steps mentioned below:
...
@@ -22,7 +22,7 @@ To view the JSON of a dashboard, follow the steps mentioned below:
When a user creates a new dashboard, a new dashboard JSON object is initialized with the following fields:
When a user creates a new dashboard, a new dashboard JSON object is initialized with the following fields:
> Note: In the following JSON, id is shown as null which is the default value assigned to it until a dashboard is saved. Once a dashboard is saved, an integer value is assigned to the `id` field.
> **Note:** In the following JSON, id is shown as null which is the default value assigned to it until a dashboard is saved. Once a dashboard is saved, an integer value is assigned to the `id` field.
```json
```json
{
{
...
@@ -58,24 +58,24 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
...
@@ -58,24 +58,24 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
```
```
Each field in the dashboard JSON is explained below with its usage:
Each field in the dashboard JSON is explained below with its usage:
The styles will be injected via `style` tag during runtime.
The styles will be injected via `style` tag during runtime.
> Note that imported static assets will be inlined as base64 URIs. _This can be subject of change in the future!_
> **Note:** that imported static assets will be inlined as base64 URIs. _This can be subject of change in the future!_
#### Theme-specific stylesheets
#### Theme-specific stylesheets
...
@@ -192,7 +192,7 @@ loadPluginCss({
...
@@ -192,7 +192,7 @@ loadPluginCss({
You must add `@grafana/runtime` to your plugin dependencies by running `yarn add @grafana/runtime` or `npm install @grafana/runtime`.
You must add `@grafana/runtime` to your plugin dependencies by running `yarn add @grafana/runtime` or `npm install @grafana/runtime`.
> Note that in this case static files (png, svg, json, html) are all copied to dist directory when the plugin is bundled. Relative paths to those files does not change!
> **Note:** that in this case static files (png, svg, json, html) are all copied to dist directory when the plugin is bundled. Relative paths to those files does not change!