Welcome to Learn Grafana 7.0! Together, we will explore Grafana, an exciting, multi-faceted visualization tool for data exploration, analysis, and alerting. We will learn how to install Grafana, become familiar with some of its many features, and even use it to investigate publicly available real-world datasets.
Whether you are an engineer watching terabytes of metrics for a critical system fault, an administrator sifting through a haystack of log output looking for the needle of an application error, or just a curious citizen eager to know how your city works, Grafana can help you monitor, explore, and analyze data. The key to getting a handle on big data is the ability to visualize it.
But before we find out how Grafana gives you that ability, let's briefly review a few basic concepts behind data visualization.
The following topics will be covered in...
Technical requirements
Grafana is relatively easy to set up, but since it is a web server application, you will need to run a few commands to get it running. For the purposes of this book, we will assume that you will access Grafana from the same computer that you installed it on. The following are the technical requirements for installing and running Grafana:
- Familiarity with the command shell
- A terminal application oran SSH to the machine where you plan to install Grafana
- Docker (in order to run Grafana from a Docker container)
- Optionally, you will have the Administrator access to install and run Grafana from the command line, rather than in a Docker container
Tutorial code, dashboards, and other helpful files for this chapter can be found in the book's GitHub repository at https://github.com/PacktPublishing/Learn-Grafana-7.0/tree/master/Chapter01.
Data and visualization
In the not-too-distant past, most of us consumed data pretty much solely via a daily newspaper—on the financial pages, the sports section, and the weather forecast. However, in recent years, the ubiquity of computing power has immersed every part of our lives in a sea of data.
Around the clock, our built environment and devices collect innumerable data, which we consume. Our morning routine starts with a review of emails, social media posts, and news feeds on a smartphone or tablet, and whereas we once put down the daily newspaper when we left for work, our phones come with us everywhere.
We walk around or exercise and our phones capture our activity and location data via the GPS, while our smartwatches capture our vitals. When we browse the web, every single interaction down to a mouse click is logged and stored for analysis. The servers that deliver these experiences are monitored and maintained by engineers on a round-the-clock...
Why Grafana?
While there are many solutions in the data visualization space, Grafana is proving to be one of the most exciting, exhibiting rapid growth in scope and features, broad options for deployment and support, and an enthusiastic community contributing to its future growth. Before going into the specific features that make Grafana an attractive solution, let's take a look at the criteria we might use to characterize a useful data visualization application:
For the purposes of this book, we will be looking at particular software applications that fulfill four major functions:exploration,analysis,presentation, andnotification.
Quickly loading and displaying a dataset with the idea of identifying the particularly interesting features for deeper analysis, sometimes referred to as drilling-down, is an example of dataexploration.
After we have examined our data, we may want toanalyzeit next. That is, we may want to quantify...
Installing Grafana
At its core, Grafana runs as a web server, and as such, it is not a typical double-click application. You will need to be comfortable with the command line and have administrator privileges on the computer you plan to install Grafana on. To download the latest versions of Grafana, check out https://grafana.com/grafana/download.
The Grafana application server runs on *nix operating systems (Linux, OS X,and Windows), and it can be installed locally on a laptop or workstation or on a remote server. It is even available as a hosted application if you'd rather not deal with setting up or managing a server application on your own.
In this section, we'll walk through the most typical installation options:
- Docker
- OS X
- Linux
- Windows
- Hosted Grafana on the cloud
Once you've completed the installation of your choice, proceed to the Connecting to the Grafana serversectionfor...
Connecting to the Grafana server
Once you have installed and launched Grafana, open a browser page to access the Grafana application. It can be found athttp://localhost:3000. If everything goes well, you should see a login page, as follows:
Log in with theadminusernameand theadminpassword. You will then be prompted to change it to something more secure. Once you have logged in, you should see the base Grafana interface:
Great job! You've successfully installed and connected your Grafana application.
Summary
Congratulations! You now have a running Grafana server and are ready to take the next steps toward exploring the many powerful features of Grafana. In the upcoming chapters, we'll navigate the interface, analyze data sources, and learn about advanced management practices.