Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Building IoT Visualizations using Grafana
Building IoT Visualizations using Grafana

Building IoT Visualizations using Grafana: Power up your IoT projects and monitor with Prometheus, LibreNMS, and Elasticsearch

Arrow left icon
Profile Icon Rodrigo Juan Hernández
Arrow right icon
$28.99 $41.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (7 Ratings)
eBook Jul 2022 360 pages 1st Edition
eBook
$28.99 $41.99
Paperback
$51.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Rodrigo Juan Hernández
Arrow right icon
$28.99 $41.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (7 Ratings)
eBook Jul 2022 360 pages 1st Edition
eBook
$28.99 $41.99
Paperback
$51.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$28.99 $41.99
Paperback
$51.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Building IoT Visualizations using Grafana

Chapter 1: Getting Started with Grafana

In this chapter, you will learn what is Grafana and why it is an excellent option for building IoT solutions. Throughout this chapter, you will learn to install Grafana in different scenarios.

Also, you will be able to perform a basic configuration and make it run at boot.

Finally, we will explore the Grafana Cloud service, which you can use instead of installing and maintaining a Grafana instance.

In this chapter, we’re going to cover the following main topics:

  • Installing Grafana on a Raspberry Pi
  • Installing Grafana on Ubuntu Server
  • Installing Grafana with Docker
  • Initial configuration of Grafana
  • Maybe you prefer the cloud option

Let’s explore some of these functionalities.

Technical requirements

Depending on the type of implementation that you want to use, you will need some of the following requirements:

  • A Raspberry Pi: version 2, 3, or 4 will work. However, depending on the size of your solution, you will have to size your hardware according to it.
  • If you prefer to use an Ubuntu Server or a Docker implementation, then you will need a virtual machine, either local or in the cloud. The resources of the virtual machine will have to adapt to your system needs.

Managing data

Grafana allows to capture and manage data from many different sources, such as relational databases, time-series databases, NoSQL databases, Excel or CSV files, logs, and many others.

In this way, Grafana can be connected to different data sources, isolating the visualization and analytics app from the databases. All databases are independent and can be managed by the corresponding applications.

So, even if the database is managed by another department, read-only access can be granted to Grafana to perform analytics on that data.

With the release of Grafana 8.x, it is possible to feed live events into Grafana using MQTT, HTTP, or other streaming data sources. This is a great new feature for IoT systems.

Performing visualizations

Grafana allows you to build a broad range of dashboards, from the typical time-series plot to advanced visualizations.

The dashboards are made up of panels, which provide different types of visualizations.

Some of the possible visualization panels are as follows:

  • Time-series plots
  • Statistical graphs
  • Categorical or boolean panels
  • Text and logs
  • Topological views
  • Geographical or georeferenced data

Every dashboard can be easily modified through drag and drop and resize operations.

Dashboards can be shared with specific users or teams, allowing the data to be used in a cooperative way. Also, dashboards can be published on a website to make information available to the public.

Transformations, alerts, and annotations

With Grafana, you can perform transformations directly on the visualization panels. For instance, you can summarize, combine, rename, and make calculations just with a few clicks.

With Grafana, you can create, modify, and silence all the alert conditions in a centralized way. This functionality simplifies the management of alerts.

Finally, with annotations, you can make comments on data directly on the visualization panels. You can include descriptions and tags for every event of interest.

Now that you have learned about the capabilities of Grafana and the reasons that lead to its use in IoT systems, in the following sections, you will learn how to install Grafana on Raspberry Pi, Ubuntu Server, and Docker.

Installing Grafana on a Raspberry Pi

The Single Board Computer (SBC) Raspberry Pi has been widely adopted for many uses, including IoT. So, it is quite natural to try to use Grafana on it.

In this section, we will see how to install and configure Grafana on a Raspberry Pi. To achieve good performance, we will use a Raspberry Pi version 2 or later.

Installation instructions

All the following instructions assume that you are using Raspberry Pi OS as the operating system.

Let’s start:

  1. First, it is always recommended to start with an update.

So, we run the following:

