Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Grafana 7.0

You're reading from   Learn Grafana 7.0 A beginner's guide to getting well versed in analytics, interactive dashboards, and monitoring

Arrow left icon
Product type Paperback
Published in Jun 2020
Publisher Packt
ISBN-13 9781838826581
Length 410 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Eric Salituro Eric Salituro
Author Profile Icon Eric Salituro
Eric Salituro
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Getting Started with Grafana
2. Introduction to Data Visualization with Grafana FREE CHAPTER 3. A Tour of the Grafana Interface 4. An Introduction to the Graph Panel 5. Real-World Grafana
6. Connecting Grafana to a Data Source 7. Visualizing Data in the Graph Panel 8. Visualization Panels in Grafana 9. Creating Your First Dashboard 10. Working with Advanced Dashboard Features 11. Grafana Alerting 12. Exploring Logs with Grafana Loki 13. Managing Grafana
14. Organizing Dashboards 15. Managing Permissions for Users and Teams 16. Authentication with External Services 17. Cloud Monitoring 18. Other Books You May Enjoy

Querying the Prometheus data source

Now that we have both Prometheus and Grafana logging metrics, let's try out some queries. I won't be able to give you a full rundown on every aspect of PromQL—the Prometheus query language—but I can help you to learn enough to be able to examine many of the server metrics that can be accessed from the Prometheus data source.

To get a better understanding of how queries work in time-series databases such as Prometheus, let's first start with a more traditional database, such as MySQL. Typically, the structure of a query looks something like this:

SELECT some fields
FROM some table
WHERE fields match some criteria

You get back from the query some rows, each one containing the contents of some fields. In the case of time-series databases, things work a little differently. The query has a form that is more like the following:

SELECT metric
FROM some data store
WHERE metric tags match some...
lock icon The rest of the chapter is locked
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 $19.99/month. Cancel anytime