Introducing the Untimely Grafana Panel

Pieterjan Lambrecht, Frederik Van Leeckwyck on

Update: the Untimely plugin is now published on the plugin page . Installation is now a one-click or one-command install.

Introducing Untimely

Industry 4.0 starts with time series data collected from various sensors from production equipment. What is stored is always a combination of a timestamp, sensor value and potentially metadata such as the equipment where the data originated.

However, when reading values, time is not necessarily the best dimension to obtain insights from the collected data. In particular, we have encountered a couple of use cases where we’d prefer to look at the data from a length perspective instead of time.

So in this blog post, we’ll describe why we decided to write and release the Untimely Grafana panel for displaying time series data in function of another dimension. It is meant for the reader with a basic understanding of Grafana plugins and ideally with an industrial use case.

Where is this useful?

We believe this Grafana panel is useful for industries that produce at length, for example in the process industry. Sensors might be placed at the extrusion die or further down the line to measure temperature, thickness, defects or other material properties. In particular, cases we have encountered are:

  • Plastic sheet or tube extrusion e.g. for shrink wrap film
  • Woven and non-woven textile e.g. looms
  • Metal coil processing e.g. rolling and cutting

The end result looks like this:

Untimely Grafana panel screenshot
Panel of Untimely plugin showing the value of 2 metrics at length 1502 m.

Features and known points of improvement

The initial release has the following features:

  • X-axis reset: useful when dealing with e.g. rolls of a certain length. Each time a new roll is loaded for processing, the distances recorded are reset to 0 at the beginning. This is marked on the x-axis with a downward facing arrow.
  • Specifying offset: useful if the sensor is not at the zero position.
  • Tooltip when hovering: useful for inspecing values at a certain strip position.

Known points of improvement:

  • The panel rendering speed can be improved, especially the algorithm used to display ticks on the x-axis feels like it can be improved.
  • When there are few points in the series used for the x-axis, the resulting graph is not very accurate. There is no linear interpolation as of now.
  • The new @grafana/ui package does not export many of the components that are used. Because of this, things like the tooltip had to be reimplemented.

How to use it

Install the plugin according to the readme on GitHub. Once installed, the panel is available for use.

Add at least 2 separate queries to a Grafana panel, each representing a single time series, after which you can select the Untimely visualization type and mark which series should be used for the x-axis.

Grafana Query Editor
Grafana query builder shows the addition of multiple metrics, one of which (A in this case) will be used for the X-axis.
Options for the Untimely panel
Options for the Untimely panel.

In our case, raw data looked like this:

> SELECT max("value") FROM "metercounter" WHERE time >= '2019-11-06T04:08:00Z' and time <= '2019-11-06T04:28:00Z' GROUP BY time(1m)
name: metercounter
time                 max
----                 ---
2019-11-06T04:08:00Z 0
2019-11-06T04:09:00Z 1
2019-11-06T04:10:00Z 4
2019-11-06T04:11:00Z 6
> SELECT min("value") FROM "temperature" WHERE time >= '2019-11-06T04:08:00Z' and time <= '2019-11-06T04:28:00Z' GROUP BY time(1m)
name: temperature
time                 min
----                 ---
2019-11-06T04:08:00Z 22.04
2019-11-06T04:09:00Z 22.04
2019-11-06T04:10:00Z 21.28
2019-11-06T04:11:00Z 21.28
> SELECT min("value") FROM "draw_speed" WHERE time >= '2019-11-06T04:08:00Z' and time <= '2019-11-06T04:28:00Z' GROUP BY time(1m)
name: draw_speed
time                 min
----                 ---
2019-11-06T04:08:00Z 0
2019-11-06T04:09:00Z 0
2019-11-06T04:10:00Z 2
2019-11-06T04:11:00Z 7

How is this different from other Grafana plugins?

Other Grafana panel plugins that display time series data in relation to another dimension are e.g. flowcharting panel or plotly . We initially tried using the latter, but the manufacturing-specific aspects - multiple sensors and distance resets - made us decide to build a separate plugin.

Feedback and improve

Please feel free to mark your issues or submit a pull request to make this Grafana panel plugin better.