$ sudo apt-get update
$ sudo apt-get upgrade
  1. After that, we need to download the binary files for the installation:
    $ wget https://dl.grafana.com/oss/release/grafana-rpi_8.0.6_armhf.deb
    $ sudo dpkg -i grafana-rpi_8.0.6_armhf.deb

    Note about Versions

    Change the package version to the most recent stable version available. You can find all the available options at https://grafana.com/grafana/download?edition=oss.

  2. The next step is to make Grafana start at boot. To do this, we can use the systemd service file, included in Grafana packages.

So, we enable it by running the following:

 $ sudo systemctl enable grafana-server

And that’s it. Grafana will start at every boot.

  1. Now, to start Grafana manually, we can use the following:
    $ sudo systemctl start grafana-server

Now that you know how to install Grafana on a Raspberry Pi, let’s dive into how you can access Grafana for the first time.

Accessing Grafana for the first time

Now that you have Grafana running in your Raspberry Pi, you can access it through any web browser, pointing it to http://your-raspberry-ip-address:3000.

You can use your Raspberry Pi IP address, as well as its DNS name. Or, if you are accessing Grafana from the Raspberry Pi itself, you can use localhost or 127.0.0.1 in the URL.

After you access the web interface, you will have to enter the username and password to enter the platform.

The default credentials are user = admin and password = admin.

Figure 1.1 – Grafana login page

Figure 1.1 – Grafana login page

In this section, you have learned to install Grafana on a Raspberry Pi. In the next section, you will see how to do it on Ubuntu Server.

Installing Grafana on Ubuntu Server

Ubuntu is one of the most popular operating systems for servers, so we will learn how to install Grafana on it.

Installing Grafana on Ubuntu is a very straightforward procedure because there are Ubuntu packages.

Installation instructions

Let’s look at what we need to do here:

  1. As before, we first run updates:
    $ sudo apt-get update 
    $ sudo apt-get upgrade
  2. Next, if you do not have wget installed on your server, you can install it as follows:
    $ sudo apt-get install apt-transport-https
    $ sudo apt-get install software-properties-common wget
  3. Then you can use wget to download the GPG key and add it to the APT keys. In this way, you authorize Grafana packages to be installed on the system:
    $ wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add –
  4. After that, you can add the Grafana repository (stable release) to the APT source list:
    $ echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
  5. Finally, run the following commands:
    $ sudo apt-get update
    $ sudo apt-get install grafana

Now that you have installed Grafana on Ubuntu Server, let’s see how to run it.

Running Grafana on Ubuntu Server

There are two ways of running Grafana as a service. Let’s have a look at them.

Running Grafana using systemd

Grafana services can be managed by systemd.

To start Grafana, simply execute the following:

$ sudo systemctl start grafana-server

To see the Grafana service status, run this command:

$ sudo systemctl status grafana-server

To stop the service, use this command:

$ sudo systemctl stop grafana-server

And to enable start at boot, use this command:

$ sudo systemctl enable grafana-server.service

Now that you know how to do it with systemd, let’s see how to do it with initd.

Running Grafana with initd

You can run Grafana as follows:

$ sudo service grafana-server start

To stop Grafana, use this command:

$ sudo service grafana-server stop

To get the service status, run this command:

$ sudo service grafana-server status

To configure it to start at boot, use the following command:

$ sudo update-rc.d grafana-server defaults

You have now installed and executed Grafana on Ubuntu Server. You also configured it to start on boot. Now let’s see how to access Grafana from a browser.

Accessing Grafana

Before trying to access Grafana, make sure that the service is running. You can check it using the preceding commands. If it is stopped, you must start it as shown earlier.

As soon as you have Grafana installed and running, you can access it by pointing the browser to http://your-server-ip-or-name:3000.

The default credentials are admin/admin.

Now that you have learned how to install and run Grafana on Ubuntu Server as well as how to manage start-up at boot using two different methods, let’s move on to the next section, where you will learn how to deploy Grafana using Docker.

Installing Grafana with Docker

Docker is a great option to deploy Grafana quickly and easily.

