Learn Grafana 7.0

Book description

A comprehensive introduction to help you get up and running with creating interactive dashboards to visualize and monitor time-series data in no time

Key Features

  • Install, set up, and configure Grafana for real-time data analysis and visualization
  • Visualize and monitor data using data sources such as InfluxDB, Prometheus, and Elasticsearch
  • Explore Grafana's multi-cloud support with Microsoft Azure, Amazon CloudWatch, and Google Stackdriver

Book Description

Grafana is an open-source analytical platform used to analyze and monitoring time-series data. This beginner's guide will help you get to grips with Grafana's new features for querying, visualizing, and exploring metrics and logs no matter where they are stored.

The book begins by showing you how to install and set up the Grafana server. You'll explore the working mechanism of various components of the Grafana interface along with its security features, and learn how to visualize and monitor data using, InfluxDB, Prometheus, Logstash, and Elasticsearch. This Grafana book covers the advanced features of the Graph panel and shows you how Stat, Table, Bar Gauge, and Text are used. You'll build dynamic dashboards to perform end-to-end analytics and label and organize dashboards into folders to make them easier to find. As you progress, the book delves into the administrative aspects of Grafana by creating alerts, setting permissions for teams, and implementing user authentication. Along with exploring Grafana's multi-cloud monitoring support, you'll also learn about Grafana Loki, which is a backend logger for users running Prometheus and Kubernetes.

By the end of this book, you'll have gained all the knowledge you need to start building interactive dashboards.

What you will learn

  • Find out how to visualize data using Grafana
  • Understand how to work with the major components of the Graph panel
  • Explore mixed data sources, query inspector, and time interval settings
  • Discover advanced dashboard features such as annotations, templating with variables, dashboard linking, and dashboard sharing techniques
  • Connect user authentication to Google, GitHub, and a variety of external services
  • Find out how Grafana can provide monitoring support for cloud service infrastructures

Who this book is for

This book is for business intelligence developers, business analysts, data analysts, and anyone interested in performing time-series data analysis and monitoring using Grafana. Those looking to create and share interactive dashboards or looking to get up to speed with the latest features of Grafana will also find this book useful. Although no prior knowledge of Grafana is required, basic knowledge of data visualization and some experience in Python programming will help you understand the concepts covered in the book.

