If you are following the steps to create your first Grafana dashboard, this is the last of the 4 steps. The previous steps can be found here:
Go to the Grafana dashboard environment and click in the main menu on “Dashboards”. (1)
Then click on the “New” (2) button and select new dashboard.
The click on the “Add visualization” button (3).
Select the “simple grpc datasource”. In this tutorial we have given it the name innius.
Now you are ready to create your first Query to get the data from the Innius platform.
The query can be configured in the following 6 steps:
Step 1
The first step to create a query is to define the Query type (5).
There are three query types:
- Get metric history. This query type will return non-aggregated data. This query type needs to be used if you want to display sensor data which has been defined in innius as “discreet values”. As this query type returns non-aggregated values, it is advised to use the query type “Get metric aggregate” if you want to view data over a long time period.
- Get metric value. This query type will return the last value of a selected time period.
- Get metric aggregates. This query type will return aggregate data. The aggregation level depends on the time period selected. Grafana determines the best suited aggregation level automatically. This aggregation level can be influenced manually by the query options.
The time period of your query can be set in the right corner of your dashboard (6).
Step 2
The second step is to select from which innius machine you want to query the data from. This can be done by clicking on the “Add dimension” button (7).
Choose as input for Key (8) “machine” and for the Value (9) you can select the innius machine for which you want to query the data. In this tutorial we have selected the Packaging line bread machine.
Step 3
The third step is to select the metric (10). The metric can be an innius sensor, a KPI or a component of a KPI belonging to the machine selected in step 2.
Step 4
The fourth step is to give the selected metric a display name (11). This name will be used in the legend of the graph.
Step 5
In the fifth step you can select the view (12). There are two view types:
- Interpolated. Raw data that is interpolated according to the innius sensor frequency and last known values.
- Changes. Time series data that only contains values which are different to the proceeding value.
If you have selected "Changes", an additional option will become available, Visual Optimization (13).
As only the changes are displayed for the selected query period it is possible that there are no datapoints or a few datapoints are available for the view. With the Visual Optimization option you can influence the view.
There are two Visual Optimization type:
- Fill Begin and End. A previous value is added to the beginning and last known data point is added to the end of the query period. (See example 1)
- No optimization. No data points are added to the view. (See example 2)
Example 1. Visual optimization: Fill Begin and End.
Example 2: Visual optimization: No optimization.
Step 6
Now the query is ready to get the data from the innius platform. Press the "Apply" button (14) to view the dashboard.
And… don’t forget to save (15) your first dashboard.
A final remark
Here https://grafana.com/docs/grafana-cloud you can find more documentation about Grafana dashboards.