With Docker, you can manage multiple applications on the same server, avoiding conflicts between them. Each application can depend on different versions of libraries and software packages, but their files are completely isolated from each other.

Docker also allows us to start, stop, remove, and update applications in a few seconds. In a more advanced implementation, you can create a cluster with multiple hosts and containers. This cluster can be managed by Swarm or Kubernetes. However, this is beyond the scope of this book.

In this section, you will learn how to deploy Grafana using Docker.

You will be able to use two different methods: the Docker CLI and Docker Compose.

Deploying Grafana with Docker CLI

There are many ways to deploy Grafana with Docker.

One of these options is the operating system selection of the container. You can choose between Alpine and Ubuntu.

The most recent version of Grafana uses Alpine by default, which is a very light operating system based on musl libc and BusyBox. This is the option recommended by GrafanaLabs.

Important note

Please, do not run Docker on Windows. Docker is designed to run in a Linux host. If you run Docker on Windows, it will create a virtual machine running Linux (you need Windows Professional and Hyper V installed). It is more natural and easier to run Docker directly in a Linux host. So, I recommend you do this.

Now, let’s see how to deploy Grafana with Docker.

Running Grafana with Docker

To run Grafana from Docker with the default options, simply execute the following:

$ sudo docker run -d -p 3000:3000 grafana/grafana

The command options are as follows:

  • -d: Detached mode, which means to execute the container in the background.
  • -p 3000:3000: Container port and published port are set to 3000. You can change it at your convenience.

The grafana/grafana image comes with the Alpine operating system and the latest stable version of Grafana.

The deployment of Grafana can be modified through options and environment variables. Let’s see some examples:

$ sudo docker run -d \
  -p 3000:3000 \
  --name=grafana \
  -e "GF_INSTALL_PLUGINS= grafana-piechart-panel, agenty-flowcharting-panel " \
  grafana/grafana

The name option is used to give a specific name to the container and e to open the environment section.

In this particular example, the grafana-piechart-panel and agenty-flowcharting-panel plugins are installed when the container is created.

Using persisting storage

Every time a container is created, new files are generated by being copied from the image file, which contains all the necessary code, libraries, and dependencies to run the application.

In the same way, each time a container is deleted, all these files are removed and lost. So, if you want to have persistent data, such as configuration or data files, you will have to attach some storage located in the host (outside of the container).

There are two ways of doing this:

  • Using bind mounts
  • Using Docker volumes

Let’s explore these options.

Bind mounts

With bind mounts, you can mount a host directory in the container. This is typically used with configuration files, although it can be used either with databases or other data.

In this way, you keep a configuration file in the host (outside the container) that persists even if the container is deleted. Then, to create a new container with the previous configuration, you only have to bind the corresponding directory or file.

Let’s see how to do it with the command line:

 $ sudo docker run -d --name grafana -v "$PWD/config/grafana.ini:/etc/grafana/grafana.ini" -p 3000:3000 grafana/grafana

In this example, the config directory is mounted in the container and the grafana.ini file is accessible from the container. If you want to modify the configuration of Grafana, you can simply edit the grafana.ini file in the host and run the container again.

Important Note

$PWD/config/grafana.ini is where you have the ini file. It can be anywhere as long the directory has the appropriate read permissions.

Moreover, editing a file in the host is easier than editing it in the container.

Volumes

If you need to keep data stored even if you delete a container, you will have to use volumes. This will allow you to have persistent data into a host directory that can be read and write from the container.

Bind mounts are dependent on the directory structure and operating system of the host. In contrast, volumes are fully managed by Docker.

Volumes have some advantages with respect to bind mounts:

  • They are easier to move or back up.
  • You can manage them with the Docker CLI.
  • They can be shared safely among containers.
  • They can be created in remote hosts and accessed from any container.

Let’s see how to use Docker volumes:

$sudo docker run -d --name grafana -v grafanavol:/var/lib/grafana -p 3000:3000 grafana/grafana

In this command, we are creating a volume named grafanavol and mapping it to the directory /var/lib/grafana. This directory corresponds to Grafana data files.