Table of contents

  1. Title Page
  2. About Packt
    1. Why subscribe?
  3. Copyright and Credits
    1. Learn Grafana 7.0
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Reviews
  6. Getting Started with Grafana
  7. Introduction to Data Visualization with Grafana
    1. Technical requirements
    2. Data and visualization
    3. Storing, retrieving, and visualizing data
    4. Why Grafana?
    5. Installing Grafana
    6. Grafana in a Docker container
    7. Grafana for OS X
    8. Homebrew
    9. The command line
    10. Grafana for Linux
    11. RedHat Linux
    12. Debian Linux
    13. Grafana for Windows
    14. Hosted Grafana on the cloud
    15. Connecting to the Grafana server
    16. Summary
  8. A Tour of the Grafana Interface
    1. Technical requirements
    2. Exploring Grafana – the Home dashboard
    3. Glancing at the sidebar menu
    4. The dashboards button 
    5. The dashboard panels
    6. The dashboard settings and view mode
    7. Learning to use the icons on Grafana's left sidebar
    8. The Grafana logo
    9. Search
    10. Create
    11. Dashboard
    12. Folder
    13. Import
    14. Dashboards
    15. Manage
    16. Playlists
    17. Snapshots
    18. Explore
    19. Alerting
    20. Alert Rules
    21. Notification channels
    22. Configuration
    23. Data Sources
    24. Users
    25. Teams
    26. Plugins
    27. Preferences
    28. API Keys
    29. Server Admin
    30. Users
    31. Orgs
    32. Settings
    33. Stats
    34. Summary
  9. An Introduction to the Graph Panel
    1. Technical requirements
    2. Touring the graph panel
    3. Creating a simple data source
    4. Creating a graph panel
    5. Generating data series in the Query tab
    6. What is a query?
    7. Query tab features
    8. The Data source menu
    9. Query Options
    10. Query inspector
    11. Query
    12. Query controls
    13. Add Query
    14. Duplicating an existing query
    15. Editing the graph in the Panel tab
    16. The Settings section
    17. Setting the panel title and description
    18. The Visualisation section
    19. The Display section
    20. The Hover tooltip
    21. Stacking and Null value
    22. The Series overrides section
    23. The Axes section
    24. Left Y/Right Y
    25. X-axis
    26. The Legend section
    27. Options
    28. Values
    29. Hide series
    30. The Thresholds section
    31. Setting a threshold
    32. The Time Region section
    33. Setting a time region
    34. The Data links section
    35. The Links section
    36. The Repeat options section
    37. Monitoring with the Alert tab
    38. Rule
    39. Conditions
    40. No Data and Error Handling
    41. Notifications
    42. Summary
  10. Real-World Grafana
  11. Connecting Grafana to a Data Source
    1. Technical requirements
    2. Installing the Prometheus server
    3. Installing Prometheus from Docker
    4. Configuring the Prometheus data source
    5. Exploring Prometheus
    6. Using Explore for investigation
    7. Configuring Grafana metrics
    8. Querying the Prometheus data source
    9. Typing in a metrics query
    10. Querying for process metrics
    11. Detecting trends with aggregations
    12. Applying aggregations to our query data
    13. Understanding the data source limitations
    14. Querying limits for series aggregations
    15. Querying limits for time aggregations
    16. Summary
  12. Visualizing Data in the Graph Panel
    1. Technical requirements
    2. Making advanced queries
    3. Launching server Docker containers
    4. Writing the ETL script
    5. Running the script
    6. Configuring the InfluxDB data source
    7. Understanding the time series data display
    8. Displaying time-aggregated data
    9. Debugging queries with the Query Inspector
    10. Observing time interval effects
    11. Setting the minimum interval
    12. Setting vertical axes
    13. Setting axis units
    14. Converting into Fahrenheit
    15. Autoscaling the Y axis
    16. Dual Y-axis display
    17. Graphing relative humidity
    18. Graphing wind chill
    19. Working with legends
    20. Setting legend contents
    21. Enabling legend aggregations
    22. Summary
  13. Visualization Panels in Grafana
    1. Technical requirements
    2. Introducing the Stat panel
    3. Loading the dataset
    4. Creating a Stat panel
    5. Setting the Panel tab's display
    6. Setting the value aggregation
    7. Setting Graph mode
    8. Setting the Field tab's standard options
    9. Setting units
    10. Setting Min and Max
    11. Setting the display name 
    12. Setting the Field tab thresholds
    13. Setting the Field panel's value mappings
    14. Building our Stat panels
    15. Working with the Gauge panel
    16. Setting the Panel tab's display
    17. Setting the Field tab's standard options
    18. Setting the Field tab thresholds
    19. Adding a Bar Gauge panel
    20. Setting the Gradient mode
    21. Setting the Retro LCD mode
    22. Setting the Basic mode
    23. Building a bar gauge
    24. Geolocating data on the Worldmap panel
    25. Ingesting a new earthquake dataset
    26. Updating process_cli()
    27. Updating main()
    28. Adding dump_eq_data()
    29. Adding load_eq_data()
    30. Configuring the InfluxDB data source
    31. Setting up the Worldmap panel
    32. Structuring data fields in the Table panel 
    33. Comparing aggregations
    34. Overriding field settings
    35. Summary
  14. Creating Your First Dashboard
    1. Technical requirements
    2. Designing a dashboard
    3. Conveying information
    4. Determining the visual context
    5. Prioritizing elements of importance
    6. Creating a high information density dashboard
    7. Designing the dashboard
    8. Building a station text panel
    9. Modifying the weather.py script
    10. Building the current conditions panel
    11. Building the temperature panel
    12. Building the moisture panel
    13. Building the barometer panels
    14. Creating a barometric pressure graph panel
    15. Creating a barometric pressure trend graph panel
    16. Building the wind panels
    17. Creating a wind speed graph panel
    18. Creating a wind direction stat panel
    19. Building the visibility panel
    20. Creating a high information visibility dashboard
    21. Designing the dashboard
    22. Building the station panel
    23. Building the temperature panels
    24. Buiding a current temperature stat panel
    25. Creating a high-temperature stat panel
    26. Creating a low-temperature stat panel
    27. Creating a dew point stat panel
    28. Building the barometer panels
    29. Creating a barometer reading stat panel
    30. Creating a barometric pressure trend stat panel
    31. Building the visibility panel
    32. Building the wind panels
    33. Creating a wind speed stat panel
    34. Creating a wind gust stat panel
    35. Creating a wind direction stat panel
    36. Building a current conditions panel
    37. Summary
  15. Working with Advanced Dashboard Features
    1. Technical requirements
    2. Building the data server
    3. Templating dashboards
    4. Querying with Elasticsearch
    5. Creating a template variable
    6. Adding template variables to the graph panel
    7. Templating additional variables
    8. Creating Ad hoc filters
    9. Repeating rows and panels with template variables
    10. Creating a new dashboard
    11. Setting up the template variables
    12. Configuring the panels
    13. Linking dashboards
    14. Adding dashboard tags
    15. Locking down a template variable
    16. Creating dashboard links
    17. Annotating dashboards
    18. Annotating the graph panel
    19. Querying tagged annotations
    20. Creating Elasticsearch annotation queries
    21. Sharing dashboards
    22. Sharing dashboard links
    23. Sharing dashboards by exporting
    24. Sharing dashboard snapshots
    25. Summary
  16. Grafana Alerting
    1. Technical requirements
    2. Setting thresholds
    3. Capturing real-time data
    4. Processing the Logstash input
    5. Filtering the Logstash events
    6. Outputting the data
    7. Creating an ElasticSearch data source
    8. Building the dashboard panels
    9. Setting thresholds
    10. Constraining thresholds to time regions
    11. Configuring alerts
    12. Alert rules
    13. Conditions
    14. Handling edge cases
    15. Assigning alerts to notification channels
    16. Setting up an email notification channel
    17. Configuring Grafana Docker containers
    18. Troubleshooting and controlling alerts
    19. Checking the alert history
    20. Testing the rule
    21. Controlling alerts
    22. Summary
  17. Exploring Logs with Grafana Loki
    1. Loading system logs into Loki
    2. Visualizing Loki log data with Explore
    3. Adding additional service logs
    4. Querying logs and metrics with Explore
    5. Summary
  18. Managing Grafana
  19. Organizing Dashboards
    1. Technical requirements
    2. Managing dashboards and folders
    3. Naming a dashboard
    4. Dashboard naming tips
    5. Working with dashboard folders
    6. Creating a dashboard folder
    7. Adding dashboards to a folder
    8. Deleting folders
    9. Guiding dashboard folder management
    10. Starring and tagging dashboards
    11. Marking dashboards as favorites
    12. Tagging dashboards
    13. Adding tags
    14. Deleting tags
    15. Building and running dashboard playlists
    16. Creating a playlist
    17. Displaying a playlist
    18. Displaying playlists in normal mode
    19. Displaying playlists in TV mode
    20. Displaying playlists in Kiosk mode
    21. Displaying playlists with auto fit panels
    22. Editing a playlist
    23. Exploring the dashboard list panel
    24. Setting dashboard list panel options
    25. Summary
  20. Managing Permissions for Users and Teams
    1. Technical requirements
    2. Understanding key permissions concepts
    3. Organizations
    4. Users
    5. Roles
    6. Teams
    7. Adding users
    8. Adding users – by invitation only
    9. Adding users – serve yourself
    10. Setting permissions
    11. Setting organization roles
    12. Setting folder permissions
    13. Setting dashboard permissions
    14. Establishing teams
    15. Setting up a team
    16. Team members
    17. Team settings
    18. Permission rules
    19. Administering users and organizations
    20. Managing users
    21. Disabling or deleting a user
    22. Elevating a user to Super Admin
    23. Setting user organizations
    24. Organization admin and Super Admin roles
    25. Managing organizations
    26. Creating a new organization
    27. Renaming and setting the organization preferences
    28. Switching between organizations
    29. Summary
  21. Authentication with External Services
    1. Technical requirements
    2. Authenticating with OpenLDAP
    3. Setting up an OpenLDAP server
    4. Configuring Grafana to use LDAP
    5. Testing the Grafana configuration
    6. Adding a user to OpenLDAP
    7. Looking up a user in Grafana
    8. Authenticating with GitHub
    9. Authenticating with Google
    10. Authenticating with Okta
    11. Summary
  22. Cloud Monitoring
    1. Configuring an AWS CloudWatch data source
    2. Creating the policy
    3. Creating the user
    4. Configure the new data source
    5. Configuring a Microsoft Azure Monitor data source
    6. Registering the Grafana application
    7. Setting the application role
    8. Generating application Secrets
    9. Configuring the Azure Monitor data source
    10. Configuring Azure Log Analytics
    11. Generating the API key for Application Insights Details
    12. Configuring a Google Stackdriver data source
    13. Enabling Google Cloud APIs
    14. Creating a Google Service Account
    15. Configuring a Google Stackdriver data source
    16. Summary
  23. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Learn Grafana 7.0
  • Author(s): Eric Salituro
  • Release date: June 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781838826581