Blog
23 July 2020
Ivan Mikheykin, software engineer

Grafana statusmap panel 0.3.0 and what it brings

We first announced our Grafana plugin almost two years ago. Now it is listed under the name flant-statusmap-panel in the official Grafana Labs directory of plugins. In short, it helps you to visualize the status of various objects in time.

Here is a vivid illustration of what it can do:

We use this kind of visualizing approach, for example, to control the health of pods in the Kubernetes clusters visually. You can learn more about our motivation and the plugin design in the announcement mentioned above. The purpose of this article is to shed some light on the main changes and new features implemented in the recent grafana-statusmap 0.3.0 release.

Major improvements

  • New algorithm for drawing cards. In the earlier versions, the algorithm assumed that the data from datasources is evenly distributed across the time scale of the chart at a given interval. Prometheus is a known source of such “well-prepared” data. However, on many occasions, your source can provide data series with conflicting timestamps (some of them can even be missing).

The new algorithm distributes incoming timestamps across buckets at the specified interval. It works great with Prometheus and solves the problem with tooltips and missing cards.

Now the cards on the chart are beautifully aligned. However, there are cases when you may need to display the cards in a strict accordance with the timestamps from your data (for example, when displaying information about builds performed in the CI system). We plan to implement such a “non-distributed” mode in the next release:

Rendering with no alignment in previous versions of grafana-statusmap (top chart) as opposed to rendering using a predefined interval (bottom chart)
  • New tooltip capabilities. Now you can insert links there and “freeze” the hovered tooltip by clicking on the card. Furthermore, you can insert the values from the card and the period of the chart in the link as well as turn the value from the card into a formatted date (PR 86 by Joaquín Jiménez García — thanks, Joaquín, much appreciated!).
  • Simplified rendering of a large number of rows. Rows can be paginated and got some controls (PR 93 by the same Joaquín).

Minor fixes are also included:

  • The rendering in recent versions of Grafana, 6.7, 7.0 and 7.1, is fixed. The last one (v7.1) has been actually made in grafana-statusmap v0.3.1 and led us to an issue in the Grafana repo itself (#26494).
  • “Using strings as events is deprecated” warnings (in the developer console using new versions of Grafana — 6.6+) are removed.

Future plans

We plan to continue optimizing the plugin as well as add several new features, such as:

  • Implement the aforementioned non-aligned rendering mode for custom events.
  • Test the data transformation functionality implemented in Grafana 7.
  • Add options to hide X and Y axes.
  • Add support for Grafana alerting.
  • Improve our support for Grafana annotations (add color selection for tags, annotations with time ranges, annotations with alert: true).
  • Implement support for the Trickster’s Fast Forward feature (grouping the recent data in the rightmost bucket).

Conclusion

Our last releases (v0.3.0 & v0.3.1) are not yet in the official Grafana repository. Since the process of approving a plugin always takes some time, we can only sit and wait until the are included. Still, you can install the latest version of the plugin from the repository of the project on GitHub.

As always, we will be happy if you star grafana-statusmap on GitHub! Feel free to ask us questions about the plugin (in the comments below or our Slack channel) or open pull requests!

Afterword

This article has been originally posted on Medium. New texts from our engineers are placed here, on blog.flant.com. Please follow our Twitter or subscribe below email to get last updates!