You will learn about Grafana configuration and files in the next section.

By combining bind mounts and volumes, you can have the best of both worlds, as shown in the next command:

$ sudo docker run -d -v "$PWD/config/grafana.ini:/etc/grafana/grafana.ini" -v grafanavol:/var/lib/grafana -p 3000:3000 grafana/grafana

In this case, we can configure Grafana by modifying the grafana.ini file in the host while storing persistent data in the grafanavol volume.

Using environmental variables

You can customize the building process of the container with environmental variables.

You can find the complete list of environmental variables here: https://grafana.com/docs/grafana/latest/administration/configuration/#configure-with-environment-variables.

The environmental variables allow you to specify all the parameters included in the configuration file. In fact, you can use the environment variable instead of editing the configuration file.

Any environment variable specified when launching the container will override the corresponding configuration in the configuration file.

Let´s see how you can use environment variables.

Suppose you want to set admin user and password. You can specify the following environment variables:

  • GF_SECURITY_ADMIN_USER=youradminuser
  • GF_SECURITY_ADMIN_PASSWORD=youradminpassword

Let’s see how to include them in a docker command.

$ sudo docker run -d \
-p 3000:3000 \
--name=grafana \
-e "GF_SECURITY_ADMIN_USER=youradminuser" \
-e "GF_SECURITY_ADMIN_PASSWORD=youradminpassword" \
grafana/grafana

You have seen how to use environment variables with the Docker CLI. Now you will learn how to use Docker Compose.

Using Docker Compose

Docker Compose is a very useful tool for managing and running Docker containers. It uses a YAML file to configure all the services of the applications. With Docker Compose, you can launch all the applications and services that you need in a single command.

Important Note

Docker Compose is not installed by default, so you may need to do it. To install it, follow the instructions at https://docs.docker.com/compose/install/.

Besides practicality, using a YAML file allows you to have a clear picture of your deployment. When using the Docker CLI, things can get messy if you need to pass a lot of parameters and environment variables. In these cases, Docker Compose offers a structured and clean solution.

Also, if you need to deploy more than one application or container, you can use Docker Compose to do it in a single command. With the Docker CLI, you would have to run it for every application/container.

Let’s see an example of YAML file. Take into consideration that you have to name the file docker-compose.yml:

version: '2'
services:
    grafana:
        image: grafana/grafana:latest
        container_name: grafana
        ports:
          - 3000:3000
        environment:
          - GF_SECURITY_ADMIN_USER=youradminuser
          - GF_SECURITY_ADMIN_PASSWORD=youradminpassword
        volumes:
          - grafanavol:/var/lib/grafana
volumes:
    grafanavol:

Building and running the container is as easy as executing this:

$sudo docker-compose up

You must run the command from the same directory where the docker-compose.yaml file is.

Further considerations

When installing Grafana with Docker, you will have to consider a variety of factors, such as security, networking, and storage.

All these factors will affect the installation and configuration needs.

In this section, you have all the information you need to start using Grafana with Docker. However, more complex use of Docker is far beyond the scope of this book.

Now, let’s look at the initial configuration of Grafana.

Initial configuration of Grafana

You can configure Grafana whether editing the grafana.ini file or by specifying environment variables.

In this section, you will learn how to do it both ways.

Configuration files

Grafana comes with a default configuration file that you should not edit: defaults.ini.

To override the settings in this file, you must edit grafana.ini. This file is located – in Linux systems – in the /etc/grafana/grafana.ini directory.

You can find the locations for different operating systems at https://grafana.com/docs/grafana/latest/administration/configuration/#config-file-locations.

All configuration options are shown here: https://grafana.com/docs/grafana/latest/administration/configuration/.

We will explore some basic options to start using Grafana. In later chapters, you will learn about some other specific configuration settings.

The app_mode variable accepts two options: development and production. The default option is production and you must keep it unless you are planning to do some development:

app_mode  production

In the date_formats section, you can set date and time formats used in graphs and date-time boxes. In this section, you will find several options.

full_date is used to show a full date format where it is applicable.

