@@ -45,8 +45,8 @@ Transformations are available from the Transform tab in the bottom pane of the p
1. Navigate to the panel that you want to add transformations, click the panel title and then click **Edit**.
1. Click the **Transform** tab.
1. Click a transformation to select it.
1. Click a transformation to select it.
A transformation row appears that allows you to configure the transformation options.
Click **Add transformation** to apply another transformation. Keep in mind that the next transformation acts on the result set returned by the previous transformation.
...
...
@@ -107,25 +107,24 @@ In the example below, we have two queries returning table data. It is visualized
Query A:
| Time | Job | Uptime |
|---------------------|---------|-----------|
| ------------------- | ------- | --------- |
| 2020-07-07 11:34:20 | node | 25260122 |
| 2020-07-07 11:24:20 | postgre | 123001233 |
Query B:
| Time | Job | Errors |
|---------------------|---------|--------|
| ------------------- | ------- | ------ |
| 2020-07-07 11:34:20 | node | 15 |
| 2020-07-07 11:24:20 | postgre | 5 |
Here is the result after applying the `Merge` transformation.
This transformation goes in two steps. First you specify one or multiple fields to group the data by. This will group all the same values of those fields together, as if you sorted them. For instance if we `Group By` the `Server ID` field, it would group the data this way:
| Time | Server ID | CPU Temperature | Server Status
All rows with the same value of `Server ID` are grouped together.
After choosing which field you want to group your data by, you can add various calculations on the other fields, and the calculation will be applied on each group of rows. For instance, we could want to calculate the average `CPU temperature` for each of those servers. So we can add the _mean_ calculation applied on the `CPU Temperature` field to get the following:
| Server ID | CPU Temperature (mean)
|-----------|--------------------------
| server 1 | 82
| server 2 | 88.6
| server 3 | 59.6
| Server ID | CPU Temperature (mean) |
| --------- | ---------------------- |
| server 1 | 82 |
| server 2 | 88.6 |
| server 3 | 59.6 |
And we can add more than one of those calculation. For instance :
- For field `Time`, we can calculate the *Last* value, to know when the last data point was received for each server
- For field `Server Status`, we can calculate the *Last* value to know what is the last state value for each server
- For field `Temperature`, we can also calculate the *Last* value to know what is the latest monitored temperature for each server
- For field `Time`, we can calculate the _Last_ value, to know when the last data point was received for each server
- For field `Server Status`, we can calculate the _Last_ value to know what is the last state value for each server
- For field `Temperature`, we can also calculate the _Last_ value to know what is the latest monitored temperature for each server
We would then get :
| Server ID | CPU Temperature (mean) | CPU Temperature (last) | Time (last) | Server Status (last)
| server 3 | 59.6 | 62 | 2020-07-07 11:34:20 | OK |
This transformation allows you to extract some key information out of your time series and display them in a convenient way.
...
...
@@ -290,7 +307,7 @@ This transformation allows you to extract some key information out of your time
> **Note:** This transformation is only available in Grafana 7.1+.
Use this transformation to combine the result from multiple time series data queries into one single result. This is helpful when using the table panel visualization.
Use this transformation to combine the result from multiple time series data queries into one single result. This is helpful when using the table panel visualization.
The result from this transformation will contain three columns: `Time`, `Metric`, and `Value`. The `Metric` column is added so you easily can see from which query the metric originates from. Customize this value by defining `Label` on the source query.
...
...
@@ -299,7 +316,7 @@ In the example below, we have two queries returning time series data. It is visu
Query A:
| Time | Temperature |
|---------------------|-------------|
| ------------------- | ----------- |
| 2020-07-07 11:34:20 | 25 |
| 2020-07-07 10:31:22 | 22 |
| 2020-07-07 09:30:05 | 19 |
...
...
@@ -307,7 +324,7 @@ Query A:
Query B:
| Time | Humidity |
|---------------------|----------|
| ------------------- | -------- |
| 2020-07-07 11:34:20 | 24 |
| 2020-07-07 10:32:20 | 29 |
| 2020-07-07 09:30:57 | 33 |
...
...
@@ -315,7 +332,7 @@ Query B:
Here is the result after applying the `Series to rows` transformation.