Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building IoT Visualizations using Grafana

You're reading from  Building IoT Visualizations using Grafana

Product type Book
Published in Jul 2022
Publisher Packt
ISBN-13 9781803236124
Pages 360 pages
Edition 1st Edition
Languages
Author (1):
Rodrigo Juan Hernández Rodrigo Juan Hernández
Profile icon Rodrigo Juan Hernández

Table of Contents (21) Chapters

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

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.

You have been reading a chapter from
Building IoT Visualizations using Grafana
Published in: Jul 2022 Publisher: Packt ISBN-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.
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 €14.99/month. Cancel anytime}