Here’s an example:

full_date YYYY-MM-DD HH:mm:s

interval options are used in the graph to show partial dates or times.

The default options are as follows:

interval_second = HH:mm:ss
interval_minute = HH:mm
interval_hour = MM/DD HH:mm
interval_day = MM/DD
interval_month = YYYY-MM
interval_year = YYYY

use_browser_locale allows us to use date formats derived from the browser location. It is set to false by default.

With default_timezone, you can set your own time zone, or set it to use the browser location. The default option is the browser.

In the security section, you can set the administration user and security-related options. Some of these options, such as admin username and password, can be edited from the web interface.

In the paths section, you can see the paths that Grafana is using in your system.

In a Linux system, these paths are as follows:

data       /var/lib/grafana
logs       /var/log/grafana
plugins          /var/lib/grafana/plugins
provisioning    /etc/grafana/provisioning

Important Note

If you are using Docker to deploy Grafana, these paths cannot be modified in the configuration file. Instead, you will have to use environment variables.

You have now learned to use the configuration file to modify the behavior of Grafana. You also have seen the paths to important Grafana files.

In the next section, you will learn how to configure Grafana using environment variables.

Environment variables

In the previous section, you learned how to use environment variables with Docker. Now, you will see how to do this in the Linux host.

You can override any option in the configuration file using environment variables.

The syntax is as follows:

GF_<SectionName>_<KeyName>

So, if you want to change the admin user, you must type the following in the console:

export GF_SECURITY_ADMIN_USER=newadminuser

The same applies to every other option.

Note

You will have to restart Grafana for any configuration change to take effect.

Until here, you have learned how to install Grafana on-premises using different deployment options.

In the next section, you will learn how to use the Grafana Cloud service to avoid the installation and management process.

Maybe you prefer the cloud option

If you want to avoid all the work related to the installation and configuration of Grafana, maybe you can try using the Grafana Cloud service.

It takes a matter of minutes to create an account on Grafana Cloud and start using the platform. In the next screenshot, you can see the registration page:

Figure 1.2 – Registration page in Grafana Cloud

Figure 1.2 – Registration page in Grafana Cloud

After you enter your email and password, you will receive an email to confirm the registration.

You will then access a 14-day trial of Grafana Pro. After those 14 days, you can subscribe or continue using the free version.

You can see the plans at https://grafana.com/products/cloud/pricing/.

Following the registration process, you will be able to access the Grafana Cloud services.

The first step when configuring your stack of Grafana is to select a name. In the free or trial versions, you have to use a domain ending with grafana.net, as shown in Figure 1.3. In the paid options, you can choose your domain.

Figure 1.3 – Naming your Grafana stack

Figure 1.3 – Naming your Grafana stack

After you name your stack, you will access the integration page.

Figure 1.4 – First screen accessing Grafana

Figure 1.4 – First screen accessing Grafana

Now you have a running instance of Grafana Cloud and can start using it.

Summary

In this chapter, you have learned how to install, configure, and run Grafana in three different scenarios. We first installed it on a Raspberry Pi, then on Ubuntu Server, and finally using Docker. Then you learned how to configure Grafana using the grafana.ini file and environment variables. Finally, you met the Grafana Cloud service, registered a new user, and set a stack name. Now you will be able to implement and run your own Grafana instance.

In the next chapter, you will explore the entire Grafana platform, learning about dashboards, plugins, data sources, users, and other things.

Invitation to join us on Discord

Read this book alongside other Grafana users and the author Rodrigo Juan Hernández.

Ask questions, provide solutions to other readers, chat with the author via Ask Me Anything sessions and much more.

SCAN the QR code or visit the link to join the community.

https://packt.link/iotgrafana

Left arrow icon Right arrow icon

Key benefits

  • Connect devices, store and manage data, and build powerful data visualizations
  • Integrate Grafana with other systems, such as Prometheus, OpenSearch, and LibreNMS
  • Learn about message brokers and data forwarders to send data from sensors and systems to different platforms

Description

