37,19 €
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.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 287
Veröffentlichungsjahr: 2022
Power up your IoT projects and monitor with Prometheus, LibreNMS, and Elasticsearch
Rodrigo Juan Hernández
BIRMINGHAM—MUMBAI
Copyright © 2022 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Rahul Nair
Publishing Product Manager: Meeta Rajani
Senior Editor: Runcil Rebello
Content Development Editor: Yasir Ali Khan
Technical Editor: Shruthi Shetty
Copy Editor: Safis Editing
Project Coordinator: Ajesh Devavaram
Proofreader: Safis Editing
Indexer: Hemangini Bari
Production Designer: Shankar Kalbhor
Senior Marketing Coordinator: Sanjana Gupta
Marketing Coordinator: Nimisha Dua
First published: July 2022
Production reference: 1110722
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80323-612-4
www.packt.com
To my loved daughter, Ana Paula.
~ Rodrigo Juan Hernández
For several years, he has been focusing on the IoT ecosystem. He is currently working as an IoT system consultant to clients around the world. He also produces content online about IoT and related subjects. This 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 to help others to understand and implement IoT solutions.
I want to thank Vivi for her support in this project.
Atif Ali is a mechatronics engineer specializing in automation, robotics, and IIoT, with a focus on electro-mechanical design and software integration for complex physical systems and processes. He is a passionate open-source advocate, focused on the intersection of hardware and software for perceptive physical world observability.
Atif has been heavily involved in both the industry and academia for the past several years, in sectors ranging from clean energy and web3, to cybersecurity and mining, holding positions at ETH-Zürich, UBC-Vancouver, and Grafana, among others. He also serves as a technical advisor for start-ups in the emerging market, and is on the faculty board for the Global Master’s in IoT at the Zigurat Global Institute of Technology.
In this book, you will learn how to implement an IoT system using open source tools.
The main focus of this book is the use of Grafana as an IoT platform. However, we will also cover many technologies involved in the transmission, storage, management, and visualization of data.
These technologies include IoT communication protocols, time-series databases, and Docker containers.
Also, you will learn how to integrate other systems with Grafana, including Prometheus, OpenSearch, LibreNMS, and Fluent Bit.
After finishing this book, you will have a clear idea about IoT systems, communications, and platforms, and you will be able to test and implement your IoT systems using Grafana according to specific requirements.
People with a background in IT, technology, and systems who want to learn how to get data from sensors and devices and show it using Grafana, IoT developers who want to build visualizations and analytics for their projects and products, technicians from the embedded world who need to learn how to build systems and platforms using open source software, and technology enthusiasts who want to learn about IoT systems will benefit from this book.
Chapter 1, Getting Started with Grafana, explains what Grafana is and what it is useful for. You will also learn to install it and make basic configurations.
Chapter 2, Exploring Grafana, covers all the sections and capabilities of Grafana. Also, you will learn about user management, including groups, authentication, and permissions.
Chapter 3, Connecting IoT Devices, explains how to connect IoT devices and send data to IoT platforms using different protocols and systems.
Chapter 4, Data Sources for Grafana, explores different types of data sources. These data sources will be used in later chapters to feed data to Grafana.
Chapter 5, Using Time Series Databases, explains how to store data in time-series databases.
Chapter 6, Getting Data and Building Dashboards, discusses how to connect data sources and build visualization dashboards.
Chapter 7, Managing Plugins, covers the installation and management of Grafana plugins.
Chapter 8, Organizing and Managing Dashboards, explains how to manage dashboards, variables, annotations, links, and permissions. You will also learn how to export and share dashboards.
Chapter 9, Performing Analytics in Grafana, covers analytics using data source capabilities and plugins.
Chapter 10, Alerting and Notifications in Grafana, explains how to configure and use alerts and notifications in Grafana.
Chapter 11, Using Grafana with Prometheus, discusses getting data from Prometheus and displaying it in Grafana dashboards.
Chapter 12, Using Grafana with OpenSearch, covers integrating OpenSearch and Grafana.
Chapter 13, Showing Data from LibreNMS in Grafana, explains how to connect LibreNMS and Grafana, use data from LibreNMS, and display it with Grafana.
Chapter 14, Integrations for Grafana Cloud, discusses monitoring Home Assistant, RabbitMQ, and Linux nodes using the Grafana Cloud integrations.
You will need at least basic knowledge of Linux use and administration. You will need access to a Linux server, local or in the cloud. You will get more from this book if you have a Raspberry Pi computer. You will need to have a Docker instance. You will need accounts in cloud services, such as Grafana, InfluxDB, and MQTT brokers.
All the software used in this book is free and open source.
If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
After reading this book, you will be able to implement your own IoT system using Grafana and many of the tools used in this book.
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/r9a1L.
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The app_mode variable accepts two options: development and production."
A block of code is set as follows:
{ "sensorType": "Thermometer",
"sensorModel": "AM2302",
"temp": 25,
"hum": 40}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
[default]exten => s,1,Dial(Zap/1|30)exten => s,2,Voicemail(u100)exten => s,102,Voicemail(b100)exten => i,1,Voicemail(s0)Any command-line input or output is written as follows:
$ mkdir css
$ cd css
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "Select System info from the Administration panel."
Tips or important notes
Appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Once you’ve read Building IoT Visualizations using Grafana, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
In this part, you will learn what Grafana is and what it is used for. You will learn how to install it and make basic configurations.
This part contains the following chapters:
Chapter 1, Getting Started with GrafanaChapter 2, Exploring Grafana