Reader small image

You're reading from  Building IoT Visualizations using Grafana

Product typeBook
Published inJul 2022
PublisherPackt
ISBN-139781803236124
Edition1st Edition
Right arrow
Author (1)
Rodrigo Juan Hernández
Rodrigo Juan Hernández
author image
Rodrigo Juan Hernández

Rodrigo Juan Hernández is an electronic engineer passionate about IoT even before it existed. He has been working on tech for more than 18 years until now. For several years he has been focusing on the IoT ecosystem. He is currently giving consultation about IoT systems to clients around the world. He also produces content online about IoT and related subjects and the content is available on his blog, Youtube channel, and social networks - mainly LinkedIn. He also writes for companies that need good quality content about their products and services. His main objective nowadays is helping others to understand and implement IoT solutions.
Read more about Rodrigo Juan Hernández

Right arrow

Chapter 8: Organizing and Managing Dashboards

A dashboard must provide a clear picture of the data. So, it is important to keep things clean and organized, showing neat dashboards with relevant information.

In previous chapters, you have learned how to build dashboards using different types of data sources and visualization panels. In this chapter, you will learn how to organize, manage, and share dashboards.

Grafana offers several tools for organizing dashboards and making insights.

In this chapter, you will learn about the following:

  • Organizing panels and dashboards
  • Properties of dashboards
  • Annotations and variables
  • Linking and sharing dashboards
  • Exporting and importing dashboards

First, let’s see how you can organize your panels and dashboards.

Organizing panels and dashboards

In this section, you will learn how to manage dashboards and control visualizations.

Building dashboards is not just about showing data in visualization panels. You will have to provide an easy-to-understand user interface, where people can observe the data they need.

Controlling the visualization

Let’s start looking in detail at all the options available in a Grafana dashboard. In the following figure, you can see the upper-right menu, where you can control many aspects of the visualizations:

Figure 8.1 – Visualization controls

From left to right, you can see the following controls:

  • Add panel button: With this button, you can add a new panel to the dashboard.
  • Save dashboard: This button allows you to save the dashboard with the current name.
  • Dashboard settings: This option leads you to the configuration settings of the dashboard. We will see it later in this chapter.
  • Time range...

Properties of dashboards

Dashboards have many properties, which you can configure to control the way they behave. Let’s see each of them.

General dashboard properties

In Figure 8.6, you can see the settings page of the General dashboard properties:

Figure 8.6 – Setting the dashboard properties

Now, let’s explore all the fields shown in the preceding figure:

  • Name: As you can guess, this is the name of the dashboard. You can give the dashboard any meaningful name.
  • Description: Here, you can include a helpful text to describe the purpose of the dashboard.
  • Tags: Tags are useful for identifying the features and objectives of the dashboards. You may put here things such as type of sensor, location, type of hardware, type of use, and so on. Then, you can group dashboards in a playlist according to their tags.
  • Folder: Inside an organization, you can use folders to group dashboards into different categories. This allows...

Annotations and variables

In this section, you will learn about two important features of Grafana: annotations and variables. First, we will explore annotations.

Annotations

Annotations are a great tool for building insights into the data. With annotations, you can mark data points according to specific criteria.

Then, when you hover a data point, you will see the annotation description and the associated tags (if available).

Grafana makes it easy to add annotations. You can do it directly from the graphical user interface. The annotations can be related to a data point or a range of data. In Figure 8.7, you can see an annotation related to a data range.

To add a data range annotation, press Ctrl/Cmd + click to select the region with the mouse. If you just want to select a data point, use Ctrl/Cmd + click with the mouse.

Figure 8.7 – Adding an annotation to a data range

Once you have added an annotation, it will remain visible in the...

Linking and sharing dashboards

In this section, you will learn how to link dashboards to achieve better navigation. You will also learn how to share dashboards.

Linking dashboards and panels

You can use links to navigate between dashboards, panels, and even external sites. Links allow you to build a better experience for the user. For example, you may have related data distributed among several dashboards. In this case, links are a good tool for rapid and easy navigation.

In Grafana, you can use dashboard links, panel links, and data links. Dashboard links are shown at the top of the dashboard, whereas you can see panel links in the top-left corner of the panel.

Dashboard links

In a dashboard link, you can include the time range and variables, so the user can see the right data. Let’s see how to create a dashboard link.

Figure 8.18 – Creating a dashboard link

To add links to dashboards, follow these steps (see Figure 8.18):

    ...

Exporting and importing dashboards

The dashboards in Grafana are based on a JSON structure. This object includes all the information about properties, panel data, variables, and queries.

To see the JSON of a dashboard, go to the top of the screen, click on Dashboard settings, and click on JSON Model. You will see something similar to the following code:

Figure 8.29 – JSON model of a dashboard

As the JSON model has all the data needed to represent a dashboard, if you want to export one, you only need to copy this model and store it in a text file.

Let’s see how you can export a dashboard easily from Grafana.

Exporting a dashboard

First, click on the share icon at the top of the screen, and select the Export tab in the dialog box, as you can see in Figure 8.29:

Figure 8.30 – Exporting a dashboard

Then, you can choose to view the JSON object on the screen or click on Save to file to generate a JSON file...

Summary

This has been a long chapter, in which you have learned a lot of things. First, you saw how to manage and organize dashboards and panels. Then, you learned everything about dashboard properties. After that, you learned about two important features of Grafana: annotations and variables. Then, you learned how to build links to other dashboards and how to share them with users inside and outside of the organization. Finally, you learned how to export and import dashboards.

That’s all for now. The next chapter starts a new and very interesting part of the book: performing analytics and notifications. We will start by seeing how to perform advanced analytics using some plugins in Grafana.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Building IoT Visualizations using Grafana
Published in: Jul 2022Publisher: PacktISBN-13: 9781803236124
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Rodrigo Juan Hernández

Rodrigo Juan Hernández is an electronic engineer passionate about IoT even before it existed. He has been working on tech for more than 18 years until now. For several years he has been focusing on the IoT ecosystem. He is currently giving consultation about IoT systems to clients around the world. He also produces content online about IoT and related subjects and the content is available on his blog, Youtube channel, and social networks - mainly LinkedIn. He also writes for companies that need good quality content about their products and services. His main objective nowadays is helping others to understand and implement IoT solutions.
Read more about Rodrigo Juan Hernández