Grafana is a powerful open source software that helps you to visualize and analyze data gathered from various sources. It allows you to share valuable information through unclouded dashboards, run analytics, and send notifications. Building IoT Visualizations Using Grafana offers how-to procedures, useful resources, and advice that will help you to implement IoT solutions with confidence. You’ll begin by installing and configuring Grafana according to your needs. Next, you’ll acquire the skills needed to implement your own IoT system using communication brokers, databases, and metric management systems, as well as integrate everything with Grafana. You’ll learn to collect data from IoT devices and store it in databases, as well as discover how to connect databases to Grafana, make queries, and build insightful dashboards. Finally, the book will help you implement analytics for visualizing data, performing automation, and delivering notifications. By the end of this Grafana book, you’ll be able to build insightful dashboards, perform analytics, and deliver notifications that apply to IoT and IT systems.

Who is this book for?

This book is for IoT developers who want to build powerful visualizations and analytics for their projects and products. Technicians from the embedded world looking to learn how to build systems and platforms using open source software will also benefit from this book. If you have an interest in technology, IoT, open source, and related subjects then this book is for you. Basic knowledge of administration tasks on Linux-based systems, IP networks and network services, protocols, ports, and related topics will help you make the most out of this book.

What you will learn

  • Install and configure Grafana in different types of environments
  • Enable communication between your IoT devices using different protocols
  • Build data sources by ingesting data from IoT devices
  • Gather data from Grafana using different types of data sources
  • Build actionable insights using plugins and analytics
  • Deliver notifications across several communication channels
  • Integrate Grafana with other platforms

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 27, 2022
Length: 360 pages
Edition : 1st
Language : English
ISBN-13 : 9781803231938
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 27, 2022
Length: 360 pages
Edition : 1st
Language : English
ISBN-13 : 9781803231938
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 178.97
Building IoT Visualizations using Grafana
$51.99
Solutions Architect's Handbook
$89.99
Raspberry Pi and MQTT Essentials
$36.99
Total $ 178.97 Stars icon
Banner background image

Table of Contents

