Docs: Sync latest master docs with 7.5.x (#33156)

* Docs: Sync latest master docs with 7.5.x

* remove some remaining next aliases and links

* Docs: Removed v8 doc changes

* fixed merge issue
This commit is contained in:
Torkel Ödegaard
2021-04-22 07:32:32 +02:00
committed by GitHub
parent 5ee4c694ea
commit ceeb381eae
86 changed files with 1928 additions and 502 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
<h4>Configure Grafana</h4>
<p>Review the configuration and setup options.</p>
</a>
<a href="{{< relref "getting-started/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "basics/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Intro to time series</h4>
<p>Learn about time series data.</p>
</a>
+9 -3
View File
@@ -36,7 +36,7 @@ Refer to [Configure a Grafana Docker image]({{< relref "configure-docker.md" >}}
### macOS
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. To configure Grafana, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. For a Grafana instance installed using Homebrew, edit the `grafana.ini` file directly. Otherwise, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
## Comments in .ini Files
@@ -266,7 +266,7 @@ Path where the socket should be created when `protocol=socket`. Make sure that G
Specify a full HTTP URL address to the root of your Grafana CDN assets. Grafana will add edition and version paths.
For example, given a cdn url like `https://cdn.myserver.com` grafana will try to load a javascript file from
`http://cdn.myserver.com/grafana-oss/v7.4.0/public/build/app.<hash>.js`.
`http://cdn.myserver.com/grafana-oss/7.4.0/public/build/app.<hash>.js`.
### read_timeout
@@ -803,6 +803,12 @@ Use the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/A
<hr />
## [auth.jwt]
Refer to [JWT authentication]({{< relref "../auth/jwt.md" >}}) for more information.
<hr />
## [smtp]
Email server settings.
@@ -1526,7 +1532,7 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
### enable
Keys of alpha features to enable, separated by space. Available alpha features are: `transformations`,`ngalert`
Keys of alpha features to enable, separated by space. Available alpha features are: `ngalert`
## [date_formats]
@@ -7,7 +7,9 @@ weight = 300
# Image rendering
Grafana supports automatic rendering of panels and dashboards as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}).
Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}).
>**Note:** Image rendering of dashboards is not supported at this time.
While an image is being rendered, the PNG image is temporarily written to the file system. When the image is rendered, the PNG image is temporarily written to the `png` folder in the Grafana `data` folder.
@@ -29,7 +31,7 @@ Alert notifications can include images, but rendering many images at the same ti
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chrome.
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/installation).
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/?tab=installation).
## Run in custom Grafana Docker image
+5 -3
View File
@@ -147,6 +147,7 @@ Since not all datasources have the same configuration settings we only have the
| tlsAuthWithCACert | boolean | _All_ | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
| serverName | string | _All_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
| timeout | string | _All_ | Request timeout in seconds. Overrides dataproxy.timeout option |
| 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. |
| httpMode | string | Influxdb | HTTP Method. 'GET', 'POST', defaults to GET |
@@ -307,9 +308,9 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
### Reusable Dashboard URLs
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given since the new dashboard URL uses the uid as identifier.
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.
If the dashboard in the JSON file contains an [UID]({{< relref "../dashboards/json-model.md" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
By default, Grafana deletes 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
> which leads to problems if you re-use settings that are supposed to be unique.
@@ -541,6 +542,7 @@ The following sections detail the supported settings and secure settings for eac
| apiUrl | |
| autoClose | |
| overridePriority | |
| sendTagsAs | |
#### Alert notification `telegram`
+4 -2
View File
@@ -37,8 +37,10 @@ The actual notifications are configured and shared between multiple alerts.
## Alert execution
Alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`.
of core Grafana. Alert rules can query only backend data sources with alerting enabled. Such data sources are:
- builtin or developed and maintained by grafana, such as: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../developers/plugins/metadata.md" >}}))
## Metrics from the alert engine
+27 -11
View File
@@ -59,7 +59,7 @@ Hipchat | `hipchat` | yes, external only | no
[Kafka](#kafka) | `kafka` | yes, external only | no
Line | `line` | yes, external only | no
Microsoft Teams | `teams` | yes, external only | no
OpsGenie | `opsgenie` | yes, external only | yes
[Opsgenie](#opsgenie) | `opsgenie` | yes, external only | yes
[Pagerduty](#pagerduty) | `pagerduty` | yes, external only | yes
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
[Pushover](#pushover) | `pushover` | yes | no
@@ -68,7 +68,7 @@ Sensu | `sensu` | yes, external only | no
[Slack](#slack) | `slack` | yes | no
Telegram | `telegram` | yes | no
Threema | `threema` | yes, external only | no
VictorOps | `victorops` | yes, external only | no
VictorOps | `victorops` | yes, external only | yes
[Webhook](#webhook) | `webhook` | yes, external only | yes
[Zenduty](#zenduty) | `webhook` | yes, external only | yes
@@ -111,6 +111,19 @@ Token | If provided, Grafana will upload the generated image via Slack's file.up
If you are using the token for a slack bot, then you have to invite the bot to the channel you want to send notifications and add the channel to the recipient field.
### Opsgenie
To setup Opsgenie you will need an API Key and the Alert API Url. These can be obtained by configuring a new [Grafana Integration](https://docs.opsgenie.com/docs/grafana-integration).
Setting | Description
--------|------------
Alert API URL | The API URL for your Opsgenie instance. This will normally be either `https://api.opsgenie.com` or, for EU customers, `https://api.eu.opsgenie.com`.
API Key | The API Key as provided by Opsgenie for your configured Grafana integration.
Override priority | Configures the alert priority using the `og_priority` tag. The `og_priority` tag must have one of the following values: `P1`, `P2`, `P3`, `P4`, or `P5`. Default is `False`.
Send notification tags as | Specify how you would like [Notification Tags]({{< relref "create-alerts.md/#notifications" >}}) delivered to Opsgenie.
> **Note:** When notification tags are sent as `Tags` they are concatenated into a string with a `key:value` format.
### PagerDuty
To set up PagerDuty, all you have to do is to provide an integration key.
@@ -133,6 +146,11 @@ This behavior will become the default in a future version of Grafana.
> **Note:** The `state` tag overrides the current alert state inside the `custom_details` payload.
### VictorOps
To configure VictorOps, provide the URL from the Grafana Integration and substitute `$routing_key` with a valid key.
> **Note:** The tag `Severity` has special meaning in the [VictorOps Incident Fields](https://help.victorops.com/knowledge-base/incident-fields-glossary/). If an alert panel defines this key, then it replaces the `message_type` in the root of the event sent to VictorOps.
### Pushover
To set up Pushover, you must provide a user key and an API token. Refer to [What is Pushover and how do I use it](https://support.pushover.net/i7-what-is-pushover-and-how-do-i-use-it) for instructions on how to generate them.
@@ -186,23 +204,21 @@ Example json body:
### 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).
DingTalk supports the following "message type": `text`, `link` and `markdown`. Only the `link` message type is supported. Refer to the [configuration instructions](https://developers.dingtalk.com/document/app/custom-robot-access) in Chinese language.
In DingTalk PC Client:
1. Click "more" icon on upper right of the panel.
1. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
1. In the "Robot Manage" panel, select "customized: customized robot with Webhook".
3. In the "Robot Manage" panel, select "customized: customized robot with Webhook".
1. In the next new panel named "robot detail", click "Add" button.
4. In the next new panel named "robot detail", click "Add" button.
1. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
5. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
1. 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 `link` message type is supported.
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".
### Kafka
@@ -251,4 +267,4 @@ This URL is based on the [domain]({{< relref "../administration/configuration/#d
> **Note:** Alert notification templating is only available in Grafana v7.4 and above.
The alert notification template feature allows you to take the [label]({{< relref "../getting-started/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}).
The alert notification template feature allows you to take the [label]({{< relref "../basics/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}).
+2
View File
@@ -194,6 +194,8 @@ To ease configuration of a proper JMESPath expression, you can test/evaluate exp
### Role mapping
If  the`role_attribute_path` property does not return a role, then the user is assigned the `Viewer` role by default. You can disable the role assignment by setting `role_attribute_strict = true`. It denies user access if no role or an invalid role is returned.
**Basic example:**
In the following example user will get `Editor` as role when authenticating. The value of the property `role` will be the resulting role if the role is a proper Grafana role, i.e. `Viewer`, `Editor` or `Admin`.
+92
View File
@@ -0,0 +1,92 @@
+++
title = "JWT Authentication"
description = "Grafana JWT Authentication"
keywords = ["grafana", "configuration", "documentation", "jwt", "jwk"]
weight = 250
+++
# JWT authentication
You can configure Grafana to accept a JWT token provided in the HTTP header. The token is verified using any of the following:
- PEM-encoded key file
- JSON Web Key Set (JWKS) in a local file
- JWKS provided by the configured JWKS endpoint
## Enable JWT
To use JWT authentication:
1. Enable JWT in the [main config file]({{< relref "../administration/configuration.md" >}}).
1. Specify the header name that contains a token.
```ini
[auth.jwt]
# By default, auth.jwt is disabled.
enabled = true
# HTTP header to look into to get a JWT token.
header_name = X-JWT-Assertion
```
## Configure login claim
To identify the user, some of the claims needs to be selected as a login info. You could specify a claim that contains either a username or an email of the Grafana user.
Typically, the subject claim called `"sub"` would be used as a login but it might also be set to some application specific claim.
```ini
# [auth.jwt]
# ...
# Specify a claim to use as a username to sign in.
username_claim = sub
# Specify a claim to use as an email to sign in.
email_claim = sub
```
## Signature verification
JSON web token integrity needs to be verified so cryptographic signature is used for this purpose. So we expect that every token must be signed with some known cryptographic key.
You have a variety of options on how to specify where the keys are located.
### Verify token using a JSON Web Key Set loaded from https endpoint
For more information on JWKS endpoints, refer to [Auth0 docs](https://auth0.com/docs/tokens/json-web-tokens/json-web-key-sets).
```ini
# [auth.jwt]
# ...
jwk_set_url = https://your-auth-provider.example.com/.well-known/jwks.json
# Cache TTL for data loaded from http endpoint.
cache_ttl = 60m
```
### Verify token using a JSON Web Key Set loaded from JSON file
Key set in the same format as in JWKS endpoint but located on disk.
```ini
jwk_set_file = /path/to/jwks.json
```
### Verify token using a single key loaded from PEM-encoded file
PEM-encoded key file in PKIX, PKCS #1, PKCS #8 or SEC 1 format.
```ini
key_file = /path/to/key.pem
```
## Validate claims
By default, only `"exp"`, `"nbf"` and `"iat"` claims are validated.
You might also want to validate that other claims are really what you expect them to be.
```ini
# This can be seen as a required "subset" of a JWT Claims Set.
expect_claims = {"iss": "https://your-token-issuer", "your-custom-claim": "foo"}
```
+1 -1
View File
@@ -122,7 +122,7 @@ oauth_auto_login = true
### Hide sign-out menu
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy or JWT authentication.
```bash
[auth]
+14
View File
@@ -0,0 +1,14 @@
+++
title = "Grafana basics"
weight = 15
+++
# Grafana basics
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.
{{< docs/shared "basics/what-is-grafana.md" >}}
{{< docs/shared "basics/grafana-cloud.md" >}}
{{< docs/shared "basics/grafana-enterprise.md" >}}
+119
View File
@@ -0,0 +1,119 @@
+++
title = "Glossary"
description = "Grafana glossary"
keywords = ["grafana", "intro", "glossary", "dictionary"]
aliases = ["/docs/grafana/latest/guides/glossary", "/docs/grafana/latest/getting-started/glossary"]
weight = 800
+++
# Glossary
This topic lists words and abbreviations that are commonly used in the Grafana documentation and community.
<table>
<tr>
<td style="vertical-align: top">Dashboard</td>
<td>
A set of one or more panels, organized and arranged into one or more rows, that provide an at-a-glance view of related information.
</td>
</tr>
<tr>
<td style="vertical-align: top">Data source</td>
<td>
A file, database, or service providing the data. Grafana supports several data sources by default, and can be extended to support additional data sources through plugins.
</td>
</tr>
<tr>
<td style="vertical-align: top">Exemplar</td>
<td>
An exemplar is any data that serves as a detailed example of one of the observations aggregated into a metric. An exemplar contains the observed value together with an optional timestamp and arbitrary labels, which are typically used to reference a trace.
</td>
</tr>
<tr>
<td style="vertical-align: top">Explore</td>
<td>
Explore allows a user to focus on building a query. Users can refine the query to return the expected metrics before building a dashboard. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/explore">Explore</a> topic.
</td>
</tr>
<tr>
<td style="vertical-align: top">Export/Import dashboard</td>
<td>
Grafana includes the ability to export your dashboards to a file containing JSON. Community members sometimes share their created dashboards on the <a href="https://grafana.com/grafana/dashboards">Grafana Dashboards page</a>. Dashboards previously exported or found on this site may be imported by other users.
</td>
</tr>
<tr>
<td style="vertical-align: top">Exporter</td>
<td>
An exporter translates data that comes out of a data source into a format that Prometheus can digest.
</td>
</tr>
<tr>
<td style="vertical-align: top">Integration (Grafana Cloud)</td>
<td>
Each Integration in Grafana Cloud uses the cloud agent to connect your data source to Grafana Cloud for visualizing. Note: Prometheus uses the word “integrations” to refer to software that exposes Prometheus metrics without needing an exporter, which is a different use of the same word we use here.
</td>
</tr>
<tr>
<td style="vertical-align: top">Graph</td>
<td>
A commonly-used visualization that displays data as points, lines, or bars.
</td>
</tr>
<tr>
<td style="vertical-align: top">Mixin</td>
<td>
A mixin is a set of Grafana dashboards and Prometheus rules and alerts, written in Jsonnet and packaged together in a bundle.
</td>
</tr>
<tr>
<td style="vertical-align: top">Panel</td>
<td>
Basic building block in Grafana, composed by a query and a visualization. Can be moved and resized within a dashboard.
</td>
</tr>
<tr>
<td style="vertical-align: top">Plugin</td>
<td>
An extension of Grafana that allows users to provide additional functionality to enhance their experience. The types of plugins currently supported are:
<ul>
<li>
<b>App plugin:</b> Extends Grafana with a customized experience. It includes a set of panel and data source plugins, as well as custom pages.
</li>
<li>
<b>Data source plugin:</b> Extends Grafana with support for additional data sources.
</li>
<li>
<b>Panel plugin:</b> Extends Grafana with additional visualization options.
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top">Query</td>
<td>
Used to request data from a data source. The structure and format of the query depend on the specific data source.
</td>
</tr>
<tr>
<td style="vertical-align: top">Time series</td>
<td>
A series of measurements, ordered by time. Time series are stored in data sources and returned as the result of a query.
</td>
</tr>
<tr>
<td style="vertical-align: top">Trace</td>
<td>
An observed execution path of a request through a distributed system. For more information, refer to <a href="https://opentracing.io/docs/overview/what-is-tracing/">What is Distributed Tracing?</a>
</td>
</tr>
<tr>
<td style="vertical-align: top">Transformation</td>
<td>
Transformations process the result set of a query before it’s passed on for visualization. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/panels/transformations">Transformations overview</a> topic.
</td>
</tr>
<tr>
<td style="vertical-align: top">Visualization</td>
<td>A graphical representation of query results.</td>
</tr>
</table>
+55
View File
@@ -0,0 +1,55 @@
+++
title = "Histograms and heatmaps"
description = "An introduction to histograms and heatmaps"
keywords = ["grafana", "heatmap", "panel", "documentation", "histogram"]
aliases = ["/docs/grafana/latest/getting-started/intro-histograms"]
weight = 700
+++
# Introduction to histograms and heatmaps
A histogram is a graphical representation of the distribution of numerical data. It groups values into buckets
(sometimes also called bins) and then counts how many values fall into each bucket.
Instead of graphing the actual values, histograms graph the buckets. Each bar represents a bucket,
and the bar height represents the frequency (such as count) of values that fell into that bucket's interval.
## Histogram example
This histogram shows the value distribution of a couple of time series. You can easily see that
most values land between 240-300 with a peak between 260-280.
![](/img/docs/v43/heatmap_histogram.png)
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is you cannot see any trends or changes in the distribution over time.
This is where heatmaps become useful.
## Heatmaps
A _heatmap_ is like a histogram, but over time where each time slice represents its own histogram. Instead of using bar height as a representation of frequency, it uses cells and colors the cell proportional to the number of values in the bucket.
In this example, you can clearly see what values are more common and how they trend over time.
![](/img/docs/v43/heatmap_histogram_over_time.png)
## Pre-bucketed data
There are a number of data sources supporting histogram over time like Elasticsearch (by using a Histogram bucket
aggregation) or Prometheus (with [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric type
and *Format as* option set to Heatmap). But generally, any data source could be used if it meets the requirements:
returns series with names representing bucket bound or returns series sorted by the bound in ascending order.
## Raw data vs aggregated
If you use the heatmap with regular time series data (not pre-bucketed), then it's important to keep in mind that your data
is often already aggregated by your time series backend. Most time series queries do not return raw sample data
but include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
This all depends on the time range of your query of course. But the important point is to know that the histogram bucketing
that Grafana performs might be done on already aggregated and averaged data. To get more accurate heatmaps it is better
to do the bucketing during metric collection or store the data in Elasticsearch, or in the other data source which
supports doing histogram bucketing on the raw data.
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points your heatmap will be
more accurate but this can also be very CPU and memory taxing for your browser and could cause hangs and crashes if the number of
data points becomes unreasonably large.
@@ -0,0 +1,85 @@
+++
title = "Time series dimensions"
description = "time series dimensions"
keywords = ["grafana", "intro", "guide", "concepts", "timeseries", "labels"]
aliases = ["/docs/grafana/latest/guides/timeseries-dimensions", "/docs/grafana/latest/getting-started/timeseries-dimensions"]
weight = 600
+++
# Time series dimensions
In [Introduction to time series]({{< relref "timeseries.md#time-series-databases" >}}), the concept of _labels_, also called _tags_, is introduced:
> Another feature of a TSDB is the ability to filter measurements using _tags_. Each data point is labeled with a tag that adds context information, such as where the measurement was taken.
With time series data, the data often contain more than a single series, and is a set of multiple time series. Many Grafana data sources support this type of data.
{{< docs-imagebox img="/img/docs/example_graph_multi_dim.png" class="docs-image--no-shadow" max-width="850px" >}}
The common case is issuing a single query for a measurement with one or more additional properties as dimensions. For example, querying a temperature measurement along with a location property. In this case, multiple series are returned back from that single query and each series has unique location as a dimension.
To identify unique series within a set of time series, Grafana stores dimensions in _labels_.
## Labels
Each time series in Grafana optionally has labels. labels are set a of key/value pairs for identifying dimensions. Example labels could are `{location=us}` or `{country=us,state=ma,city=boston}`. Within a set of time series, the combination of its name and labels identifies each series. For example, `temperature {country=us,state=ma,city=boston}`.
Different sources of time series data have dimensions stored natively, or common storage patterns that allow the data to be extracted into dimensions.
Time series databases (TSDBs) usually natively support dimensionality. Prometheus also stores dimensions in _labels_. In TSDBs such as Graphite or OpenTSDB the term _tags_ is used instead.
In table databases such SQL, these dimensions are generally the `GROUP BY` parameters of a query.
## Multiple dimensions in table format
In SQL or SQL-like databases that return table responses, additional dimensions usually columns in the query response table.
### Single dimension
For example, consider a query like:
```sql
SELECT BUCKET(StartTime, 1h), AVG(Temperature) AS Temp, Location FROM T
GROUP BY BUCKET(StartTime, 1h), Location
ORDER BY time asc
```
Might return a table with three columns that each respectively have data types time, number, and string.
| StartTime | Temp | Location |
| --------- | ---- | -------- |
| 09:00 | 24 | LGA |
| 09:00 | 20 | BOS |
| 10:00 | 26 | LGA |
| 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}`.
Individual time series from the set are extracted by using the time typed column `StartTime` as the time index of the time series, the numeric typed column `Temp` as the series name, and the name and values of the string typed `Location` column to build the labels, such as Location=LGA.
### Multiple dimensions
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 |
| --------- | ---- | -------- | ------ |
| 09:00 | 24 | LGA | A |
| 09:00 | 24.1 | LGA | B |
| 09:00 | 20 | BOS | A |
| 09:00 | 20.2 | BOS | B |
| 10:00 | 26 | LGA | A |
| 10:00 | 26.1 | LGA | B |
| 10:00 | 22 | BOS | A |
| 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}`.
> **Note:** More than one dimension is currently only supported in the Logs queries within the Azure Monitor service as of version 7.1.
> **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" >}}).
### Multiple values
In the case SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames.md#data-frames-as-time-series" >}}).
+123
View File
@@ -0,0 +1,123 @@
+++
title = "Time series"
description = "Introduction to time series"
keywords = ["grafana", "intro", "guide", "concepts", "timeseries"]
aliases = ["/docs/grafana/latest/guides/timeseries", "/docs/grafana/latest/getting-started/timeseries"]
weight = 500
+++
# Introduction to time series
Imagine you wanted to know how the temperature outside changes throughout the day. Once every hour, you'd check the thermometer and write down the time along with the current temperature. After a while, you'd have something like this:
| Time | Value |
| ----- | ----- |
| 09:00 | 24°C |
| 10:00 | 26°C |
| 11:00 | 27°C |
Temperature data like this is one example of what we call a *time series*—a sequence of measurements, ordered in time. Every row in the table represents one individual measurement at a specific time.
Tables are useful when you want to identify individual measurements but make it difficult to see the big picture. A more common visualization for time series is the _graph_, which instead places each measurement along a time axis. Visual representations like the graph make it easier to discover patterns and features of the data that otherwise would be difficult to see.
{{< docs-imagebox img="/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
Temperature data like the one in the example, is far from the only example of a time series. Other examples of time series are:
- CPU and memory usage
- Sensor data
- Stock market index
While each of these examples are sequences of chronologically ordered measurements, they also share other attributes:
- New data is appended at the end, at regular intervals—for example, hourly at 09:00, 10:00, 11:00, and so on.
- Measurements are seldom updated after they were added—for example, yesterday's temperature doesn't change.
Time series are powerful. They help you understand the past by letting you analyze the state of the system at any point in time. Time series could tell you that the server crashed moments after the free disk space went down to zero.
Time series can also help you predict the future, by uncovering trends in your data. If the number of registered users has been increasing monthly by 4% for the past few months, you can predict how big your user base is going to be at the end of the year.
Some time series have patterns that repeat themselves over a known period. For example, the temperature is typically higher during the day, before it dips down at night. By identifying these periodic, or _seasonal_, time series, you can make confident predictions about the next period. If we know that the system load peaks every day around 18:00, we can add more machines right before.
## Aggregating time series
Depending on what you're measuring, the data can vary greatly. What if you wanted to compare periods longer than the interval between measurements? If you'd measure the temperature once every hour, you'd end up with 24 data points per day. To compare the temperature in August over the years, you'd have to combine the 31 times 24 data points into one.
Combining a collection of measurements is called _aggregation_. There are several ways to aggregate time series data. Here are some common ones:
- **Average** returns the sum of all values divided by the total number of values.
- **Min** and **Max** return the smallest, and largest value in the collection.
- **Sum** returns the sum of all values in the collection.
- **Count** returns the number of values in the collection.
For example, by aggregating the data in a month, you can determine that August 2017 was, on average, warmer than the year before. Instead, to see which month had the highest temperature, you'd compare the maximum temperature for each month.
How you choose to aggregate your time series data is an important decision and depends on the story you want to tell with your data. It's common to use different aggregations to visualize the same time series data in different ways.
## Time series and monitoring
In the IT industry, time series data is often collected to monitor things like infrastructure, hardware, or application events. Machine-generated time series data is typically collected with short intervals, which allows you to react to any unexpected changes, moments after they occur. As a consequence, data accumulates at a rapid pace, making it vital to have a way to store and query data efficiently. As a result, databases optimized for time series data have seen a rise in popularity in recent years.
### Time series databases
A time series database (TSDB) is a database explicitly designed for time series data. While it's possible to use any regular database to store measurements, a TSDB comes with some useful optimizations.
Modern time series databases take advantage of the fact that measurements are only ever appended, and rarely updated or removed. For example, the timestamps for each measurement change very little over time, which results in redundant data being stored.
Look at this sequence of Unix timestamps:
```
1572524345, 1572524375, 1572524404, 1572524434, 1572524464
```
Looking at these timestamps, they all start with `1572524`, leading to poor use of disk space. Instead, we could store each subsequent timestamp as the difference, or _delta_, from the first one:
```
1572524345, +30, +29, +30, +30
```
We could even take it a step further, by calculating the deltas of these deltas:
```
1572524345, +30, -1, +1, +0
```
If measurements are taken at regular intervals, most of these delta-of-deltas will be 0. Because of optimizations like these, TSDBs uses drastically less space than other databases.
Another feature of a TSDB is the ability to filter measurements using _tags_. Each data point is labeled with a tag that adds context information, such as where the measurement was taken. Here's an example of the [InfluxDB data format](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/#syntax) that demonstrates how each measurement is stored.
Here are some of the TSDBs supported by Grafana:
- [Graphite](https://graphiteapp.org/)
- [InfluxDB](https://www.influxdata.com/products/influxdb-overview/)
- [Prometheus](https://prometheus.io/)
```
weather,location=us-midwest temperature=82 1465839830100400200
| -------------------- -------------- |
| | | |
| | | |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+
```
### Collecting time series data
Now that we have a place to store our time series, how do we actually gather the measurements? To collect time series data, you'd typically install a _collector_ on the device, machine, or instance you want to monitor. Some collectors are made with a specific database in mind, and some support different output destinations.
Here are some examples of collectors:
- [collectd](https://collectd.org/)
- [statsd](https://github.com/statsd/statsd)
- [Prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/)
- [Telegraf](https://github.com/influxdata/telegraf)
A collector either _pushes_ data to a database or lets the database _pull_ the data from it. Both methods come with their own set of pros and cons:
| | Pros | Cons |
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Push | Easier to replicate data to multiple destinations. | The TSDB has no control over how much data gets sent. |
| Pull | Better control of how much data that gets ingested, and its authenticity. | Firewalls, VPNs or load balancers can make it hard to access the agents. |
Since it would be inefficient to write every measurement to the database, collectors pre-aggregate the data and write to the time series database at regular intervals.
-2
View File
@@ -12,5 +12,3 @@ This section provides information about best practices for intermediate Grafana
- [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards" >}})
- [Common observability strategies]({{< relref "common-observability-strategies" >}})
- [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels" >}})
+1 -1
View File
@@ -46,6 +46,6 @@ The Dashboard Folder Page is similar to the Manage Dashboards page and is where
Permissions can be assigned to a folder and inherited by the containing dashboards. An Access Control List (ACL) is used where
**Organization Role**, **Team** and Individual **User** can be assigned permissions. Read the
[Dashboard and Folder Permissions]({{< relref "../permissions/dashboard_folder_permissions.md" >}}) docs for more detail
[Dashboard and Folder Permissions]({{< relref "../permissions/dashboard-folder-permissions.md" >}}) docs for more detail
on the permission system.
@@ -26,8 +26,12 @@ Here are some examples:
| Last 5 minutes | `now-5m` | `now` |
| The day so far | `now/d` | `now` |
| This week | `now/w` | `now/w` |
| Week to date | `now/w` | `now` |
| This week so far | `now/w` | `now` |
| This month | `now/M` | `now/M` |
| This month so far | `now/M` | `now` |
| Previous Month | `now-1M/M` | `now-1M/M` |
| This year so far | `now/Y` | `now` |
| This Year | `now/Y` | `now/Y |
## Common time range controls
+2 -2
View File
@@ -6,11 +6,11 @@ weight = 60
# Data sources
Grafana supports many different storage backends for your time series data (data source). Each data source has a specific Query Editor that is customized for the features and capabilities that the particular data source exposes.
Grafana supports many different storage backends for your time series data (data source). Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
## Querying
The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources onto a single Dashboard, but each Panel is tied to a specific data source that belongs to a particular Organization.
Each data source has a specific Query Editor that is customized for the features and capabilities that the particular data source exposes. The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources onto a single Dashboard, but each Panel is tied to a specific data source that belongs to a particular Organization.
## Supported data sources
+17 -7
View File
@@ -6,7 +6,7 @@ weight = 100
# Add a data source
Before you create your first dashboard, you need to add your data source. Following are the list of instructions to create one.
Before you can create your first dashboard, you need to add your data source.
> **Note:** Only users with the organization Admin role can add data sources.
@@ -14,15 +14,25 @@ Before you create your first dashboard, you need to add your data source. Follow
where you can add and edit data sources. You can also click the cog.
{{< docs-imagebox img="/img/docs/v52/sidemenu-datasource.png" max-width="250px" class="docs-image--no-shadow">}}
1. Click **Add data source** and you will come to the settings page of your new data source.
1. Move your cursor to the cog icon on the side menu which will show the configuration options.
{{< docs-imagebox img="/img/docs/v75/sidemenu-datasource-7-5.png" max-width="150px" class="docs-image--no-shadow">}}
{{< docs-imagebox img="/img/docs/v52/add-datasource.png" max-width="700px" class="docs-image--no-shadow">}}
1. Click on **Data Sources**. The data sources page opens showing a list of previously configured data sources for the Grafana instance.
1. In the **Name** box, enter a name for this data source.
1. Click **Add data source** to see a list of all supported data sources.
{{< docs-imagebox img="/img/docs/v75/add-data-source-7-5.png" max-width="600px" class="docs-image--no-shadow">}}
1. Search for a specific data source by entering the name in the search dialog. Or you can scroll through supported data sources grouped into time series, logging, tracing and other categories.
{{< docs-imagebox img="/img/docs/v52/datasource-settings.png" max-width="700px" class="docs-image--no-shadow">}}
1. Move the cursor over the data source you want to add.
{{< docs-imagebox img="/img/docs/v75/select-data-source-7-5.png" max-width="700px" class="docs-image--no-shadow">}}
1. Click **Select**. The data source configuration page opens.
1. Configure the data source following instructions specific to that data source. See [Data sources]({{< relref "_index.md" >}}) for links to configuration instructions for all supported data sources.
1. In the **Type**, select the type of data source. See [Supported data sources]({{< relref "_index.md#supported-data-sources" >}}) for more information and how to configure your data source settings.
1. Click **Save & Test**.
+1 -5
View File
@@ -6,11 +6,7 @@ aliases = ["/docs/grafana/latest/features/datasources/azuremonitor"]
weight = 300
+++
# Using Azure Monitor in Grafana
> Officially released in Grafana v6.0.0
As of Grafana 6.0, the Azure Monitor plugin has been moved into Grafana so it now ships with built-in support for Azure Monitor.
# Azure Monitor data source
The Azure Monitor data source supports multiple services in the Azure cloud:
+10 -12
View File
@@ -6,19 +6,17 @@ aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
weight = 200
+++
# Using AWS CloudWatch in Grafana
# AWS CloudWatch data source
Grafana ships with built-in support for CloudWatch. Add it as a data source, then you are ready to
build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
Grafana ships with built-in support for CloudWatch. Add it as a data source, then you are ready to build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
## Adding the data source
This topic explains options, variables, querying, and other options specific to this data source. Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
1. In the side menu under the `Configuration` link, click on `Data Sources`.
1. Click the `Add data source` button.
1. Select `Cloudwatch` in the `Cloud` section.
> **Note:** If you have issues with getting this data source to work and Grafana is giving you undescriptive errors, then check your log file (try looking in /var/log/grafana/grafana.log).
> **Note:** If at any moment you have issues with getting this data source to work and Grafana is giving you undescriptive errors then don't
> forget to check your log file (try looking in /var/log/grafana/grafana.log).
## Cloudwatch settings
To access data source settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the AWS Cloudwatch data source.
| Name | Description |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
@@ -298,7 +296,7 @@ Filters syntax:
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us-east-1, InstanceId, { "tag:Environment": ["production"] });
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
```
### Selecting attributes
@@ -339,7 +337,7 @@ Tags can be selected by prepending the tag name with `Tags.`
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us-east-1, Tags.Name, { "tag:Team": ["sysops"] });
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
```
## Using JSON format template variables
@@ -377,7 +375,7 @@ In the Grafana [configuration]({{< relref "../administration/configuration.md#aw
### allowed_auth_providers
Specify which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_iam_role (EC2 IAM role).
Specify which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role).
### assume_role_enabled
@@ -2,13 +2,13 @@
title = "Google Cloud Monitoring"
description = "Guide for using Google Cloud Monitoring in Grafana"
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/next/datasources/cloudmonitoring/", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/latest/datasources/cloudmonitoring/", "/docs/grafana/latest/features/datasources/cloudmonitoring/"]
weight = 200
+++
# Using Google Cloud Monitoring in Grafana
Grafana ships with built-in support for Google Cloud Monitoring. Just add it as a data source and you are ready to build dashboards for your Google Cloud Monitoring metrics. Refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
Grafana ships with built-in support for Google Cloud Monitoring. Add it as a data source to build dashboards for your Google Cloud Monitoring metrics. For instructions on how to add a data source, refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
> **Note** Before Grafana v7.1, Google Cloud Monitoring was referred to as Google Stackdriver.
@@ -16,11 +16,11 @@ Grafana ships with built-in support for Google Cloud Monitoring. Just add it as
To access Google Cloud Monitoring settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Google Cloud Monitoring data source.
| Name | Description |
| --------------------- | ------------------------------------------------------------------------------------- |
| `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. |
| `Service Account Key` | Upload or paste in the Service Account Key file for a GCP Project. Refer to [Using a Google Service Account Key File](#using-a-google-service-account-key-file) for details.|
| Name | Description |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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 is pre-selected for new panels. |
| `Service Account Key` | Upload or paste in the Service Account Key file for a GCP Project. For more information, refer to [Using a Google Service Account Key File](#using-a-google-service-account-key-file). |
## Authentication
@@ -93,7 +93,7 @@ To create a metric query, follow these steps:
1. Choose a metric from the **Metric** dropdown.
1. Use the plus and minus icons in the filter and group by sections to add/remove filters or group by clauses. This step is optional.
Google Cloud Monitoring metrics can be of different kinds (GAUGE, DELTA, CUMULATIVE) and these kinds have support for different aggregation options (reducers and aligners). The Grafana query editor shows the list of available aggregation methods for a selected metric and sets a default reducer and aligner when you select the metric. Units for the Y-axis are also automatically selected by the query editor.
Google Cloud Monitoring supports different kinds of metrics like `GAUGE`, `DELTA,` and `CUMULATIVE`. They support different aggregation options, for example, reducers and aligners. The Grafana query editor displays the list of available aggregation methods for a selected metric and sets a default reducer and aligner when you select the metric.
#### Filter
@@ -122,7 +122,7 @@ The option is called `cloud monitoring auto` and the defaults are:
- 5m for time ranges >= 23 hours and < 6 days
- 1h for time ranges >= 6 days
The other automatic option is `grafana auto`. This will automatically set the group by time depending on the time range chosen and the width of the graph panel. For more information about grafana auto, refer to the [interval variable](http://docs.grafana.org/variables/templates-and-variables/#the-interval-variable).
The other automatic option is `grafana auto`. This will automatically set the group by time depending on the time range chosen and the width of the time series panel. For more information about grafana auto, refer to the [interval variable](http://docs.grafana.org/variables/templates-and-variables/#the-interval-variable).
It is also possible to choose fixed time intervals to group by, like `1h` or `1d`.
@@ -182,6 +182,10 @@ Example Result: `gce_instance - compute.googleapis.com/instance/cpu/usage_time`
Click on a time series in the panel to see a context menu with a link to View in Metrics Explorer in Google Cloud Console. Clicking that link opens the Metrics Explorer in the Google Cloud Console and runs the query from the Grafana panel there.
The link navigates the user first to the Google Account Chooser and after successfully selecting an account, the user is redirected to the Metrics Explorer. The provided link is valid for any account, but it only displays the query if your account has access to the GCP project specified in the query.
#### Automatic unit detection
Grafana issues one query to the Cloud Monitoring API per query editor row, and each API response includes a unit. Grafana will attempt to convert the returned unit into a unit that is understood by the Grafana time series panel. If the conversion was successful, then the unit will be displayed on the Y-axis on the panel. If the query editor rows returned different units, then the unit from the last query editor row is used in the time series panel.
### SLO (Service Level Objective) queries
> **Note:** Available in Grafana v7.0 and later versions.
@@ -2,7 +2,7 @@
title = "Preconfigured dashboards"
description = "Guide for using Google Cloud Monitoring in Grafana"
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/latest/features/datasources/cloudmonitoring/"]
weight = 10
+++
+328
View File
@@ -0,0 +1,328 @@
+++
title = "InfluxDB"
description = "Guide for using InfluxDB in Grafana"
keywords = ["grafana", "influxdb", "guide", "flux"]
aliases = ["/docs/grafana/latest/features/datasources/influxdb"]
weight = 700
+++
# Using InfluxDB in Grafana
Grafana ships with a feature-rich data source plugin for InfluxDB. The plugin includes a custom query editor and supports annotations and query templates.
## Add the data source
1. Open the side menu by clicking the Grafana icon in the top header.
1. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
1. Click the `+ Add data source` button in the top header.
1. Select *InfluxDB* from the *Type* dropdown.
1. Select *InfluxQL* or *Flux* from the `Query Language` list.
> **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.
### InfluxQL (classic InfluxDB query)
Name | Description
----------- | -------------
`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.
`URL` | The HTTP protocol, IP address and port of your InfluxDB API (InfluxDB API port is by default 8086)
`Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser.
`Database` | Name of your InfluxDB database
`User` | Name of your database user
`Password` | Database user's password
`HTTP mode` | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`.
`Min time interval` | Refer to [Min time interval]({{< relref "#min-time-interval" >}}).
`Max series`| Limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000.
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
### Server access mode (Default)
All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the grafana backend/server if you select this access mode.
### Browser access mode
All requests will be made from the browser directly to the data source and may be subject to Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this access mode.
### Min time interval
A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example `1m` if your data is written every minute.
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:
Identifier | Description
------------ | -------------
`y` | year
`M` | month
`w` | week
`d` | day
`h` | hour
`m` | minute
`s` | second
`ms` | millisecond
## Query Editor
{{< docs-imagebox img="/img/docs/v45/influxdb_query_still.png" class="docs-image--no-shadow" animated-gif="/img/docs/v45/influxdb_query.gif" >}}
You can access the InfluxDB editor under the metrics tab when you are in the edit mode of the Graph or Singlestat panels.
Enter edit mode by clicking the panel title and clicking **Edit**. The editor allows you to select metrics and tags.
### Filter data (WHERE)
To add a tag filter, click the plus icon to the right of the `WHERE` condition. You can remove tag filters by clicking on
the tag key and then selecting `--remove tag filter--`.
**Regex matching**
You can type in regex patterns for metric names or tag filter values. Be sure to wrap the regex pattern in forward slashes (`/`). Grafana automatically adjusts the filter tag condition to use the InfluxDB regex match condition operator (`=~`).
### Field and Aggregation functions
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries to simplify and unify this part of the query. For example:
![](/img/docs/influxdb/select_editor.png)
The above generates the following InfluxDB `SELECT` clause:
```sql
SELECT derivative(mean("value"), 10s) /10 AS "REQ/s" FROM ....
```
#### Select multiple fields
Use the plus button and select Field > field to add another SELECT clause. You can also
specify an asterix `*` to select all fields.
### Group By
To group by a tag, click the plus icon at the end of the GROUP BY row. Pick a tag from the dropdown that appears.
You can remove the "Group By" by clicking on the `tag` and then click on the x icon.
### Text Editor Mode (RAW)
You can switch to raw query mode by clicking hamburger icon and then `Switch editor mode`.
> If you use Raw Query be sure your query at minimum have `WHERE $timeFilter`
> Also please always have a group by time and an aggregation function, otherwise InfluxDB can easily return hundreds of thousands
> of data points that will hang the browser.
### Alias patterns
- $m = replaced with measurement name
- $measurement = replaced with measurement name
- $col = replaced with column name
- $tag_exampletag = replaced with the value of the `exampletag` tag. The syntax is `$tag_yourTagName` (must start with `$tag_`). To use your tag as an alias in the ALIAS BY field then the tag must be used to group by in the query.
- You can also use [[tag_hostname]] pattern replacement syntax. For example, in the ALIAS BY field using this text `Host: [[tag_hostname]]` would substitute in the `hostname` tag value for each legend value and an example legend value would be: `Host: server1`.
### Table query / raw data
![](/assets/img/blog/v2.6/table_influxdb_logs.png)
You can remove the group by time by clicking on the `time` part and then the `x` icon. You can
change the option `Format As` to `Table` if you want to show raw data in the `Table` panel.
## Flux support
> Starting in v7.1, Grafana can execute Flux queries.
The client supports Flux running on InfluxDB 1.8+. See [1.8 compatibility](https://github.com/influxdata/influxdb-client-go/#influxdb-18-api-compatibility) for more information and connection details.
Name | Description
---------------- | -------------
`URL` | The HTTP protocol, IP address and port of your InfluxDB API (InfluxDB 2.0 API port is by default 9999)
`Organization` | The [Influx organization](https://v2.docs.influxdata.com/v2.0/organizations/) that will be used for Flux queries. This is also used to for the `v.organization` query macro
`Token` | The authentication token used for Flux queries. With Influx 2.0, use the [influx authentication token to function](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/). For influx 1.8, the token is `username:password`
`Default Bucket` | The [Influx bucket](https://v2.docs.influxdata.com/v2.0/organizations/buckets/) that will be used for the `v.defaultBucket` macro in Flux queries
`Min time interval` | Refer to [Min time interval]({{< relref "#min-time-interval" >}}).
`Max series`| Limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000.
You can use the [Flux query and scripting language](https://www.influxdata.com/products/flux/). Grafana's Flux query editor is a text editor for raw Flux queries with Macro support.
### Supported macros
The macros support copying and pasting from [Chronograph](https://www.influxdata.com/time-series-platform/chronograf/).
Macro example | Description
------------ | -------------
`v.timeRangeStart` | Will be replaced by the start of the currently active time selection. For example, *2020-06-11T13:31:00Z*
`v.timeRangeStop` | Will be replaced by the end of the currently active time selection. For example, *2020-06-11T14:31:00Z*
`v.windowPeriod` | Will be replaced with an interval string compatible with Flux that corresponds to Grafana's calculated interval based on the time range of the active time selection. For example, *5s*
`v.defaultBucket` | Will be replaced with the data source configuration's "Default Bucket" setting
`v.organization` | Will be replaced with the data source configuration's "Organization" setting
For example, the following query will be interpolated as the query that follows it, with interval and time period values changing according to active time selection\):
Grafana Flux query:
```flux
from(bucket: v.defaultBucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "cpu" or r["_measurement"] == "swap")
|> filter(fn: (r) => r["_field"] == "usage_system" or r["_field"] == "free")
|> aggregateWindow(every: v.windowPeriod, fn: mean)
|> yield(name: "mean")
```
Interpolated query send to Influx:
```flux
from(bucket: "grafana")
|> range(start: 2020-06-11T13:59:07Z, stop: 2020-06-11T14:59:07Z)
|> filter(fn: (r) => r["_measurement"] == "cpu" or r["_measurement"] == "swap")
|> filter(fn: (r) => r["_field"] == "usage_system" or r["_field"] == "free")
|> aggregateWindow(every: 2s, fn: mean)
|> yield(name: "mean")
```
You can view the interpolated version of a query with the Query Inspector.
## Querying Logs (BETA)
> Only available in Grafana v6.3+.
Querying and displaying log data from InfluxDB is available in [Explore]({{< relref "../explore" >}}), and in the [logs panel]({{< relref "../panels/visualizations/logs-panel.md" >}}) in dashboards.
Select the InfluxDB data source, and then enter a query to display your logs.
### Log Queries
The Logs Explorer (the `Measurements/Fields` button) next to the query field shows a list of measurements and fields. Choose the desired measurement that contains your log data and then choose which field Explore should use to display the log message.
Once the result is returned, the log panel shows a list of log rows and a bar chart where the x-axis shows the time and the y-axis shows the frequency/count.
### Filter search
To add a filter, click the plus icon to the right of the `Measurements/Fields` button or a condition. You can remove tag filters by clicking on the first select and choosing `--remove filter--`.
## Templating
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data
being displayed in your dashboard.
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Query variable
If you add a template variable of the type `Query`, then you can write an InfluxDB exploration (metadata) query. These queries can
return things like measurement names, key names or key values.
For example, you can have a variable that contains all values for tag `hostname` if you specify a query like this in the template variable *Query* setting.
```sql
SHOW TAG VALUES WITH KEY = "hostname"
```
You can also create nested variables. For example, if you had another variable, for example `region`. Then you could have
the hosts variable only show hosts from the current selected region with a query like this:
```sql
SHOW TAG VALUES WITH KEY = "hostname" WHERE region = '$region'
```
You can fetch key names for a given measurement.
```sql
SHOW TAG KEYS [FROM <measurement_name>]
```
If you have a variable with key names you can use this variable in a group by clause. This will allow you to change group by using the variable dropdown at the top
of the dashboard.
### Using variables in queries
There are two syntaxes:
`$<varname>` Example:
```sql
SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^$host$/ AND $timeFilter GROUP BY time($__interval), "hostname"
```
`[[varname]]` Example:
```sql
SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^[[host]]$/ AND $timeFilter GROUP BY time($__interval), "hostname"
```
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the *Multi-value* or *Include all value*
options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`.
Example Dashboard:
[InfluxDB Templated Dashboard](https://play.grafana.org/dashboard/db/influxdb-templated)
### Ad hoc filters variable
InfluxDB supports the special `Ad hoc filters` variable type. This variable allows you to specify any number of key/value filters on the fly. These filters will automatically
be applied to all your InfluxDB queries.
## Annotations
[Annotations]({{< relref "../dashboards/annotations.md" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
An example query:
```SQL
SELECT title, description from events WHERE $timeFilter ORDER BY time ASC
```
For InfluxDB, you need to enter a query like the one in the example above. The ```where $timeFilter``` component is required. If you only select one column, then you do not need to enter anything in the column mapping fields. The **Tags** field can be a comma-separated string.
## Configure the data source with provisioning
You can now configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}}).
Here are some provisioning examples for this data source.
### InfluxDB 1.x example
```yaml
apiVersion: 1
datasources:
- name: InfluxDB_v1
type: influxdb
access: proxy
database: site
user: grafana
password: grafana
url: http://localhost:8086
jsonData:
httpMode: GET
```
### InfluxDB 2.x for Flux example
```yaml
apiVersion: 1
datasources:
- name: InfluxDB_v2_Flux
type: influxdb
access: proxy
url: http://localhost:8086
secureJsonData:
token: token
jsonData:
version: Flux
organization: organization
defaultBucket: bucket
tlsSkipVerify: true
```
### InfluxDB 2.x for InfluxQl example
```yaml
apiVersion: 1
datasources:
- name: InfluxDB_v2_InfluxQL
type: influxdb
access: proxy
url: http://localhost:8086
# This database should be mapped to a bucket
database: site
jsonData:
httpMode: GET
httpHeaderName1: 'Authorization'
secureJsonData:
httpHeaderValue1: 'Token <token>'
```
+32
View File
@@ -54,3 +54,35 @@ Use the trace selector to pick particular trace from all traces logged in the ti
## Linking Trace ID from logs
You can link to Jaeger trace from logs in Loki by configuring a derived field with internal link. See the [Derived fields]({{< relref "loki.md#derived-fields" >}}) section in the [Loki data source]({{< relref "loki.md" >}}) documentation for details.
## Configure the data source with provisioning
You can set up the data source via configuration files with Grafana’s provisioning system. Refer to [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}}) for information on various settings and how it works.
Here is an example with basic auth and trace-to-logs field.
```yaml
apiVersion: 1
datasources:
- name: Jaeger
type: jaeger
uid: jaeger-spectra
access: proxy
url: http://localhost:16686/
basicAuth: true
basicAuthUser: my_user
editable: true
isDefault: false
jsonData:
tracesToLogs:
# Field with internal link pointing to a Loki data source in Grafana.
# datasourceUid value must match the `datasourceUid` value of the Loki data source.
datasourceUid: loki
tags:
- cluster
- hostname
- namespace
- pod
secureJsonData:
basicAuthPassword: my_password
+60 -86
View File
@@ -8,29 +8,23 @@ weight = 800
# Using Loki in Grafana
> BETA: Querying Loki data requires Grafana's Explore section.
> Grafana v6.x comes with Explore enabled by default.
> In Grafana v5.3.x and v5.4.x. you need to enable Explore manually.
> Viewing Loki data in dashboard panels is supported in Grafana v6.4+.
Grafana ships with built-in support for Loki, an open source log aggregation system by Grafana Labs. This topic explains options, variables, querying, and other options specific to this data source.
Grafana ships with built-in support for Loki, Grafana's log aggregation system.
Just add it as a data source and you are ready to query your log data in [Explore]({{< relref "../explore" >}}).
Add it as a data source and you are ready to build dashboards or query your log data in [Explore]({{< relref "../explore" >}}). Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
## Adding the data source
> **Note:** To troubleshoot configuration and other issues, check the log file located at /var/log/grafana/grafana.log on Unix systems or in <grafana_install_dir>/data/log on other platforms and manual installations.
1. Open Grafana and make sure you are logged in.
1. In the side menu under the `Configuration` link you should find a link named `Data Sources`.
1. Click the `Add data source` button at the top.
1. Select `Loki` from the list of data sources.
## Loki settings
> **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.
To access Loki settings, click the **Configuration** (gear) icon, then click **Data Sources**, and then click the Loki data source.
| Name | Description |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `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. |
| `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. |
| Name | Description |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `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. |
| `URL` | The URL of the Loki instance, e.g., `http://localhost:3100` |
| `Whitelisted Cookies` | Grafana Proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source. |
| `Maximum lines` | Upper limit for the number of log lines returned by Loki (default is 1000). Lower this limit if your browser is sluggish when displaying logs in Explore. |
### Derived fields
@@ -40,7 +34,7 @@ The Derived Fields configuration allows you to:
- Add a link that uses the value of the field.
You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links appear in the [log details](/explore/logs-integration/#labels-and-detected-fields).
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields configuration" >}}
Each derived field consists of:
- **Name -** Shown in the log details as a label.
@@ -49,97 +43,73 @@ Each derived field consists of:
- **Internal link -** Select if the link is internal or external. In case of internal link, a data source selector allows you to select the target data source. Only tracing data sources are supported.
You can use a debug section to see what your fields extract and how the URL is interpolated. Click **Show example log message** to show the text area where you can enter a log message.
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields_debug.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields debugging" >}}
{{< docs-imagebox img="/img/docs/v75/loki_derived_fields_settings.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
The new field with the link shown in log details:
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields_detail.png" class="docs-image--no-shadow" caption="Screenshot of the derived field in log detail" >}}
{{< docs-imagebox img="/img/docs/explore/detected-fields-link-7-4.png" max-width="800px" caption="Detected fields link in Explore" >}}
## Querying Logs
## Loki query editor
Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore" >}}), and with the [logs panel]({{< relref "../panels/visualizations/logs-panel.md" >}}) in dashboards. Select the Loki data source, and then enter a [LogQL](https://grafana.com/docs/loki/latest/logql/) query to display your logs.
You can use the Loki query editor to create log and metric queries.
### Log Queries
| Name | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Query expression` | Loki query expression, refer to the [LogQL documentation](https://grafana.com/docs/loki/latest/logql/) for more information. |
| `Query type` | Choose the type of query to run. The instant type queries against a single point in time. We are using "To" time from the time range. The range type queries over the selected range of time. |
| `Line limit` | Upper limit for number of log lines returned by query. The default is the Maximum lines limit set in Loki settings. |
| `Legend` | Available only in Dashboard. Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. |
A log query consists of two parts: **log stream selector**, and a **search expression**. For performance reasons you need to start by choosing a log stream by selecting a log label.
### Log browser
The Logs Explorer (the `Log labels` button) next to the query field shows a list of labels of available log streams. An alternative way to write a query is to use the query field's autocomplete - you start by typing a left curly brace `{` and the autocomplete menu will suggest a list of labels. Press the `Enter` key to execute the query.
With Loki log browser you can easily navigate trough your list of labels and values and construct the query of your choice. Log browser has multi-step selection:
1. Choose the labels you would like to consider for your search.
2. Pick the values for selected labels. Log browser supports facetting and therefore it shows you only possible label combinations.
3. Choose the type of query - logs query or rate metrics query. Additionally, you can also validate selector.
Once the result is returned, the log panel shows a list of log rows and a bar chart where the x-axis shows the time and the y-axis shows the frequency/count.
{{< docs-imagebox img="/img/docs/v75/loki_log_browser.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
<div class="medium-6 columns">
<video width="800" height="500" controls>
<source src="/assets/videos/explore_loki.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
## Querying with Loki
<br />
There are two types of LogQL queries:
### Log Stream Selector
- Log queries - Return the contents of log lines.
- Metric queries - Extend log queries and calculate sample values based on the content of logs from a log query.
For the label part of the query expression, wrap it in curly braces `{}` and then use the key value syntax for selecting labels. Multiple label expressions are separated by a comma:
### Log queries
`{app="mysql",name="mysql-backup"}`
Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore" >}}), and with the [logs panel]({{< relref "../panels/visualizations/logs-panel.md" >}}) in dashboards. Select the Loki data source, and then enter a [LogQL](https://grafana.com/docs/loki/latest/logql/#log-queries) query to display your logs.
The following label matching operators are currently supported:
A log query consists of two parts: log stream selector, and a log pipeline. For performance reasons begin by choosing a log stream by selecting a log label.
- `=` exactly equal.
- `!=` not equal.
- `=~` regex-match.
- `!~` do not regex-match.
### Log context
Examples:
When using a search expression as detailed above, you can retrieve the context surrounding your filtered results.
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.
- `{name=~"mysql.+"}`
- `{name!~"mysql.+"}`
The [same rules that apply for Prometheus Label Selectors](https://prometheus.io/docs/prometheus/latest/querying/basics/#instant-vector-selectors) apply for Loki Log Stream Selectors.
Another way to add a label selector is in the table section. Click **Filter** beside a label to add the label to the query expression. This even works for multiple queries and will add the label selector to each query.
### Search Expression
After writing the Log Stream Selector, you can filter the results further by writing a search expression. The search expression can be just text or a regex expression.
Example queries:
- `{job="mysql"} |= "error"`
- `{name="kafka"} |~ "tsdb-ops.*io:2003"`
- `{instance=~"kafka-[23]",name="kafka"} != "kafka.server:type=ReplicaManager"`
Filter operators can be chained and will sequentially filter down the expression. The resulting log lines will satisfy every filter.
**Example**
`{job="mysql"} |= "error" != "timeout"`
The following filter types are currently supported:
- `|=` line contains string.
- `!=` line doesn't contain string.
- `|~` line matches regular expression.
- `!~` line does not match regular expression.
> **Note:** For more details about LogQL, Loki's query language, refer to the [Loki LogQL](https://grafana.com/docs/loki/latest/logql/)
## Live tailing
### Live tailing
Loki supports Live tailing which displays logs in real-time. This feature is supported in [Explore]({{< relref "../explore/#loki-specific-features" >}}).
Note that Live Tailing relies on two Websocket connections: one between the browser and the Grafana server, and another between the Grafana server and the Loki server. If you run any reverse proxies, please configure them accordingly. The following example for Apache2 can be used for proxying between the browser and the Grafana server:
```
ProxyPassMatch "^/(api/datasources/proxy/\d+/loki/api/v1/tail)" "ws://127.0.0.1:3000/$1"
```
The following example shows basic NGINX proxy configuration. It assumes that the Grafana server is available at `http://localhost:3000/`, Loki server is running locally without proxy, and your external site uses HTTPS. If you also host Loki behind NGINX proxy, then you might want to repeat the following configuration for Loki as well.
In the `http` section of NGINX configuration, add the following map definition:
```
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
```
In your `server` section, add the following configuration:
```
location ~ /(api/datasources/proxy/\d+/loki/api/v1/tail) {
proxy_pass http://localhost:3000$request_uri;
@@ -162,13 +132,9 @@ In your `server` section, add the following configuration:
> **Note:** This feature is only available in Grafana v6.3+.
## Log Context
## Metric queries
When using a search expression as detailed above, you now have the ability to retrieve the context surrounding your filtered results.
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.
> **Note:** This feature is only available in Grafana v6.3+
LogQL supports wrapping a log query with functions that allow for creating metrics out of the logs. See [LogQL](https://grafana.com/docs/loki/latest/logql/#metric-queries) documentation on how to create and use metrics queries.
## Templating
@@ -176,12 +142,20 @@ Instead of hard-coding things like server, application and sensor name in your m
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
## Query variable
Variable of the type _Query_ allows you to query Loki for a list labels or label values. The Loki data source plugin
provides the following functions you can use in the `Query` input field.
| Name | Description |
| --------------------- | --------------------------------------------------------------- |
| `label_names()` | Returns a list of label names. |
| `label_values(label)` | Returns a list of label values for the `label` in every metric. |
## Annotations
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/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+
## Configure the data source with provisioning
You can set up the data source via config files with Grafana's provisioning system.
@@ -224,12 +198,12 @@ datasources:
matcherRegex: "traceID=(\\w+)"
name: TraceID
# url will be interpreted as query for the datasource
url: "$${__value.raw}"
url: '$${__value.raw}'
# Field with external link.
- matcherRegex: "traceID=(\\w+)"
name: TraceID
url: "http://localhost:16686/trace/$${__value.raw}"
url: 'http://localhost:16686/trace/$${__value.raw}'
```
Here's an example of a Jaeger data source corresponding to the above example. Note that the Jaeger `uid` value does match the Loki `datasourceUid` value.
+1 -1
View File
@@ -18,7 +18,7 @@ To access data source settings, hover your mouse over the **Configuration** (gea
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `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. |
| `Host` | The IP address/hostname and optional port of your MS SQL instance. If port is omitted, default 1433 will be used. |
| `Host` | The IP address/hostname and optional port of your MS SQL instance. If the port is omitted, the driver default will be used (0). |
| `Database` | Name of your MS SQL database. |
| `Authentication` | Authentication mode. Either using SQL Server Authentication or Windows Authentication (single sign on for Windows users). |
| `User` | Database user's login/username |
+5 -9
View File
@@ -6,18 +6,13 @@ aliases = ["/docs/grafana/latest/features/datasources/postgres/"]
weight = 1200
+++
# Using PostgreSQL in Grafana
# PostgreSQL data source
Grafana ships with a built-in PostgreSQL data source plugin that allows you to query and visualize data from a PostgreSQL compatible database.
Grafana ships with a built-in PostgreSQL data source plugin that allows you to query and visualize data from a PostgreSQL compatible database. This topic explains options, variables, querying, and other options specific to this data source. For instructions about how to add a data source to Grafana, refer to [Add a data source]({{< relref "add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
## Adding the data source
## PostgreSQL settings
1. Open the side menu by clicking the Grafana icon in the top header.
1. In the side menu under the `Configuration` icon you should find a link named `Data Sources`.
1. Click the `+ Add data source` button in the top header.
1. Select *PostgreSQL* from the *Type* dropdown.
### Data source options
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Prometheus data source.
Name | Description
----------------- | -------------
@@ -415,6 +410,7 @@ datasources:
postgresVersion: 903 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
timescaledb: false
```
>**Note:** In the above code, the `postgresVersion` value of `10` refers to version PotgreSQL 10 and above.
If you encounter metric request errors or other issues:
- Make sure your data source YAML file parameters exactly match the example. This includes parameter names and use of quotation marks.
+3 -1
View File
@@ -23,7 +23,8 @@ To access Prometheus settings, hover your mouse over the **Configuration** (gear
| `Basic Auth` | Enable basic authentication to the Prometheus data source. |
| `User` | User name for basic authentication. |
| `Password` | Password for basic authentication. |
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s.
| `HTTP method` | Use either POST or GET HTTP method to query your data source. POST is the recommended and pre-selected method as it allows bigger queries. Change this to GET if you have a Prometheus version older than 2.1 or if POST requests are restricted in your network. |
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
| `Custom Query Parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&amp;'. |
| `Label name` | Add the name of the field in the label object. |
@@ -187,6 +188,7 @@ datasources:
type: prometheus
# Access mode - proxy (server in the UI) or direct (browser in the UI).
access: proxy
httpMethod: POST
url: http://localhost:9090
jsonData:
exemplarTraceIdDestinations:
+2 -2
View File
@@ -18,7 +18,7 @@ To access Tempo settings, click the **Configuration** (gear) icon, then click **
| ------------ | --------------------------------------------------------------------------------------- |
| `Name` | The name using which you will refer to the data source in panels, queries, and Explore. |
| `Default` | The default data source will be pre-selected for new panels. |
| `URL` | The URL of the Tempo instance, e.g., `http://localhost:16686` |
| `URL` | The URL of the Tempo instance, e.g., `http://tempo` |
| `Basic Auth` | Enable basic authentication to the Tempo data source. |
| `User` | User name for basic authentication. |
| `Password` | Password for basic authentication. |
@@ -32,7 +32,7 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
- **Data source -** Target data source.
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
![Trace to logs settings](/img/docs/explore/trace-to-logs-settings-7-4.png "Screenshot of the trace to logs settings")
![Trace to logs settings](/img/docs/explore/trace-to-logs-settings-7-4.png 'Screenshot of the trace to logs settings')
## Query traces
@@ -1,6 +1,6 @@
+++
title = "Add authentication for data source plugins"
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/next/developers/plugins/authentication/"]
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/latest/developers/plugins/authentication/"]
+++
# Add authentication for data source plugins
@@ -131,6 +131,23 @@ To add URL parameters to proxied requests, use the `urlParams` property.
]
```
### Set body content
To set the body content and length of proxied requests, use the `body` property.
```json
"routes": [
{
"path": "example",
"url": "http://api.example.com",
"body": {
"username": "{{ .JsonData.username }}",
"password": "{{ .SecureJsonData.password }}"
}
}
]
```
### Enable token authentication
To enable token-based authentication for proxied requests, use the `tokenAuth` property.
@@ -8,140 +8,26 @@ This guide explains how to add support for [annotations]({{< relref "../../dashb
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}}).
Data sources in Grafana can support [Annotations]({{< relref "../../dashboards/annotations.md" >}}) by handling _annotation queries_.
Handling annotation queries is similar to how you'd handle a metrics query. The difference is that instead of returning [data frames]({{< relref "data-frames.md" >}}), an annotation query returns _annotation events_.
> **Note:** Annotation support for React plugins was released in Grafana 7.2. To support earlier versions, refer to the [Add support for annotation for Grafana 7.1](https://grafana.com/docs/grafana/v7.1/developers/plugins/add-support-for-annotations/).
## Add annotations support to your data source
To add support for annotations to an existing data source, you need to:
To enable annotation support for your data source, add the following two lines of code. Grafana uses your default query editor for editing annotation queries.
- Enable annotations support
- Override the `annotationQuery` method
- Construct annotation events
1. Add `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file to let Grafana know that your plugin supports annotations.
### Enable annotations support
**plugin.json**
Tell Grafana that your data source plugin can return annotations events by adding `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file.
```json
{
"annotations": true
}
```
### Override the `annotationQuery` method
In `DataSource.ts`, override the `annotationQuery` method from `DataSourceApi`.
```ts
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
return [];
}
```
### Construct annotation events
Return an array of [AnnotationEvent]({{< relref "../../packages_api/data/annotationevent.md" >}}).
```ts
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
const events: AnnotationEvent[] = [];
const date = new Date();
const event: AnnotationEvent = {
time: date.valueOf(),
text: 'foo',
tags: ['bar'],
};
events.push(event);
return events;
}
```
## Region annotations
[Region annotations]({{< relref "../../dashboards/annotations.md#adding-regions-events" >}}) have a start and end time. This can for example be used to annotate maintenance windows or downtime.
To return a region annotation, set the `timeEnd`, and `isRegion` properties.
```ts
const regionEvent: AnnotationEvent = {
time: startDate.valueOf(),
timeEnd: endDate.valueOf(),
isRegion: true,
text: 'foo',
tags: ['bar'],
};
```
## Build a annotation query editor
Let users write custom annotation queries to only display the annotation events they care about, by adding a _query editor_. You only need to build a query editor if you want to let users query or filter annotations.
> **Note:** Annotation query editors have yet to receive support for React. The instructions here are given for Angular. Fortunately, you can run Angular even in a plugin otherwise written using React. This section will be updated once React support for annotation queries editors is available.
1. Create a file called `AnnotationQueryEditor.ts` in the `src` directory, with the following content.
```ts
export class AnnotationQueryEditor {
static templateUrl = 'partials/annotations.editor.html';
annotation: any;
constructor() {
this.annotation.queryText = this.annotation.queryText || '';
}
```json
{
"annotations": true
}
```
1. Create a directory called `partials` in the `src` directory.
2. In `datasource.ts`, override the `annotations` property from `DataSourceApi`. For the default behavior, you can set `annotations` to an empty object.
1. Create a file called `annotations.editor.html` in the `partials` directory you just created, with the following content.
```html
<div class="gf-form-group">
<div class="gf-form-inline">
<div class="gf-form gf-form--grow">
<input
class="gf-form-input"
placeholder="query expression"
ng-model="ctrl.annotation.queryText"
></input>
</div>
</div>
</div>
```
1. In your data source query—the one that extends [DataQuery]({{< relref "../../packages_api/data/dataquery.md" >}})—add the `queryText` property. The name of the property needs to correspond to the text in `ng-model`, e.g. `ctrl.annotation.<propertyName>`.
**datasource.ts**
```ts
export interface MyQuery extends DataQuery {
// ...
queryText?: string;
}
annotations: {};
```
1. In `module.ts`, add the annotation query editor to the plugin.
```ts
import { AnnotationQueryEditor } from './AnnotationQueryEditor';
export const plugin = new DataSourcePlugin<DataSource, MyQuery, MyDataSourceOptions>(DataSource)
.setConfigEditor(ConfigEditor)
.setQueryEditor(QueryEditor)
.setAnnotationQueryCtrl(AnnotationQueryEditor);
```
The `queryText` property is now available on the `options` object in the `annotationQuery` method:
```ts
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
const expression = options.annotation.queryText;
// ...
}
```
@@ -4,7 +4,7 @@ title = "Add support for Explore queries"
# Add support for Explore queries
This guide explains how to improve support for [Explore]({{< relref "../../explore/_index.md" >}}) to an existing data source plugin.
This guide explains how to improve support for [Explore]({{< relref "../../explore/_index.md" >}}) in an existing data source plugin.
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}}).
@@ -85,27 +85,20 @@ The query editor for Explore is similar to the query editor for the data source
};
```
## Support multiple Explore modes
## Selecting preferred visualisation
Explore lets you query any data source, regardless of whether it returns metrics or logs. You can change which type of query you want to make, by setting the _Explore mode_.
Explore should by default select a reasonable visualization for your data so users do not have to tweak and play with the visualizations and just focus on querying. This usually works fairly well and Explore can figure out whether the returned data is time series data or logs or something else.
The query modes that the plugin supports are defined in the [plugin.json]({{< relref "metadata.md" >}}) file.
The query mode is available on the `props` object for both the query editor and the start page. For example, here's how you can change the query editor based on the currently selected mode:
If this does not work for you or you want to show some data in a specific visualization, add a hint to your returned data frame using the `preferredVisualisationType` meta attribute.
You can construct a data frame with specific metadata:
```
export default (props: Props) => {
const { query, exploreMode } = props;
switch (exploreMode) {
case ExploreMode.Metrics:
return <MetricsQueryField query={query} />;
case ExploreMode.Logs:
return <LogsQueryField query={query} />;
default:
return <p>Unsupported mode</p>;
}
}
const firstResult = new MutableDataFrame({
fields: [...],
meta: {
preferredVisualisationType: 'logs',
},
});
```
For possible options, refer to [PreferredVisualisationType](https://grafana.com/docs/grafana/latest/packages_api/data/preferredvisualisationtype/).
@@ -14,6 +14,7 @@ To add logs support to an existing data source, you need to:
- Enable logs support
- Construct the log data
- (Optional) Add preferred visualisation type hint to the data frame
### Enable logs support
@@ -50,6 +51,25 @@ That's all you need to start returning log data from your data source. Go ahead
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.
### (Optional) Add preferred visualisation type hint to the data frame
To make sure Grafana recognizes data as logs and shows logs visualization automatically in Explore you have do set `meta.preferredVisualisationType` to `'logs'` in the returned data frame. See [Selecting preferred visualisation section]({{< relref "add-support-for-explore-queries.md#selecting-preferred-visualisation" >}})
**Example:**
```ts
const frame = new MutableDataFrame({
refId: query.refId,
meta: {
preferredVisualisationType: 'logs',
},
fields: [
{ name: 'time', type: FieldType.time },
{ name: 'content', type: FieldType.string },
],
});
```
## Add labels to your logs
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.
@@ -72,7 +72,7 @@ A data transformation is any function that accepts a data frame as input, and re
A data frame with at least one time field is considered a _time series_.
For more information on time series, refer to our [Introduction to time series]({{< relref "../../getting-started/timeseries.md" >}}).
For more information on time series, refer to our [Introduction to time series]({{< relref "../../basics/timeseries.md" >}}).
### Wide format
+32 -22
View File
@@ -174,6 +174,7 @@ For data source plugins. Proxy routes used for plugin authentication and adding
| Property | Type | Required | Description |
|----------------|-------------------------|----------|---------------------------------------------------------------------------------------------------------|
| `body` | [object](#body) | No | For data source plugins. Route headers set the body content and length to the proxied request. |
| `headers` | array | No | For data source plugins. Route headers adds HTTP headers to the proxied request. |
| `jwtTokenAuth` | [object](#jwttokenauth) | No | For data source plugins. Token authentication section used with an JWT OAuth API. |
| `method` | string | No | For data source plugins. Route method matches the HTTP verb like GET or POST. |
@@ -183,29 +184,37 @@ For data source plugins. Proxy routes used for plugin authentication and adding
| `tokenAuth` | [object](#tokenauth) | No | For data source plugins. Token authentication section used with an OAuth API. |
| `url` | string | No | For data source plugins. Route URL is where the request is proxied to. |
### body
For data source plugins. Route headers set the body content and length to the proxied request.
| Property | Type | Required | Description |
|----------|------|----------|-------------|
### jwtTokenAuth
For data source plugins. Token authentication section used with an JWT OAuth API.
#### Properties
| Property | Type | Required | Description |
|----------|-------------------|----------|---------------------------------------------------------------------------|
| `params` | [object](#params) | No | For data source plugins. Parameters for the token authentication request. |
| `url` | string | No | For data source plugins. URL to fetch the JWT token. |
| Property | Type | Required | Description |
|----------|-------------------|----------|------------------------------------------------------|
| `params` | [object](#params) | No | Parameters for the JWT token authentication request. |
| `scopes` | string | No | |
| `url` | string | No | URL to fetch the JWT token. |
#### params
For data source plugins. Parameters for the token authentication request.
Parameters for the JWT token authentication request.
##### Properties
| Property | Type | Required | Description |
|-----------------|--------|----------|--------------------------------------------------------------------------------------------------------------------|
| `client_id` | string | No | For data source plugins. OAuth client id. |
| `client_secret` | string | No | For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
| `grant_type` | string | No | For data source plugins. OAuth grant type. |
| `resource` | string | No | For data source plugins. OAuth resource. |
| Property | Type | Required | Description |
|----------------|----------|----------|-------------|
| `client_email` | string | No | |
| `private_key` | string | No | |
| `scopes` | string[] | No | |
| `token_uri` | string | No | |
### tokenAuth
@@ -213,22 +222,23 @@ For data source plugins. Token authentication section used with an OAuth API.
#### Properties
| Property | Type | Required | Description |
|----------|-------------------|----------|---------------------------------------------------------------------------|
| `params` | [object](#params) | No | For data source plugins. Parameters for the token authentication request. |
| `url` | string | No | For data source plugins. URL to fetch the authentication token. |
| Property | Type | Required | Description |
|----------|-------------------|----------|--------------------------------------------------|
| `params` | [object](#params) | No | Parameters for the token authentication request. |
| `scopes` | string | No | |
| `url` | string | No | URL to fetch the authentication token. |
#### params
For data source plugins. Parameters for the token authentication request.
Parameters for the token authentication request.
##### Properties
| Property | Type | Required | Description |
|-----------------|--------|----------|--------------------------------------------------------------------------------------------------------------------|
| `client_id` | string | No | For data source plugins. OAuth client id. |
| `client_secret` | string | No | For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
| `grant_type` | string | No | For data source plugins. OAuth grant type. |
| `resource` | string | No | For data source plugins. OAuth resource. |
| Property | Type | Required | Description |
|-----------------|--------|----------|-------------------------------------------------------------------------------------------|
| `client_id` | string | No | OAuth client ID |
| `client_secret` | string | No | OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
| `grant_type` | string | No | OAuth grant type |
| `resource` | string | No | OAuth resource |
@@ -350,6 +350,10 @@
"type": "array",
"description": "For data source plugins. Route headers adds HTTP headers to the proxied request."
},
"body": {
"type": "object",
"description": "For data source plugins. Route headers set the body content and length to the proxied request."
},
"tokenAuth": {
"type": "object",
"description": "For data source plugins. Token authentication section used with an OAuth API.",
@@ -357,28 +361,32 @@
"properties": {
"url": {
"type": "string",
"description": "For data source plugins. URL to fetch the authentication token."
"description": "URL to fetch the authentication token."
},
"scopes": {
"type": "string",
"description": ""
},
"params": {
"type": "object",
"description": "For data source plugins. Parameters for the token authentication request.",
"description": "Parameters for the token authentication request.",
"additionalProperties": false,
"properties": {
"grant_type": {
"type": "string",
"description": "For data source plugins. OAuth grant type."
"description": "OAuth grant type"
},
"client_id": {
"type": "string",
"description": "For data source plugins. OAuth client id."
"description": "OAuth client ID"
},
"client_secret": {
"type": "string",
"description": "For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
"description": "OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
},
"resource": {
"type": "string",
"description": "For data source plugins. OAuth resource."
"description": "OAuth resource"
}
}
}
@@ -391,29 +399,36 @@
"properties": {
"url": {
"type": "string",
"description": "For data source plugins. URL to fetch the JWT token.",
"description": "URL to fetch the JWT token.",
"format": "uri"
},
"scopes": {
"type": "string",
"description": ""
},
"params": {
"type": "object",
"description": "For data source plugins. Parameters for the token authentication request.",
"description": "Parameters for the JWT token authentication request.",
"additionalProperties": false,
"properties": {
"grant_type": {
"type": "string",
"description": "For data source plugins. OAuth grant type."
"scopes": {
"type": "array",
"description": "",
"items": {
"type": "string"
}
},
"client_id": {
"token_uri": {
"type": "string",
"description": "For data source plugins. OAuth client id."
"description": ""
},
"client_secret": {
"client_email": {
"type": "string",
"description": "For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
"description": ""
},
"resource": {
"private_key": {
"type": "string",
"description": "For data source plugins. OAuth resource."
"description": ""
}
}
}
@@ -326,3 +326,38 @@ A list of headers that are stripped from the outgoing data source and alerting r
### cookie_drop_list
A list of cookies that are stripped from the outgoing data source and alerting requests.
## [caching]
> **Note:** Available in Grafana Enterprise v7.5 and later versions.
> **Note:** The Memcached cache backend is unavailable in Grafana Enterprise v7.5.
When query caching is enabled, Grafana temporarily stores the results of data source queries and serves cached responses to similar requests.
### backend
The caching backend to use when storing cached queries. Options: memory
### enabled
Setting 'enabled' to true enables caching datasource queries for all data sources.
### ttl
The default TTL (time to live) if no other TTL is available.
## [caching.memory]
### gc_interval
When storing cache data in-memory, this setting defines how often a background process cleans up stale data from the in-memory cache. More frequent "garbage collection" can keep memory usage from climbing but will increase CPU usage.
## [caching.redis]
### url
The full Redis URL of your Redis server. Example: `redis://localhost:6739/0`.
### prefix
A string that prefixes all Redis keys. This value must be set if using a shared database in Redis. If `prefix` is empty, then one will not be used.
@@ -39,7 +39,7 @@ Your current data source permissions will keep working as expected, but you'll b
### LDAP authentication
- LDAP synchronization is not affected by an expired license.
- Enhanced LDAP debugging is unavailable.
- Team sync debugging is unavailable.
### SAML authentication
@@ -71,3 +71,9 @@ Vault integration is not affected by an expired license.
### Auditing
Auditing is not affected by an expired license.
### License restrictions
The concurrent session limit remains active for seven days after the expiration date, after which it will be turned off.
The active users limit is turned off immediately.
@@ -8,10 +8,14 @@ weight = 300
# License restrictions
Enterprise licenses are limited by the number of active users, a license expiration date, and the URL of the Grafana instance.
Enterprise licenses are limited by the number of active users, the license expiration date, and the URL of the Grafana instance.
## User limits
Users are limited by the number of active users and the number of concurrent sessions for a given account.
### Active users limit
Grafana licenses allow for a certain number of active users per instance. An active user is any user that has signed in to Grafana within the past 30 days.
In the context of licensing, each user is classified as either a viewer or an editor:
@@ -19,7 +23,7 @@ In the context of licensing, each user is classified as either a viewer or an ed
- An editor is a user who has permission to edit and save a dashboard. Examples of editors are as follows:
- Grafana server administrators.
- Users who are assigned an organizational role of Editor or Admin.
- Users that have been granted Admin or Edit permissions at the dashboard or folder level. Refer to [Dashboard and folder permissions]({{< relref "../../permissions/dashboard_folder_permissions.md" >}}).
- Users that have been granted Admin or Edit permissions at the dashboard or folder level. Refer to [Dashboard and folder permissions]({{< relref "../../permissions/dashboard-folder-permissions.md" >}}.
- A viewer is a user with the Viewer role, which does not permit the user to save a dashboard.
Restrictions are applied separately for viewers and editors.
@@ -52,11 +56,10 @@ This CSV report helps to identify users, teams, and roles that have been granted
To download the report:
1. Hover your cursor over the **Server Admin** (shield) icon in the side menu and then click **Licensing**.
2. At the bottom of the page, click **Download report**.
1. At the bottom of the page, click **Download report**.
## Update license restrictions
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](https://grafana.com/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](https://grafana.com/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
For instructions on how to activate your license after it is updated, refer to
[Activate an Enterprise license]({{< relref "./activate-license.md" >}})
For instructions on how to activate your license after it is updated, refer to [Activate an Enterprise license]({{< relref "./activate-license.md" >}}).
+28
View File
@@ -0,0 +1,28 @@
+++
title = "Query caching"
description = "Grafana Enterprise data source query caching"
keywords = ["grafana", "plugins", "query", "caching"]
weight = 110
+++
# Query caching
> **Note:** Query caching is available behind the `caching` feature flag in Grafana Enterprise 7.5+.
When query caching is enabled, Grafana temporarily stores the results of data source queries. When you or another user submit the exact same query again, the results will come back from the cache instead of from the data source (like Splunk or ServiceNow) itself.
Query caching currently works for all backend data sources. You can enable the cache globally and configure the cache duration (also called Time to Live, or TTL). The cache can either be in-memory or in Redis.
## Query caching benefits
- Faster dashboard load times, especially for popular dashboards.
- Reduced API costs.
- Reduced likelihood that APIs will rate-limit or throttle requests.
## Enable query caching
To enable and configure query caching, please refer the the [Query caching section of Enterprise Configuration]({{< relref "./enterprise-configuration.md#caching" >}}).
## Sending a request without cache
If the data source query request contains an `X-Cache-Skip` header, then Grafana skips the caching middleware, and does not search the cache for a response. This can be particularly useful when debugging data source queries using cURL.
+1 -1
View File
@@ -157,7 +157,7 @@ If the time zone is set differently between your Grafana server and its remote i
## Choose template variables
> ** Note:** Available in Grafana Enterprise version 7.5+ (behind `templateVariables` feature flag).
> ** Note:** Available in Grafana Enterprise version 7.5+ (behind `reportVariables` feature flag).
You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables]({{< relref "../variables/_index.md" >}}) section.
@@ -18,7 +18,4 @@ There are several sort options:
- Views total
- Views 30 days
`Errors 30 days` and `Views 30 days` are based on a calculated sorting index that weighs errors and views that happened within the past day more heavily than those that happened over the past 30 days.
{{< docs-imagebox img="/img/docs/enterprise/improved_search.png" max-width="650px" class="docs-image--no-shadow" >}}
{{< docs-imagebox img="/img/docs/enterprise/improved-search-7-5.png" max-width="650px" class="docs-image--no-shadow" >}}
+14 -4
View File
@@ -63,23 +63,33 @@ The configuration file in Grafana Enterprise contains the following options. Eac
# Set to complete URL to override apple/ios icon
;apple_touch_icon =
```
Below is an example for how to replace the default footer and help links with two custom links.
You can replace the default footer links (Documentation, Support, Community) and even add your own custom links.
An example follows for replacing the default footer and help links with new custom links.
```ini
footer_links = support guides
footer_links = support guides extracustom
footer_links_support_text = Support
footer_links_support_url = http://your.support.site
footer_links_guides_text = Guides
footer_links_guides_url = http://your.guides.site
footer_links_extracustom_text = Custom text
footer_links_extracustom_url = http://your.custom.site
```
Here is the same example using environment variables instead of the custom.ini or grafana.ini file.
```
GF_WHITE_LABELING_FOOTER_LINKS=support guides
GF_WHITE_LABELING_FOOTER_LINKS=support guides extracustom
GF_WHITE_LABELING_FOOTER_LINKS_SUPPORT_TEXT=Support
GF_WHITE_LABELING_FOOTER_LINKS_SUPPORT_URL=http://your.support.site
GF_WHITE_LABELING_FOOTER_LINKS_GUIDES_TEXT=Guides
GF_WHITE_LABELING_FOOTER_LINKS_GUIDES_URL=http://your.guides.site
GF_WHITE_LABELING_FOOTER_LINKS_EXTRACUSTOM_TEXT=Custom Text
GF_WHITE_LABELING_FOOTER_LINKS_EXTRACUSTOM_URL=http://your.custom.site
```
> **Note:** The following two links are always present in the footer:
- Grafana edition
- Grafana version with build number
If you specify `footer_links` or `GF_WHITE_LABELING_FOOTER_LINKS`, then all other default links are removed from the footer and only what is specified is included.
+3 -15
View File
@@ -8,9 +8,7 @@ aliases = ["/docs/grafana/latest/guides/what-is-grafana"]
This section provides a high-level look at Grafana, the Grafana process, and Grafana features. It's a good place to learn how to use the Grafana software.
## What is Grafana?
Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.
{{< docs/shared "basics/what-is-grafana.md" >}}
After creating a dashboard like you do in [Getting started]({{< relref "getting-started.md" >}}), there are many possible things you might do next. It all depends on your needs and your use case.
@@ -74,16 +72,6 @@ Refer to [Provisioning]({{< relref "../administration/provisioning.md" >}}) for
When organizations have one Grafana and multiple teams, they often want the ability to both keep things separate and share dashboards. You can create a team of users and then set [permissions]({{< relref "../permissions/_index.md" >}}) on folders, dashboards, and down to the [data source level]({{< relref "../enterprise/datasource_permissions.md" >}}) if you're using [Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}).
## Grafana Cloud
{{< docs/shared "basics/grafana-cloud.md" >}}
Grafana Cloud is a highly available, fast, fully managed OpenSaaS logging and metrics platform. Everything you love about Grafana, but Grafana Labs hosts it for you and handles all the headaches.
[Learn more about Grafana Cloud](https://grafana.com/cloud/) or try the [Grafana Cloud Linux host Quickstart](/docs/grafana-cloud/quickstart/).
## Grafana Enterprise
[Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}) is a commercial edition of Grafana that includes additional features not found in the open source version.
Building on everything you already know and love about Grafana, Grafana Enterprise adds enterprise data sources, advanced authentication options, more permission controls, 24x7x365 support, and training from the core Grafana team.
[Learn more about Grafana Enterprise](https://grafana.com/enterprise). To purchase Enterprise or obtain a trial license, contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
{{< docs/shared "basics/grafana-enterprise.md" >}}
@@ -12,16 +12,12 @@ Prometheus is an open source systems monitoring system for which Grafana provide
You can also configure a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance to display system metrics without having to host Grafana yourself.
## Step 1. Install Grafana and build your first dashboard
Use the instructions in [Getting started with Grafana]({{< relref "getting-started.md" >}}) to:
- Install Grafana.
- Log in to Grafana.
- Create your first dashboard.
{{< docs/shared "getting-started/first-step.md" >}}
## Step 2. Download Prometheus and node_exporter
Prometheus, like Grafana, can be installed on many different operating systems. Refer to the [Prometheus download page](https://prometheus.io/download/), which lists all stable versions of Prometheus components. Download the following components:
- [Prometheus](https://prometheus.io/download/#prometheus)
- [node_exporter](https://prometheus.io/download/#node_exporter)
@@ -9,51 +9,27 @@ weight = 400
# Getting started with Grafana and MS SQL Server
Microsoft SQL Server is a popular relational database management system that is widely used in development and production environments. This topic walks you through the steps to create a series of dashboards in Grafana to display metrics from a MS SQL Server database. You can also configure the MS SQL Server data source on a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance without having to host Grafana yourself.
## Step 1. Install Grafana and build your first dashboard
Use the instructions in [Getting started with Grafana]({{< relref "getting-started.md" >}}) to:
- Install Grafana.
- Log in to Grafana.
- Create your first dashboard.
{{< docs/shared "getting-started/first-step.md" >}}
> **Note:** You must install Grafana 5.1+ in order to use the integrated MS SQL data source.
## Step 2. Download MS SQL Server
MS SQL Server can be installed on many different operating systems. Refer to the [MS SQL Server downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), for a complete list of all available options.
Alternately, if you are working on Mac or Linux, then you can install MS SQL Server using the resources available in [grafana/grafana](https://github.com/grafana/grafana) GitHub repository (recommended). Here you will find a collection of supported data sources, including MS SQL Server, along with test data and pre-configured dashboards for use.
> **Note:** Installing MS SQL Server on Windows from the [grafana/grafana](https://github.com/grafana/grafana/tree/master/devenv) GitHub repository is not supported at this time.
MS SQL Server can be installed on Windows or Linux operating systems and also on Docker containers. Refer to the [MS SQL Server downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), for a complete list of all available options.
## Step 3. Install MS SQL Server
You can install MS SQL Server on the host running Grafana or on a remote server. To install the software from the [downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), follow their setup prompts.
Otherwise, follow the instructions below to install and configure MS SQL Server from the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository.
1. Clone the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository to your local system.
1. Install Docker or verify that it is installed on your machine.
1. Within your local `grafana` repository, change directory to [devenv](https://github.com/grafana/grafana/tree/master/devenv).
1. Run the bash command to setup data sources and dashboards.
```
./setup.sh
```
1. Restart the Grafana server.
1. Change directory back to [master](https://github.com/grafana/grafana/tree/master/devenv).
1. Run the make command to create the MS SQL Server database.
```
make devenv sources=mssql
```
This creates an image of the SQL Server database and runs it as a Docker container.
If you are on a Windows host but want to use Grafana and MS SQL data source on a Linux environment, refer to the [WSL to set up your Grafana development environment](https://grafana.com/blog/2021/03/03/.how-to-set-up-a-grafana-development-environment-on-a-windows-pc-using-wsl). This will allow you to leverage the resources available in [grafana/grafana](https://github.com/grafana/grafana) GitHub repository. Here you will find a collection of supported data sources, including MS SQL Server, along with test data and pre-configured dashboards for use.
## Step 4. Adding the MS SQL data source
To add MS SQL Server data source:
1. In the Grafana side menu, hover your cursor over the **Configuration** (gear) icon and then click **Data Sources**.
1. Filter by `mssql` and select the **Microsoft SQL Server** option.
2. Click **Add data source** in the top right header to open the configuration page.
3. Enter the information specified in the table below, then click **Save & Test**.
1. Click **Add data source** in the top right header to open the configuration page.
1. Enter the information specified in the table below, then click **Save & Test**.
Name | Description
------------ | -------------
@@ -73,6 +49,7 @@ Optionally, play around this dashboard and customize it to:
- Change frequency of data polling.
- Change the period for which the data is displayed.
- Rearrange and resize panels.
## Step 5. Start building dashboards
Now that you have gained some idea of using the pre-packaged MS SQL data source and some test data, the next step is to setup your own instance of MS SQL Server database and data your development or sandbox area. In the previous steps, if you followed along the path of deploying your own instance of MS SQL Server, you are already on your way.
+1
View File
@@ -44,6 +44,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
"refresh": "25s"
},
"folderId": 0,
"message": "Made changes to xyz",
"overwrite": false
}
```
+6 -11
View File
@@ -45,17 +45,12 @@ Content-Type: application/json
{
"id":1,
"uid": "nErXDvCkzz",
"title": "Department ABC",
"url": "/dashboards/f/nErXDvCkzz/department-abc",
"hasAcl": false,
"canSave": true,
"canEdit": true,
"canAdmin": true,
"createdBy": "admin",
"created": "2018-01-31T17:43:12+01:00",
"updatedBy": "admin",
"updated": "2018-01-31T17:43:12+01:00",
"version": 1
"title": "Department ABC"
},
{
"id":2,
"uid": "k3S1cklGk",
"title": "Department RND"
}
]
```
+7 -5
View File
@@ -298,9 +298,11 @@ Content-Type: application/json
GET /api/user HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Authorization: Basic YWRtaW46YWRtaW4=
```
Requires basic authentication.
**Example Response**:
```http
@@ -328,7 +330,7 @@ Content-Type: application/json
`PUT /api/user/password`
Changes the password for the user
Changes the password for the user. Requires basic authentication.
**Example Request**:
@@ -336,7 +338,7 @@ Changes the password for the user
PUT /api/user/password HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Authorization: Basic YWRtaW46YWRtaW4=
{
"oldPassword": "old_password",
@@ -415,7 +417,7 @@ Content-Type: application/json
`GET /api/user/orgs`
Return a list of all organizations of the current user.
Return a list of all organizations of the current user. Requires basic authentication.
**Example Request**:
@@ -423,7 +425,7 @@ Return a list of all organizations of the current user.
GET /api/user/orgs HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Authorization: Basic YWRtaW46YWRtaW4=
```
**Example Response**:
+1
View File
@@ -16,6 +16,7 @@ This section discusses the hardware and software requirements as well as the pro
- [Install on macOS]({{< relref "mac" >}})
- [Install on Windows]({{< relref "windows" >}})
- [Run Docker image]({{< relref "docker" >}})
- [Deploy Grafana on Kubernetes]({{< relref "kubernetes" >}})
For upgrade instructions, refer to [Upgrade Grafana]({{< relref "upgrading.md" >}}).
To restart Grafana, refer to [Restart Grafana]({{< relref "restart-grafana.md" >}}).
+15 -2
View File
@@ -112,6 +112,20 @@ docker build \
docker run -d -p 3000:3000 --name=grafana grafana-custom
```
### Build with pre-installed plugins from other sources
You can build a Docker image with plugins from other sources by specifying the URL like this: `GF_INSTALL_PLUGINS=<url to plugin zip>;<plugin name>`.
```bash
cd packaging/docker/custom
docker build \
--build-arg "GRAFANA_VERSION=latest" \
--build-arg "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin,grafana-clock-panel" \
-t grafana-custom -f Dockerfile .
docker run -d -p 3000:3000 --name=grafana grafana-custom
```
Replace `Dockerfile` in above example with `ubuntu.Dockerfile` to build a custom Ubuntu based image (Grafana v6.5+).
### Build with Grafana Image Renderer plugin pre-installed
@@ -179,7 +193,7 @@ Version | User | User ID | Group | Group ID
--------|---------|---------|---------|---------
< 5.1 | grafana | 104 | grafana | 107
\>= 5.1 | grafana | 472 | grafana | 472
\>= 7.3 | grafana | 472 | root | 1
\>= 7.3 | grafana | 472 | root | 0
There are two possible solutions to this problem. Either you start the new container as the root user and change ownership from `104` to `472`, or you start the upgraded container as user `104`.
@@ -227,4 +241,3 @@ Refer to [Configure a Grafana Docker image]({{< relref "../administration/config
Refer to the [Configuration]({{< relref "../administration/configuration.md" >}}) page for details on options for customizing your environment, logging, database, and so on.
+241
View File
@@ -0,0 +1,241 @@
+++
title = "Deploy Grafana on Kubernetes"
description = "Guide for deploying Grafana on Kubernetes"
keywords = ["grafana", "configuration", "documentation", "kubernetes"]
weight = 700
+++
## Deploy Grafana on Kubernetes
This page explains how to install and run Grafana on Kubernetes (K8S). It uses Kubernetes manifests for the setup. If you prefer Helm, refer to the [Grafana Helm community charts](https://github.com/grafana/helm-charts).
If you are interested in Grafana Enterprise (not Grafana OS), jump to [Deploy Grafana Enterprise on Kubernetes](#deploy-grafana-enterprise-on-kubernetes) section.
### Create Grafana Kubernetes manifest
1. Create a file called `grafana.yaml`, then paste the contents below.
```yaml
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
securityContext:
fsGroup: 472
supplementalGroups:
- 0
containers:
- name: grafana
image: grafana/grafana:7.5.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: http-grafana
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /robots.txt
port: 3000
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 2
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 3000
timeoutSeconds: 1
resources:
requests:
cpu: 250m
memory: 750Mi
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-pv
volumes:
- name: grafana-pv
persistentVolumeClaim:
claimName: grafana-pvc
---
apiVersion: v1
kind: Service
metadata:
name: grafana
spec:
ports:
- port: 3000
protocol: TCP
targetPort: http-grafana
selector:
app: grafana
sessionAffinity: None
type: LoadBalancer
```
### Send manifest to Kubernetes API server
1. Run the following command:
`kubectl apply -f grafana.yaml`
1. Check that it worked by running the following:
`kubectl port-forward service/grafana 3000:3000`
1. Navigate to `localhost:3000` in your browser. You should see a Grafana login page.
1. Use `admin` for both the username and password to login.
## Deploy Grafana Enterprise on Kubernetes
The process for deploying Grafana Enterprise is almost identical to the process above, except for some extra steps required to add in your license file. They are described in the following sections.
### Obtain Grafana Enterprise license
To run Grafana Enterprise, you need a valid license. [Contact a Grafana Labs representative](https://grafana.com/contact?about=grafana-enterprise) to obtain the license. This topic assumes that you already have done this and have a `license.jwt` file. Your license should also be associated with a URL, which we will use later in the topic.
### Create License Secret
Create a Kubernetes secret from your license file using the following command:
```bash
kubectl create secret generic ge-license --from-file=/path/to/your/license.jwt
```
### Create Grafana Enterprise configuration
Create a Grafana configuration file with the name `grafana.ini`. Then paste the content below.
>**Note:** You will have to update the `root_url` field to the url associated with the license you were given.
```yaml
[enterprise]
license_path = /etc/grafana/license/license.jwt
[server]
root_url =/your/license/root/url
```
### Create Configmap for Grafana Enterprise Config
Create a Kubernetes Configmap from your `grafana.ini` file with the following command:
```bash
kubectl create configmap ge-config --from-file=/path/to/your/config.ini
```
### Create Grafana Enterprise Kubernetes manifest
Create a `grafana.yaml` file, then paste the content below. This YAML is identical to the one for Grafana OS install except for the additional references to the Configmap which has your Grafana configuration file and the Secret that has your license.
```yaml
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: local-path
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- image: grafana/grafana-enterprise:latest
imagePullPolicy: IfNotPresent
name: grafana
ports:
- containerPort: 3000
name: http-grafana
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /robots.txt
port: 3000
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 2
resources:
limits:
memory: 4Gi
requests:
cpu: 100m
memory: 2Gi
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana
- mountPath: /etc/grafana
name: ge-config
- mountPath: /etc/grafana/license
name: ge-license
volumes:
- name: grafana
persistentVolumeClaim:
claimName: grafana
- name: ge-config
configMap:
name: ge-config
- name: ge-license
secret:
secretName: ge-license
---
apiVersion: v1
kind: Service
metadata:
name: grafana
spec:
ports:
- port: 3000
protocol: TCP
targetPort: http-grafana
selector:
app: grafana
sessionAffinity: None
type: LoadBalancer
```
1. Send manifest to Kubernetes API Server
`kubectl apply -f grafana.yaml`
1. Check that it worked by running the following:
`kubectl port-forward service/grafana 3000:3000`
1. Navigate to `localhost:3000` in your browser. You should see the Grafana login page.
1. Use `admin` for both the username and password to login.
If it worked, you should see `Enterprise (Licensed)` at the bottom of the page.
+6
View File
@@ -313,4 +313,10 @@ NOTE: Only snapshots created on Grafana 7.3 or later will use this column to sto
The Grafana Docker images use the `root` group instead of the `grafana` group. This change can cause builds to break for users who extend the Grafana Docker image. Learn more about this change in the [Docker migration instructions]({{< relref "docker/#migrate-to-v73-or-later">}})
## Upgrading to v7.5
### VictorOps Alert Notifier
The VictorOps alert notifier now accepts a `severity` tag, in a similar vein to the PagerDuty alert notifier. The possible values are outlined in the [VictorOps docs](https://help.victorops.com/knowledge-base/incident-fields-glossary/).
For example, if you want an alert to be `INFO`-level in VictorOps, create a tag `severity=info` (case-insensitive) in your alert.
+1 -1
View File
@@ -36,7 +36,7 @@ Organization Admins can:
## Teams
Teams are groups of users within the same organization. Teams allow you to grant permissions for a group of users. They are most often used to manage [permissions for folders and dashboards]({{< relref "../permissions/dashboard_folder_permissions.md" >}}). Enterprise users can use them to apply [data source permissions]({{< relref "../enterprise/datasource_permissions.md" >}}).
Teams are groups of users within the same organization. Teams allow you to grant permissions for a group of users. They are most often used to manage [permissions for folders and dashboards]({{< relref "../permissions/dashboard-folder-permissions.md" >}}). Enterprise users can use them to apply [data source permissions]({{< relref "../enterprise/datasource_permissions.md" >}}).
Teams are mostly managed by Organization Admins. However, if the Grafana server setting [editors_can_admin]({{< relref "../administration/configuration.md#editors_can_admin" >}}) is applied, then users who are assigned the Team Admin role can also manage teams in their organization and users assigned to their teams.
@@ -33,7 +33,7 @@ See the complete list of teams in your Grafana organization.
Add a team to your Grafana organization.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-user-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click **New Team**.
1. Enter team information:
- **Name -** Enter the name of the new team.
@@ -46,7 +46,7 @@ Add a team to your Grafana organization.
Add an existing user account to a team.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-user-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click the name of the team that you want to add users to.
1. Click **Add member**.
1. In the **Add team member** list, click the user account that you want to add to the team. You can also type in the field to filter the list.
@@ -61,7 +61,7 @@ Add an existing user account to a team.
Remove a user account from the team.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-user-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click the name of the team that you want to remove users from.
1. Click the red **X** next to the name of the user that you want to remove from the team and then click **Delete**.
{{< /docs/list >}}
@@ -71,7 +71,7 @@ Remove a user account from the team.
Change team member permission levels.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-user-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click the name of the team in which you want to change user permissions.
1. In the team member list, find and click the user account that you want to change. You can use the search field to filter the list if necessary.
1. Click the **Permission** list, and then click the new user permission level.
@@ -84,6 +84,6 @@ Change team member permission levels.
Permanently delete the team and all special permissions assigned to it.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-user-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
1. Click the red **X** next to the team that you want to delete and then click **Delete**.
{{< /docs/list >}}
@@ -8,7 +8,7 @@ aliases =["/docs/grafana/latest/manage-users/add-or-remove-user/","/docs/grafana
This topic explains user management tasks performed by Grafana Server Admins.
In order to perform any of these tasks, you must be logged in to Grafana on an account with Grafana Server Admin permissions. For more information about Grafana Admin permissions, refer to [Grafana Server Admin role]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}})
In order to perform any of these tasks, you must be logged in to Grafana on an account with Grafana Server Admin permissions. For more information about Grafana Admin permissions, refer to [Grafana Server Admin role]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}).
> **Note:** The Grafana Server Admin role does not exist in Grafana Cloud. Grafana Cloud users cannot perform tasks listed in this section.
@@ -27,7 +27,7 @@ Grafana displays all user accounts on the server, listed in alphabetical order b
- **Server Admin status -** If the user account has **Grafana Admin** option set, then a shield icon is displayed.
- **Account status -** If the account is disabled, then the **Disabled** label is displayed.
![Server Admin user list](/img/docs/manage-users/server-user-list-7-3.png "title")
![Server Admin user list](/img/docs/manage-users/server-user-list-7-3.png)
## View user account details
View File
+1 -2
View File
@@ -23,5 +23,4 @@ You can drag and drop panels by clicking and holding the panel title, then dragg
- Click series name in the legend to hide series.
- Ctrl/Shift/Meta + click legend name to hide other series.
- Hover your cursor over a panel and press `e` to open the panel editor.
- Hover your cursor over a panel and press `v` to open the panel in fullscreen view.
- Hover your cursor over a panel and press `v` to open the panel in full screen view.
+4 -2
View File
@@ -15,11 +15,13 @@ The primary use case for expressions is for the upcoming next version of Grafana
> **Note:** Expressions do not work with current Grafana alerting.
> **Note:** Expressions do not work with dashboard variables.
Expressions are meant to augment data sources by enabling queries from different data sources to be combined or by providing operations unavailable in a data source.
> **Note:** When possible, you should do data processing inside the data source. Copying data from storage to the Grafana server for processing is inefficient, so expressions are targeted at lightweight data processing.
Expressions work with data source queries that return time series or number data. They also operate on [multiple-dimensional data]({{< relref "../getting-started/timeseries-dimensions.md" >}}). For example, a query that returns multiple series, where each series is identified by labels or tags.
Expressions work with data source queries that return time series or number data. They also operate on [multiple-dimensional data]({{< relref "../basics/timeseries-dimensions.md" >}}). For example, a query that returns multiple series, where each series is identified by labels or tags.
An individual expression takes one or more queries or other expressions as input and adds data to the result. Each individual expression or query is represented by a variable that is a named identifier known as its RefID (e.g., the default letter `A` or `B`).
@@ -32,7 +34,7 @@ Expressions work with two types of data.
- A collections of time series.
- A collection of numbers, where each collection could be a single series or single number.
Each collection is returned from a single data source query or expression and represented by the RefID. Each collection is a set, where each item in the set is uniquely identified by it dimensions which are stored as [labels]({{< relref "../getting-started/timeseries-dimensions.md#labels" >}}) or key-value pairs.
Each collection is returned from a single data source query or expression and represented by the RefID. Each collection is a set, where each item in the set is uniquely identified by it dimensions which are stored as [labels]({{< relref "../basics/timeseries-dimensions.md#labels" >}}) or key-value pairs.
## Data source queries
@@ -143,6 +143,8 @@ In the example below, the panel has three queries (A, B, C). I removed the B que
{{< docs-imagebox img="/img/docs/transformations/filter-by-query-stat-example-7-0.png" class="docs-image--no-shadow" max-width= "1100px" >}}
> **Note:** This transformation is not available for Graphite because this data source does not support correlating returned data with queries.
## Organize fields
Use this transformation to rename, reorder, or hide fields returned by the query.
@@ -21,7 +21,7 @@ Use these options to refine your visualization.
- **Starred -** Display starred dashboards in alphabetical order.
- **Recently viewed -** Display recently viewed dashboards in alphabetical order.
- **Search -** Display dashboards by search query or tags. Requires you to enter at least one value in **Query** or **Tags**.
- **Search -** Display dashboards by search query or tags. You must enter at least one value in **Query** or **Tags**. For the **Query** and **Tags** fields. Variable interpolation is supported, for example,`$my_var` or `${my_var}`.
- **Show headings -** The chosen list selection (Starred, Recently viewed, Search) is shown as a heading.
- **Max items -** Sets the maximum number of items to list per section. For example, if you left this at the default value of 10 and displayed Starred and Recently viewed dashboards, then the panel would display up to 20 total dashboards, ten in each section.
@@ -120,7 +120,7 @@ Options are identical for both Y-axes.
- **Value -** The aggregation type to use for the values. The default is total (summing the values together).
- **Histogram -** 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.
For more information about histograms, refer to [Introduction to histograms and heatmaps]({{< relref "../../getting-started/intro-histograms.md" >}}).
For more information about histograms, refer to [Introduction to histograms and heatmaps]({{< relref "../../basics/intro-histograms.md" >}}).
- **Buckets -** The number of buckets to group the values by. If left empty, then Grafana tries to calculate a suitable number of buckets.
- **X-Min -** Filters out values from the histogram that are under this minimum limit.
- **X-Max -** Filters out values that are greater than this maximum limit.
@@ -1,14 +1,14 @@
+++
title = "Heatmap"
title = "Heatmap panel"
description = "Heatmap visualization documentation"
keywords = ["grafana", "heatmap", "panel", "documentation"]
aliases =["/docs/grafana/latest/features/panels/heatmap/"]
weight = 600
+++
# Heatmap
# Heatmap panel
The Heatmap panel visualization allows you to view histograms over time. For more information about histograms, refer to [Introduction to histograms and heatmaps]({{< relref "../../getting-started/intro-histograms.md" >}}).
The Heatmap panel visualization allows you to view histograms over time. For more information about histograms, refer to [Introduction to histograms and heatmaps]({{< relref "../../basics/intro-histograms.md" >}}).
![](/img/docs/v43/heatmap_panel_cover.jpg)
@@ -0,0 +1,35 @@
+++
title = "Panel legend options"
weight = 50
+++
# Legend
Use the legend to adjust how a visualization displays series. This legend functionality only applies to a few panels now, but it will eventually be common to all visualizations.
This topic currently applies to the following visualizations:
- [Pie chart panel]({{< relref "pie-chart-panel.md">}})
- [Time series panel]({{< relref "time-series/_index.md" >}})
## Toggle series
To toggle a series:
Click on the series label in the legend to isolate the series in the visualization.
All other series are hidden in the visualization. The data of the hidden series is still accessible.
Use Cmd/Ctrl+click on the series label to hide the isolated series and remove the toggle.
> **Note:** This option is persistent when you save the dashboard.
![Toggle series visibility](/img/docs/legend/legend-series-toggle-7-5.png)
This creates a system override that hides the other series. You can view this override in the Overrides tab. If you delete the override, then it removes the toggle.
![Series toggle override example](/img/docs/legend/legend-series-override-7-5.png)
## Change series color
Click on the series icon (colored line beside the series label) in the legend to change selected series color.
![Change legend series color](/img/docs/legend/legend-series-color-7-5.png)
@@ -0,0 +1,83 @@
+++
title = "Pie chart panel"
keywords = ["grafana", "pie chart"]
weight = 850
+++
# Pie chart v2 panel
> **Note:** This documentation refers to a beta feature.
The pie chart displays reduced series, or values in a series, from one or more queries, as they relate to each other, in the form of slices of a pie. The arc length, area and central angle of a slice are all proportional to the slices value, as it relates to the sum of all values. This type of chart is best used when you want a quick comparison of a small set of values in an aesthetically pleasing form.
![Pie chart panel](/img/docs/pie-chart-panel/pie-chart-panel-7-5.png)
## Data and field options
Pie chart visualizations allow you to apply:
- [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}})
## Display options
Use the following options to refine your visualization:
### Show
Choose how much information to show.
- **Calculate -** Reduces each value to a single value per series.
- **All values -** Displays every value from a single series.
### Calculation
Select a calculation to reduce each series when Calculate has been selected. For information about available calculations, refer to the [Calculation list]({{< relref "../calculations-list.md" >}}).
### Limit
When displaying every value from a single series, this limits the number of values displayed.
### Fields
Select which field or fields to display in the visualization. Each field name is available on the list, or you can select one of the following options:
- **Numeric fields -** All fields with numerical values.
- **All fields -** All fields that are not removed by transformations.
- **Time -** All fields with time values.
### Pie chart type
Select the pie chart display style.
#### Pie
![Pie type chart](/img/docs/pie-chart-panel/pie-type-chart-7-5.png)
#### Donut
![Donut type chart](/img/docs/pie-chart-panel/donut-type-chart-7-5.png)
### Labels
Select labels to display on the pie chart. You can select more than one.
- **Name -** The series or field name.
- **Percent -** The percentage of the whole.
- **Value -** The raw numerical value.
Labels are displayed in white over the body of the chart. You might need to select darker chart colors to make them more visible. Long names or numbers might be clipped.
The following example shows a pie chart with **Name** and **Percent** labels displayed.
![Pie chart labels](/img/docs/pie-chart-panel/pie-chart-labels-7-5.png)
{{< docs/shared "visualizations/legend-mode.md" >}}
### Legend values
Select values to display in the legend. You can select more than one.
**Percent -** The percentage of the whole.
**Value -** The raw numerical value.
@@ -42,9 +42,9 @@ If thresholds are set, then the field text is displayed in the appropriate thres
{{< docs-imagebox img="/img/docs/tables/color-text.png" max-width="500px" caption="Color text" class="docs-image--no-shadow" >}}
### Color background
### Color background (gradient or solid)
If thresholds are set, then the field background is displayed in the appropriate threshold color.
If thresholds are set, then the field background is displayed in the appropriate threshold color.
{{< docs-imagebox img="/img/docs/tables/color-background.png" max-width="500px" caption="Color background" class="docs-image--no-shadow" >}}
@@ -41,39 +41,8 @@ When you hover your cursor over the graph, Grafana can display tooltips. Choose
> **Note:** Use an override to hide individual series from the tooltip.
### Legend mode
Use these settings to refine how the legend appears in your visualization.
- **List -** Displays the legend as a list. This is a default display mode of the legend.
- **Table -** Displays the legend as a table.
- **Hidden -** Hides the legend.
### Legend placement
Choose where to display the legend.
- **Bottom -** Below the graph.
- **Right -** To the right of the graph.
{{< docs/shared "visualizations/legend-mode.md" >}}
### Legend calculations
Choose which of the [standard calculations]({{< relref "../../calculations-list.md">}}) to show in the legend. You can have more than one.
## Legend options
The Time series legend has additional features.
### Toggle series
Click on the series label in the legend to isolate the series in the visualization. All other series are hidden in the visualization. The data of the hidden series is still accessible.
Cmd/Ctrl+click on the series label to hide the clicked series and remove the toggle.
> **Note:** This option is persistent when you save the dashboard.
This creates a system override that hides the other series. You can view this override in the Overrides tab. If you delete the override, then it removes the toggle.
### Change series color
Click on the series icon (colored line beside the series label) in the legend to change selected series color.
+1 -1
View File
@@ -41,7 +41,7 @@ Users can belong to one or more organizations. A user's organization membership
## Dashboard and folder permissions
Dashboard and folder permissions allow you to remove the default role based permissions for Editors and Viewers and assign permissions to specific users and teams. Learn more about [Dashboard and folder permissions]({{< relref "dashboard_folder_permissions.md" >}}).
Dashboard and folder permissions allow you to remove the default role based permissions for Editors and Viewers and assign permissions to specific users and teams. Learn more about [Dashboard and folder permissions]({{< relref "dashboard-folder-permissions.md" >}}).
## Data source permissions
@@ -0,0 +1,50 @@
+++
title = "Dashboard and folder permissions"
description = "Grafana Dashboard and Folder Permissions Guide "
keywords = ["grafana", "configuration", "documentation", "dashboard", "folder", "permissions", "teams"]
aliases = ["/docs/grafana/latest/permissions/dashboard_folder_permissions/"]
weight = 200
+++
# Grant dashboard and folder permissions
You can assign and remove permissions for organization roles, users, and teams for specific dashboards and dashboard folders.
This topic explains how to grant permissions to specific folders and dashboards.
To learn more about denying access to certain Grafana users, refer to [Restricting access]({{< relref "restricting-access.md">}}).
![Folder permissions](/img/docs/permissions/folder-permissions-7-5.png)
## Permission levels
Grafana has three permission levels that can be assigned. These permissions are separate from [organization roles]({{< relref "organization_roles.md">}}).
- **Admin -** Can create, edit, or delete dashboards. Can create, edit, and delete folders. Can also change dashboard and folder permissions.
- **Edit -** Can create and edit dashboards. _Cannot_ change folder or dashboard permissions, or add, edit, or delete folders.
- **View -** Can only view existing dashboards and folders.
## Grant folder permissions
Folder permissions apply to the folder and all dashboards contained within it.
1. In the sidebar, hover your mouse over the **Dashboards** (squares) icon and then click **Manage**.
1. Hover your mouse cursor over a folder and then click **Go to folder**.
1. Go to the **Permissions** tab, and then click **Add Permission**.
1. In **Add Permission For**, select **User**, **Team**, or one of the role options.
1. In the second box, select the user or team to add permission for. Skip this step if you selected a role option in the previous step.
1. In the third box, select the permission you want to add.
1. Click **Save**.
## Grant dashboard permissions
1. In the top right corner of your dashboard, click the cog icon to go to **Dashboard settings**.
1. Go to the **Permissions** tab, and then click **Add Permission**.
1. In **Add Permission For**, select **User**, **Team**, or one of the role options.
1. In the second box, select the user or team to add permission for. Skip this step if you selected a role option in the previous step.
1. In the third box, select the permission you want to add.
1. Click **Save**.
## Edit permissions
To change existing permissions, navigate to the permissions page as described above. Instead of clicking **Add permission**, change or delete permissions already assigned. Changes take effect immediately.
+22 -2
View File
@@ -15,7 +15,26 @@ Each organization can have one or more data sources.
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.
## Compare roles
The table below compares what each role can do. Read the sections below for more detailed explanations.
| | Admin | Editor | Viewer |
|:---|:--:|:--:|:--:|
| View dashboards | x | x | x |
| Add, edit, delete dashboards | x | x | |
| Add, edit, delete folders | x | x | |
| View playlists | x | x | x |
| Create, update, delete playlists | x | x | |
| Access Explore | x | x | |
| Add, edit, delete data sources | x | | |
| Add and edit users | x | | |
| Add and edit teams | x | | |
| Change organizations settings | x | | |
| Change team settings | x | | |
| Configure app plugins | x | | |
## Organization admin role
@@ -23,13 +42,14 @@ Can do everything scoped to the organization. For example:
- Can add, edit, and delete data sources.
- Can add and edit users and teams in their organization.
- Can add, edit, and delete folders containing dashboards for data sources associated with their organization.
- Can add, edit, and delete folders containing dashboards for data sources associated with their organization. They can also edit folder permissions.
- Can configure app plugins and organization settings.
- Can do everything allowed by the Editor role.
## Editor role
- Can view, add, and edit dashboards, panels, and alert rules in dashboards they have access to. This can be disabled on specific folders and dashboards.
- Can add, edit, and delete folders containing dashboards for data sources associated with their organization. They cannot edit folder permissions.
- Can create, update, or delete playlists.
- Can access Explore.
- Can add, edit, or delete alert notification channels.
@@ -0,0 +1,41 @@
+++
title = "Restricting access"
weight = 500
+++
# Restricting access
The highest permission always wins so if you for example want to hide a folder or dashboard from others you need to remove the **Organization Role** based permission from the Access Control List (ACL).
- You cannot override permissions for users with the Organization Admin role. Admins always have access to everything.
- A more specific permission with a lower permission level will not have any effect if a more general rule exists with higher permission level. You need to remove or lower the permission level of the more general rule.
Here are some examples of how Grafana resolves multiple permissions.
## Example 1 (user1 has the Editor Role)
Permissions for a dashboard:
- Everyone with Editor role can edit
- user1 can view
Result: `user1` has Edit permission as the highest permission always wins.
## Example 2 (user1 has the Viewer Role and is a member of team1)
Permissions for a dashboard:
- Everyone with Viewer role can view
- user1 Can Edit
- team1 Can Admin
Result: `user1` has Admin permission as the highest permission always wins.
## Example 3
Permissions for a dashboard:
- user1 can admin (inherited from parent folder)
- user1 can edit
Result: You cannot override to a lower permission. `user1` has Admin permission as the highest permission always wins.
+1
View File
@@ -20,6 +20,7 @@ about deprecations, breaking changes as well as changes that relate to plugin de
- [Release notes for 7.4.2]({{< relref "release-notes-7-4-2" >}})
- [Release notes for 7.4.1]({{< relref "release-notes-7-4-1" >}})
- [Release notes for 7.4.0]({{< relref "release-notes-7-4-0" >}})
- [Release notes for 7.3.10]({{< relref "release-notes-7-3-10" >}})
- [Release notes for 7.3.7]({{< relref "release-notes-7-3-7" >}})
- [Release notes for 7.3.6]({{< relref "release-notes-7-3-6" >}})
- [Release notes for 7.3.5]({{< relref "release-notes-7-3-5" >}})
@@ -0,0 +1,15 @@
+++
title = "Release notes for Grafana 7.3.10"
[_build]
list = false
+++
<!-- Auto generated by update changelog github action -->
# Release notes for Grafana 7.3.10
### Bug fixes
* **Security**: Fix API permissions issues related to team-sync CVE-2021-28146, CVE-2021-28147. (Enterprise)
* **Security**: Usage insights requires signed in users CVE-2021-28148. (Enterprise)
@@ -11,7 +11,7 @@ list = false
### Features and enhancements
* **Explore**: Do not show non queryable data sources in data source picker. [#31144](https://github.com/grafana/grafana/pull/31144), [@torkelo](https://github.com/torkelo)
* **Snapshots**: Do not allow an anonymous user to create snapshots. [#31263](https://github.com/grafana/grafana/pull/31263), [@marefr](https://github.com/marefr)
* **Security**: Do not allow an anonymous user to create snapshots. CVE-2021-27358. [#31263](https://github.com/grafana/grafana/pull/31263), [@marefr](https://github.com/marefr)
### Bug fixes
@@ -65,3 +65,4 @@ list = false
* **Plugins**: Add autoEnabled plugin JSON field to auto enable App plugins and add configuration link to menu by default. [#31354](https://github.com/grafana/grafana/pull/31354), [@torkelo](https://github.com/torkelo)
* **Pagination**: Improve pagination for large number of pages. [#30151](https://github.com/grafana/grafana/pull/30151), [@nathanrodman](https://github.com/nathanrodman)
@@ -19,3 +19,4 @@ list = false
* **DashboardSettings**: Fixes issue with tags list not updating changes are made. [#32241](https://github.com/grafana/grafana/pull/32241), [@huynhsamha](https://github.com/huynhsamha)
* **DashboardSettings**: Fixes issue with tags list not updating changes are made. [#32189](https://github.com/grafana/grafana/pull/32189), [@huynhsamha](https://github.com/huynhsamha)
* **Loki**: Fix text search in Label browser. [#32293](https://github.com/grafana/grafana/pull/32293), [@ivanahuckova](https://github.com/ivanahuckova)
@@ -11,3 +11,4 @@ list = false
### Bug fixes
* **MSSQL**: Fix panic not implemented by upgrading go-mssqldb dependency. [#32347](https://github.com/grafana/grafana/pull/32347), [@aknuds1](https://github.com/aknuds1)
@@ -19,3 +19,4 @@ list = false
* **Table**: Fix links for image cells. [#32370](https://github.com/grafana/grafana/pull/32370), [@kaydelaney](https://github.com/kaydelaney)
* **Variables**: Fix data source variable when default data source is selected. [#32384](https://github.com/grafana/grafana/pull/32384), [@torkelo](https://github.com/torkelo)
* **Variables**: Fix manually entering non-matching custom value in variable input/picker error. [#32390](https://github.com/grafana/grafana/pull/32390), [@torkelo](https://github.com/torkelo)
@@ -0,0 +1,9 @@
---
title: Grafana Cloud
---
## Grafana Cloud
Grafana Cloud is a highly available, fast, fully managed OpenSaaS logging and metrics platform. Everything you love about Grafana, but Grafana Labs hosts it for you and handles all the headaches.
[Learn more about Grafana Cloud](https://grafana.com/cloud/) or try the [Grafana Cloud Linux host quickstart](/docs/grafana-cloud/quickstart/).
@@ -0,0 +1,11 @@
---
title: Grafana Enterprise
---
## Grafana Enterprise
[Grafana Enterprise]({{< relref "../../enterprise/_index.md" >}}) is a commercial edition of Grafana that includes additional features not found in the open source version.
Building on everything you already know and love about Grafana, Grafana Enterprise adds enterprise data sources, advanced authentication options, more permission controls, 24x7x365 support, and training from the core Grafana team.
[Learn more about Grafana Enterprise](https://grafana.com/enterprise). To purchase Enterprise or obtain a trial license, contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
@@ -0,0 +1,7 @@
---
title: What is Grafana?
---
## What is Grafana?
Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.
@@ -0,0 +1,13 @@
---
title: First step of Getting started with...
---
## Step 1. Install Grafana and build your first dashboard
Use the instructions in [Getting started with Grafana]({{< relref "../../getting-started/getting-started.md" >}}) to:
- Install Grafana.
- Log in to Grafana.
- Create your first dashboard.
You can also configure a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance to display system metrics without having to host Grafana yourself.
@@ -0,0 +1,18 @@
---
title: Legend mode and legend placement
---
### Legend mode
Use these settings to refine how the legend appears in your visualization.
- **List -** Displays the legend as a list. This is a default display mode of the legend.
- **Table -** Displays the legend as a table.
- **Hidden -** Hides the legend.
### Legend placement
Choose where to display the legend.
- **Bottom -** Below the graph.
- **Right -** To the right of the graph.
+2 -2
View File
@@ -95,7 +95,7 @@ The following topics were updated as a result of this feature:
_Server-side expressions_ is an experimental feature that allows you to manipulate data returned from backend data source queries. Expressions allow you to manipulate data with math and other operations when the data source is a backend data source or a **--Mixed--** data source.
The main use case is for [multi-dimensional]({{< relref "../getting-started/timeseries-dimensions.md" >}}) data sources used with the upcoming next generation alerting, but expressions can be used with backend data sources and visualization as well.
The main use case is for [multi-dimensional]({{< relref "../basics/timeseries-dimensions.md" >}}) data sources used with the upcoming next generation alerting, but expressions can be used with backend data sources and visualization as well.
> **Note:** Queries built with this feature might break with minor version upgrades until Grafana 8 is released. This feature does not work with the current Grafana alerting.
@@ -186,7 +186,7 @@ These features are included in the Grafana Enterprise edition.
### Licensing changes
When determining a user’s role for billing purposes, a user who has the ability to edit and save dashboards is considered an Editor. This includes any user who is an Editor or Admin at the Org level, and who has granted Admin or Edit permissions via [Dashboard and folder permissions]({{< relref "../permissions/dashboard_folder_permissions.md">}}).
When determining a user’s role for billing purposes, a user who has the ability to edit and save dashboards is considered an Editor. This includes any user who is an Editor or Admin at the Org level, and who has granted Admin or Edit permissions via [Dashboard and folder permissions]({{< relref "../permissions/dashboard-folder-permissions.md">}}).
After the number of Viewers or Editors has reached its license limit, only Admins will see a banner in Grafana indicating that the license limit has been reached. Previously, all users saw the banner.
+62 -15
View File
@@ -10,8 +10,6 @@ list = false
# What’s new in Grafana v7.5
> **Note:** This is content for a beta version of Grafana. It will be updated several times before the stable release.
This topic includes the release notes for Grafana v7.5. For all details, read the full [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md).
## Grafana OSS features
@@ -20,13 +18,19 @@ These features are included in the Grafana open source edition.
### Pie chart panel visualization (beta)
Grafana 7.5 adds a beta version of the next-gen pie chart panel.
Grafana 7.5 adds a beta version of the next-generation pie chart panel.
![Pie chart panel](/img/docs/pie-chart-panel/pie-chart-panel-7-5.png)
For more information, refer to [Pie chart panel]({{< relref "../panels/visualizations/pie-chart-panel.md" >}}).
### Alerting for Loki
Grafana 7.5 comes with alerting support for Loki. With LogQL you can wrap a log query with the functions that allow for creating metrics out of the logs, such as "rate()". Metric queries can then be used to calculate things such as the rate of error messages. [When combined with log parsers](https://www.youtube.com/watch?v=H9z2V0Ib1q0), they can be used to calculate metrics from a value within the log line, such latency or request size.
With alerting support for Loki, you can now create alerts on Loki metrics queries. Alert rules can be set up easily in the graph panel and you can learn more about the process of creating alerts in the Alert documentation.
With alerting support for Loki, you can now create alerts on Loki metrics queries.
[Alerting]({{< relref "../alerting/_index.md" >}}) was updated as a result of this change.
![Loki alerting](/img/docs/alerting/alerting-for-loki-7-5.png)
@@ -40,6 +44,8 @@ For new Prometheus data sources, we have changed the default HTTP method to POST
> **Note:** This is not going to affect provisioned data sources or already created data sources.
[Prometheus data source]({{< relref "../datasources/prometheus.md" >}}) was updated as a result of this change.
### Word highlighting for Elasticsearch
When searching for text in Elasticsearch logs, matching words in the log line returned by the query are now highlighted.
@@ -50,6 +56,8 @@ When searching for text in Elasticsearch logs, matching words in the log line re
In Grafana 7.5, we changed how data for the trace view is sent from the data source. The required data frame has a clear format, which is more aligned with how data is generally represented in Grafana. This makes it easier for third-party developers to implement data sources leveraging the trace view.
For more information, refer to [trace data API docs]({{< relref "../explore/trace-integration.md#data-api" >}}).
### Paste in SSL certs for Postgres data source
Previously, when users wanted to configure the Postgres data source to connect with SSL certification, they needed to put the certification on the server, and configure the data source with file path.
@@ -58,18 +66,65 @@ Instead of the file path, users can now paste the SSL certification content in t
> **Note:** It remains as limitation for the hosted Grafana, because the user doesn't have access to the server configuration.
### Deprecation notice for some Azure Monitor queries
[Postgres data source]({{< relref "../datasources/postgres.md" >}}) and [Provisioning]({{< relref "../administration/provisioning.md" >}}) were updated as a result of this change.
In the upcoming Grafana 8.0 release, Application Insights and Insights Analytics query types within the Azure Monitor data source will be deprecated and be made read-only in favor of querying Application Insights from Metrics and Logs.
### Deprecation notice for some Azure Monitor queries
In the upcoming Grafana 8.0 release, Application Insights and Insights Analytics query types within the Azure Monitor data source will be deprecated and be made read-only in favor of querying Application Insights from Metrics and Logs.
Grafana 7.5 includes a deprecation notice for these queries, and some documentation to help users prepare for the upcoming changes.
For more information refer to [Deprecating Application Insights and Insights Analytics]({{< relref "../datasources/azuremonitor.md#deprecating-application-insights-and-insights-analytics" >}}).
For more information, refer to [Deprecating Application Insights and Insights Analytics]({{< relref "../datasources/azuremonitor.md#deprecating-application-insights-and-insights-analytics" >}}).
### Cloudwatch data source enhancements
- Support for region eu-south-1 has been added to the CloudWatch data source. New metrics have also been added to the namespaces AWS/Timestream, AWS/RDS (RDS Proxy metrics), AWS/NetworkFirewall, AWS/GroundStation, and AWS/DDoSProtection. Many thanks to [relvira](https://github.com/relvira), [ilyastoli](https://github.com/ilyastoli), and [rubycut](https://github.com/rubycut) for contributing!
- Added a page limit to the List Metrics API call to improve speed and reduce memory consumption. You can change this limit by entering a higher value in [list_metrics_page_limit]({{< relref "../administration/configuration.md#list-metrics-page-limit" >}}) in the Grafana configuration file.
- You can now enable or disable authentication providers and assume a role other than default by changing the [allowed_auth_providers]({{< relref "../administration/configuration.md#allowed-auth-providers" >}}) and [assume_role_enabled]({{< relref "../administration/configuration.md#assume-role-enabled" >}}) options in the Grafana configuration file. By default, the allowed authentication providers are _AWS SDK Default_, _Access && secret key_, and _Credentials File_, and role is _Assume role (ARN)_.
- You can now specify a custom endpoint in the CloudWatch data source configuration page. This field is optional, and if it is left empty, then the default endpoint for CloudWatch is used. By specifying a regional endpoint, you can reduce request latency.
[AWS Cloudwatch data source]({{< relref "../datasources/cloudwatch.md#endpoint" >}}) was updated as a result of this change.
### Increased API limit for CloudMonitoring Services
In previous versions, when querying metrics for Service Level Objectives (SLOs) in the CloudMonitoring data source, only the first 100 services were listed in the **Service** field list. To overcome this issue, the API limit for listing services has been increased to 1000.
### Tempo as a backend data source
We have converted Tempo to a backend data source and dropped support for tempo-query's (Jaeger) response. To configure it, you can now point to the port that is set in the Tempo configuration file.
```yaml
server:
http_listen_port: 3101
```
[Azure Monitor data source]({{< relref "../datasources/azuremonitor.md" >}}) was updated as a result of this change.
## Enterprise features
These features are included in the Grafana Enterprise edition.
### Query caching
When caching is enabled, Grafana temporarily stores the results of data source queries. When you or another user submit the same query again, the results return from the cache instead of from the data source (such as Splunk or ServiceNow).
Query caching advantages:
- Faster dashboard load times, especially for popular dashboards.
- Reduced API costs.
- Reduced likelihood that APIs will rate-limit or throttle requests.
Caching currently works for all backend data sources. You can enable the cache globally or per data source, and you can configure the cache duration per data source. The cache is currently in-memory.
For more information, refer to [Query caching]({{< relref "../enterprise/query-caching.md" >}}).
### Use template variable in reports
If you have created dashboards with template variables, then you can choose which values are selected when rendering a report. This makes it easier to tailor reports to their audience or generate multiple reports from the same dashboard.
Enable this feature in configuration settings using the `templateVariables` flag.
For more information, refer to [Reporting]({{< relref "../enterprise/reporting.md#choose-template-variables" >}}).
### Active user limits
If a Grafana instance has exceeded its licensed number of active users, then non-active users who try to sign in to Grafana will be prevented from doing so. Active users are users who have logged in to Grafana in the past 30 days. The total number of users registered in Grafana does not affect this rule. This enforcement is applied separately for Viewers and for Editor/Admins, so if you reach your active Viewer limit, new Editor/Admins will still be able to sign in. This rule also includes a 10% buffer, meaning that you need to exceed your limit by 10% before users are prevented from signing in.
@@ -92,14 +147,6 @@ A new session is created when you sign in to Grafana from a different device or
For more information on Grafana Enterprise licensing and restrictions, refer to [License restrictions]({{< relref "../enterprise/license/license-restrictions.md" >}}).
### Query caching
If you enable this feature, then Grafana hashes and cashes data source queries and serves cached versions of hashed queries if applicable.
### Use template variable in reports
If you enable the feature, then you can use template variables in reports.
## Breaking changes
There are no known breaking changes in this release.