20 Chapters
Part 1: Meeting Grafana Chevron down icon Chevron up icon
Chapter 1: Getting Started with Grafana Chevron down icon Chevron up icon
Chapter 2: Exploring Grafana Chevron down icon Chevron up icon
Part 2: Collecting Data from IoT Devices Chevron down icon Chevron up icon
Chapter 3: Connecting IoT Devices Chevron down icon Chevron up icon
Chapter 4: Data Sources for Grafana Chevron down icon Chevron up icon
Chapter 5: Using Time Series Databases Chevron down icon Chevron up icon
Part 3: Connecting Data Sources and Building Dashboards Chevron down icon Chevron up icon
Chapter 6: Getting Data and Building Dashboards Chevron down icon Chevron up icon
Chapter 7: Managing Plugins Chevron down icon Chevron up icon
Chapter 8: Organizing and Managing Dashboards Chevron down icon Chevron up icon
Part 4: Performing Analytics and Notifications Chevron down icon Chevron up icon
Chapter 9: Performing Analytics in Grafana Chevron down icon Chevron up icon
Chapter 10: Alerting and Notifications in Grafana Chevron down icon Chevron up icon
Part 5: Integrating Grafana with Other Platforms Chevron down icon Chevron up icon
Chapter 11: Using Grafana with Prometheus Chevron down icon Chevron up icon
Chapter 12: Using Grafana with OpenSearch Chevron down icon Chevron up icon
Chapter 13: Showing Data from LibreNMS in Grafana Chevron down icon Chevron up icon
Chapter 14: Integrations for Grafana Cloud Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(7 Ratings)
5 star 71.4%
4 star 14.3%
3 star 14.3%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Druilhe Jean-Louis Feb 08, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Je découvre encore cet aspect du monitoring
Feefo Verified review Feefo
Andreas K. Aug 14, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ein hervorragender Leitfaden für die Nutzung von Grafana. Von den ersten Schritten der Installation über die Verbindung mit Datenbanken (Plugins!) bis zum Erstellen von Dashboards mit den verschiedenen Möglichkeiten für Visualisierungen des OpenSource Tools Grafana. Auch fortgeschrittenere Techniken wie Filtern und Aggregieren von Daten werden beschrieben. Für die professionelle Nutzung von Alarmierungen liefert das Buch ebenfalls leicht verständliche Anleitungen, die einen schnellen Einsatz in der eigenen Installation ermöglichen. Benutzte Technologien werden stets auch kurz erklärt, sodass auch der nicht so erfahrene Benutzer die Abläufe in Grafana versteht. Ein sehr praxisnahes Buch, das endlich einen leichten Einstieg in die Verwendung von Grafana ermöglicht. Jeder, der IoT professionell einsetzt, sollte dieses Buch haben.
Amazon Verified review Amazon
Scott Andrews Jul 31, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Just a great book that has added and enhanced knowledge to my 6 months working experience with Grafana.I come from an infrastructure, virtualisation, SAN background so whilst technical I do not come from a database or data presentation background. I have had a change of job role where I am working with LoRaWAN sensors / nodes and I have had to learn Grafana for my employment. It has been a steep learning curve and I wish I had “Building IoT Visualizations using Grafana” to assist me on that journey!Reading this book makes me realise that Rodrigo Juan Hernandez has done a fantastic job of stepping through the setup of Grafana in various scenarios, connecting data and authentication sources and presenting the information. This was stuff I had to learn by trial and error and with lots of web searching. All that self-learning is in this book and presented in a structured, methodical manner.In my employment I am accessing data from a Microsoft SQL database as my organisation already has appropriate enterprise licenses in that area. I am unfamiliar with InfluxDB and nonetheless, I have followed the instructions on InfluxDB from the book and it worked marvellously.I have used Timeline presentation of data extensively in the 6 months I have been using Grafana in anger and it is great referencing this book to get new ideas. This is because when you find a way, a method – you can use it a lot, and you can end up in a bit of a productivity rut. Sometimes, getting a new idea from an expert like Rodrigo is all you need to think “Yes I can do this a different way. A smarter way!”I have appreciated the advice on plugins within Grafana too. I have installed and added additional plugins but there are so many plugins to choose from. I have appreciated the proven recommendations within the book and they have helped improve my Grafana dashboards.I have found Chapter 10 useful as I have always found the Alerting and Notification within Grafana somewhat abstract. I have it working with e-mail and Teams notifications but I don’t think I ever understood the mechanics behind the design. Following the step-by-step instructions in the book brought my previously jumbled knowledge in this area together. As I say, I do not come from a SQL / database background so I appreciated the SQL examples to embellish knowledge.Reading on through the book, I liked the information and knowledge on other products such as OpenSearch and RabbitMQ. There is plenty of advice on Prometheus, a sister open-source product that can sit alongside Grafana. Whilst Prometheus is not a product I have worked with yet, reading the book has given me confidence that I can do it and that Prometheus is an appropriate tool to the kit that us IoT engineers need. I look forward to going through the worked examples within the book.All in all a heartily recommended book. I already have users in my work reviewing data gathered by LoRaWAN IoT sensors presented to them via Grafana. They are impressed with Grafana, my line management is impressed with Grafana and I am impressed with Grafana. Nonetheless, it has all been self-taught over the past 6 months and I know that the knowledge and guidance from ‘Building IoT Visualizations using Grafana’ will help me. This book will help me enhance the data offerings to my users, improve my own technical knowledge and ultimately help us all interpret more data from more sources in an informative way using open source software. What’s not to love?
Amazon Verified review Amazon
Shawn Deggans Jul 30, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I’m not sure if there’s a title that could be short enough to do this little book justice. It is far more than just a book on creating IoT visualizations with Grafana. It’s an excellent guide and reference manual for anyone interested in working with today’s most popular, open-source IoT tools. Hernandez covers the complete data gathering, analytics, reporting, and monitoring IoT lifecycle in this book with clear guides on how to achieve the type of IoT platforms in use today.What should you not expect to see in this book? There are no large IoT examples of use cases. Hernandez does not attempt to create elaborate scenarios or architectures. What he does is simply present tools common in the IoT and distributed system monitoring world, discuss at a high-level how these tools work, how they fit into the IoT or data gathering domain, and how to best use Grafana with these tools.In my opinion, this book is better because of its focus on the real world integration and less focused on the architecture and scenarios of IoT architectures. If you are looking for that type of book, I would recommend IoT and Edge Computing for Architects, Second Edition by Perry Lea. It’s pretty much everything you need to know to get a complete grounding in modern IoT Architecture.Part 1: Meeting GrafanaNo time is wasted on theory or long introductions, the book just dives into setting Grafana and exploring its capabilities. You will also learn the different versions of Grafana and how you can host it. Yes, there is a cloud version, but I think most people are still using on-premises installations. Personally, I love using it in Docker composed together with InfluxDB, Telegraf, and I also add Jupyter Labs to give me a workspace. The book covers how to set up Grafana on a Raspberry Pi and the route I typically take, which is the Docker path. Plugins are also covered, which is great because I learned I could connect Google Sheets and a few other sources using these plugins. Authentication is also covered, and Grafana supports a wide array of options here. I’m an Azure Architect, so I was glad to see Azure AD was an option.Part 2: Collecting DataThis is where you will get the most instruction on IoT. Here, all the various messaging protocols are covered, along with a bit of information on devices. You’ll also learn about all the various data sources supported, and there’s very important information related to working with Time Series Data and Time Series Databases. My favorite right now is InfluxDB, but there are many options. Again, Hernandez sticks closely with those products in the open-source, but if you work with specific environments like Google Cloud or AWS, you will likely know of similar platforms in those areas. So I think it was a smart decision to focus primarily on the open-source services and tools.Part 3: Connecting Data Sources and Building DashboardsThis is the part of the book where it feels like we’re getting to the promise of the title. Here we finally get to connect to some of our data sources and work with the data. Grafana is a reporting tool with a focus on graphics. It is designed for taking your data and telling a visual story with that data in a way that is meaningful for the intended audience. In this section, we learn how to connect to the various data sources we want to report on, as well as the plugins that will help us expand Grafana from its out-of-the-box functionality. Playlists are an interesting thing I discovered while reading this book, and now I have the desire to find a good reason to create a kiosk-style dashboard. I’ve seen them before in many operations centers, and I can see now how easy it would be to set one up.Part 4: Analytics and NotificationsHere you’ll learn about querying time series data, as well as the tools available for certain platforms. InfluxDB’s InfluxQL is covered, as well as Flux. If you’re familiar with SQL and some functions from SQL, it won’t be too difficult to understand how to create time series queries. This is just a short introduction to a pretty big subject, but there’s enough here to get you started. Alerting is interesting. It’s one of the things I wouldn’t necessarily expect to find in a product like Grafana, but the tools it offers to manage alerts are definitely worth looking at.Part 5: Integrating with other PlatformsThis is probably one of my favorite sections, because it covered a few tools I was familiar with, but hadn’t spent a lot of time with. I now want to check out Home Assistant to see if it’s something I want to run in my home network.OverallHernandez’s book isn’t a large one by most technical book standards, but it doesn’t need to be, because the book has done a great job of introducing lots of tools and options in relation to Grafana. And Grafana looks to be one of those long-lasting products that continues to become an important part of any solution developer’s toolkit. Now that I’ve read the book, I plan to dive into my own little stack using InfluxDB and Telegraf to see what sort of visuals I can create with IoT data.
Amazon Verified review Amazon
J. M. Teal Aug 09, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The author takes the reader through a detailed process of preparing an environment including installation and configuration to prepare the reading for setting up a Grafana environment including components like OpenTSDB. The author then pivots to the process of collecting data for and designing of dashboards within Grafana. As part of this process, the author explains key features of the graphing capabilities with good examples of key chart types. Using a logical progression, the author moves on to assembling individual components into dashboards and assembling routines.This book would be a great resource for someone new to Grafana as well as someone specifically interested in how Grafana can be a part of an IoT use case.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.