SlideShare a Scribd company logo
2
Most read
9
Most read
Presented By: Etash Singh
Linking Metrics to
Logs using Loki
01 What is Log Aggregation?
02 Overview of Loki
03
04
Installation Options
05
Comparisons with Existing Solutions
Our Agenda
06
Available Clients for Loki
07
What is Promtail?
Demo
What is Log Aggregation?
Log aggregation is the practice of gathering up disparate log files for
the purposes of organizing the data in them and making them
searchable.
c
Overview of
Loki?
Grafana Loki is a set of
components that can be
composed into a fully featured
logging stack.
1. Unlike other logging systems,
Loki is built around the idea of only
indexing metadata about your
logs: labels (just like Prometheus
labels).
2. Log data itself is then
compressed and stored in chunks
in object stores such as S3 or GCS,
or even locally on the filesystem.
Loki Overview: Motivation
○ Incident Response and Context Switching
○ Resolving Problems in Existing Solutions
○ Cost Efficiency
○ Kubernetes and Docker
Loki Overview: Features
● Multi-Tenancy:
○ Data between tenants is completely separated
○ Achieved through a tenant ID (which is represented as an alphanumeric string)
○ When disabled, all requests are internally given a tenant ID of "fake"
● Modes of Operation:
○ Loki is optimized for both running locally (or at small scale) and for scaling horizontally
○ Loki comes with a single process mode that runs all of the required microservices in one process
○ The microservices of Loki can be broken out into separate processes, allowing them to scale independently of each other
Loki Overview: Architecture
Components in Loki
● Distributor
○ Handle incoming streams by clients
● Ingester
○ Write log data to long-term storage backends (DynamoDB, S3, Cassandra, etc.)
○ Return log data for in-memory queries on the read path
● Query Frontend
○ Optional service providing the querier's API endpoints
○ Used to accelerate the read path
● Querier
○ Handles queries using the LogQL query language
○ Fetch logs both from the ingesters and long-term storage
Loki Overview: Architecture
To summarize, the read path works as follows:
1. The querier receives an HTTP/1 request for data.
2. The querier passes the query to all ingesters for in-memory data.
3. The ingesters receive the read request and return data matching the query, if any.
4. The querier lazily loads data from the backing store and runs the query against it if no ingesters returned data.
5.
6. The querier iterates over all received data and deduplicates, returning a final set of data over the HTTP/1
connection.
And the the flow for the write path is as follows:
1. The distributor receives an HTTP/1 request to store data for streams.
2. Each stream is hashed using the hash ring.
3. The distributor sends each stream to the appropriate ingesters and their replicas (based on the configured
replication factor).
4. Each ingester will create a chunk or append to an existing chunk for the stream's data. A chunk is unique per
tenant and per labelset.
5. The distributor responds with a success code over the HTTP/1 connection.
Loki Overview: Architecture
Installation Options
1. Tanka (A reimplementation of Ksonnet that Grafana Labs created after Ksonnet was deprecated)
2. Helm (Loki Helm chart in its repository:
https://github.com/grafana/loki/tree/master/production/helm/loki)
3. Docker: Loki can be installed using both Docker and Docker Compose
4. Using Binaries: Every release includes binaries for Loki which can be found on the
Releases page. We can also build Loki binaries by creating them manually from by
cloning its repositories.
Comparison with Elastic Stack
Loki Promtail Grafana Elastic Stack Datadog
Data is stored in a cloud storage system
such as S3, GCS, or Cassandra as well as
on-disk
Data stored on-disk as JSON objects Data stored on-disk
Indexes metadata of logs Indexes the whole logs Indexes metadata of logs
Available on premise Available on premise Not available on premise
Open Source Open Source Flexible Pricing
Visualization Tool: Grafana Visualization Tool: Kibana Visualization Tool: Datadog Dashboards
Available Clients for Loki
● Promtail:
○ Client of choice when you're running Kubernetes
○ Configure it to automatically scrape logs from pods running on the same node that it runs on
● Docker Driver:
○ Automatically adds labels appropriate to the running container
● Fluent Bit & Fluentd:
○ Ideal when you already have Fluentd deployed and you already have configured Parser and Filter plugins
There are three unofficial clients present as well: promtail-client(Go), push-to-loki.py(Python) and
Serilog-Sinks-Loki(C#)
What is Promtail?
Promtail is an agent which ships the contents of local logs to a private or cloud Loki instance. It
is usually deployed to every machine that has applications needed to be monitored.
It primarily:
1. Discovers targets
2. Attaches labels to log streams
3. Pushes them to the Loki instance.
Currently, Promtail can tail logs from two sources: local log files and the systemd journal (on
AMD64 machines only).
OUR CHARTInsert Your Subtitle Here
Reference
● https://github.com/grafana/loki/tree/master/docs
● https://docs.google.com/document/d/11tjK_lvp1-SVsFZjgOTr1vV3-q
6vBAsZYIQ5ZeYBkyM/view
Thank You !

More Related Content

PDF
Grafana Loki: like Prometheus, but for Logs
PDF
Loki - like prometheus, but for logs
PDF
Intro to open source observability with grafana, prometheus, loki, and tempo(...
PPTX
OpenTelemetry For Operators
PPTX
OpenTelemetry For Developers
PDF
Exploring the power of OpenTelemetry on Kubernetes
PPTX
OpenTelemetry For Architects
PPTX
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
Grafana Loki: like Prometheus, but for Logs
Loki - like prometheus, but for logs
Intro to open source observability with grafana, prometheus, loki, and tempo(...
OpenTelemetry For Operators
OpenTelemetry For Developers
Exploring the power of OpenTelemetry on Kubernetes
OpenTelemetry For Architects
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io

What's hot (20)

PDF
Improve Monitoring and Observability for Kubernetes with OSS tools
PDF
Monitoring with prometheus
PDF
Observability in Java: Getting Started with OpenTelemetry
PPTX
Adopting OpenTelemetry
PDF
Apache Iceberg - A Table Format for Hige Analytic Datasets
PDF
Improving Performance of Micro-Frontend Applications through Error Monitoring
PDF
Logging and observability
PDF
PDF
Observability, Distributed Tracing, and Open Source: The Missing Primer
PDF
Apache Airflow
PDF
Getting Started Monitoring with Prometheus and Grafana
PDF
Apache flink
PPTX
Prometheus and Grafana
PDF
Prometheus + Grafana = Awesome Monitoring
PPTX
Introduction to Distributed Tracing
PDF
Implementing Observability for Kubernetes.pdf
PDF
OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
PDF
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
PPTX
Data Con LA 2022 - Making real-time analytics a reality for digital transform...
PDF
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Improve Monitoring and Observability for Kubernetes with OSS tools
Monitoring with prometheus
Observability in Java: Getting Started with OpenTelemetry
Adopting OpenTelemetry
Apache Iceberg - A Table Format for Hige Analytic Datasets
Improving Performance of Micro-Frontend Applications through Error Monitoring
Logging and observability
Observability, Distributed Tracing, and Open Source: The Missing Primer
Apache Airflow
Getting Started Monitoring with Prometheus and Grafana
Apache flink
Prometheus and Grafana
Prometheus + Grafana = Awesome Monitoring
Introduction to Distributed Tracing
Implementing Observability for Kubernetes.pdf
OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
Data Con LA 2022 - Making real-time analytics a reality for digital transform...
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Ad

Similar to Linking Metrics to Logs using Loki (20)

PPTX
Getting started with Loki on GKE
PDF
Cloud Foundry Logging and Metrics
PPTX
Centralized Logging System Using ELK Stack
PDF
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
PPTX
centralization of log systems pour suivis
PDF
Initial presentation of swift (for montreal user group)
PDF
Distributed Logging Architecture in Container Era
PDF
Distributed Logging Architecture in the Container Era
PPTX
Building a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
PDF
Scalable crawling with Kafka, scrapy and spark - November 2021
PDF
SAP OS/DB Migration using Azure Storage Account
PDF
ELK stack introduction
PDF
A day in the life of a log message
PPTX
S. Bartoli & F. Pompermaier – A Semantic Big Data Companion
PPTX
Grafana Loki (Monitoring Tool) Presentation
PDF
Fluent Bit: Log Forwarding at Scale
PDF
BlackRay - The open Source Data Engine
PPTX
How To Download and Process SEC XBRL Data Directly from EDGAR
PDF
Docker and Fluentd
PDF
VictoriaLogs: Open Source Log Management System - Preview
Getting started with Loki on GKE
Cloud Foundry Logging and Metrics
Centralized Logging System Using ELK Stack
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
centralization of log systems pour suivis
Initial presentation of swift (for montreal user group)
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in the Container Era
Building a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
Scalable crawling with Kafka, scrapy and spark - November 2021
SAP OS/DB Migration using Azure Storage Account
ELK stack introduction
A day in the life of a log message
S. Bartoli & F. Pompermaier – A Semantic Big Data Companion
Grafana Loki (Monitoring Tool) Presentation
Fluent Bit: Log Forwarding at Scale
BlackRay - The open Source Data Engine
How To Download and Process SEC XBRL Data Directly from EDGAR
Docker and Fluentd
VictoriaLogs: Open Source Log Management System - Preview
Ad

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
PPTX
Self-Healing Test Automation Framework - Healenium
PPTX
Kanban Metrics Presentation (Project Management)
PPTX
Java 17 features and implementation.pptx
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
PPTX
GraalVM - A Step Ahead of JVM Presentation
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
DAPR - Distributed Application Runtime Presentation
PPTX
Introduction to Azure Virtual WAN Presentation
PPTX
Introduction to Argo Rollouts Presentation
PPTX
Intro to Azure Container App Presentation
PPTX
Insights Unveiled Test Reporting and Observability Excellence
PPTX
Introduction to Splunk Presentation (DevOps)
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
PPTX
AWS: Messaging Services in AWS Presentation
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
PPTX
Managing State & HTTP Requests In Ionic.
Angular Hydration Presentation (FrontEnd)
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Self-Healing Test Automation Framework - Healenium
Kanban Metrics Presentation (Project Management)
Java 17 features and implementation.pptx
Chaos Mesh Introducing Chaos in Kubernetes
GraalVM - A Step Ahead of JVM Presentation
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
DAPR - Distributed Application Runtime Presentation
Introduction to Azure Virtual WAN Presentation
Introduction to Argo Rollouts Presentation
Intro to Azure Container App Presentation
Insights Unveiled Test Reporting and Observability Excellence
Introduction to Splunk Presentation (DevOps)
Code Camp - Data Profiling and Quality Analysis Framework
AWS: Messaging Services in AWS Presentation
Amazon Cognito: A Primer on Authentication and Authorization
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Managing State & HTTP Requests In Ionic.

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
cuic standard and advanced reporting.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
Reach Out and Touch Someone: Haptics and Empathic Computing
cuic standard and advanced reporting.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
sap open course for s4hana steps from ECC to s4
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Building Integrated photovoltaic BIPV_UPV.pdf
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction
MIND Revenue Release Quarter 2 2025 Press Release
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.

Linking Metrics to Logs using Loki

  • 1. Presented By: Etash Singh Linking Metrics to Logs using Loki
  • 2. 01 What is Log Aggregation? 02 Overview of Loki 03 04 Installation Options 05 Comparisons with Existing Solutions Our Agenda 06 Available Clients for Loki 07 What is Promtail? Demo
  • 3. What is Log Aggregation? Log aggregation is the practice of gathering up disparate log files for the purposes of organizing the data in them and making them searchable.
  • 4. c Overview of Loki? Grafana Loki is a set of components that can be composed into a fully featured logging stack. 1. Unlike other logging systems, Loki is built around the idea of only indexing metadata about your logs: labels (just like Prometheus labels). 2. Log data itself is then compressed and stored in chunks in object stores such as S3 or GCS, or even locally on the filesystem.
  • 5. Loki Overview: Motivation ○ Incident Response and Context Switching ○ Resolving Problems in Existing Solutions ○ Cost Efficiency ○ Kubernetes and Docker
  • 6. Loki Overview: Features ● Multi-Tenancy: ○ Data between tenants is completely separated ○ Achieved through a tenant ID (which is represented as an alphanumeric string) ○ When disabled, all requests are internally given a tenant ID of "fake" ● Modes of Operation: ○ Loki is optimized for both running locally (or at small scale) and for scaling horizontally ○ Loki comes with a single process mode that runs all of the required microservices in one process ○ The microservices of Loki can be broken out into separate processes, allowing them to scale independently of each other
  • 7. Loki Overview: Architecture Components in Loki ● Distributor ○ Handle incoming streams by clients ● Ingester ○ Write log data to long-term storage backends (DynamoDB, S3, Cassandra, etc.) ○ Return log data for in-memory queries on the read path ● Query Frontend ○ Optional service providing the querier's API endpoints ○ Used to accelerate the read path ● Querier ○ Handles queries using the LogQL query language ○ Fetch logs both from the ingesters and long-term storage
  • 8. Loki Overview: Architecture To summarize, the read path works as follows: 1. The querier receives an HTTP/1 request for data. 2. The querier passes the query to all ingesters for in-memory data. 3. The ingesters receive the read request and return data matching the query, if any. 4. The querier lazily loads data from the backing store and runs the query against it if no ingesters returned data. 5. 6. The querier iterates over all received data and deduplicates, returning a final set of data over the HTTP/1 connection. And the the flow for the write path is as follows: 1. The distributor receives an HTTP/1 request to store data for streams. 2. Each stream is hashed using the hash ring. 3. The distributor sends each stream to the appropriate ingesters and their replicas (based on the configured replication factor). 4. Each ingester will create a chunk or append to an existing chunk for the stream's data. A chunk is unique per tenant and per labelset. 5. The distributor responds with a success code over the HTTP/1 connection.
  • 10. Installation Options 1. Tanka (A reimplementation of Ksonnet that Grafana Labs created after Ksonnet was deprecated) 2. Helm (Loki Helm chart in its repository: https://github.com/grafana/loki/tree/master/production/helm/loki) 3. Docker: Loki can be installed using both Docker and Docker Compose 4. Using Binaries: Every release includes binaries for Loki which can be found on the Releases page. We can also build Loki binaries by creating them manually from by cloning its repositories.
  • 11. Comparison with Elastic Stack Loki Promtail Grafana Elastic Stack Datadog Data is stored in a cloud storage system such as S3, GCS, or Cassandra as well as on-disk Data stored on-disk as JSON objects Data stored on-disk Indexes metadata of logs Indexes the whole logs Indexes metadata of logs Available on premise Available on premise Not available on premise Open Source Open Source Flexible Pricing Visualization Tool: Grafana Visualization Tool: Kibana Visualization Tool: Datadog Dashboards
  • 12. Available Clients for Loki ● Promtail: ○ Client of choice when you're running Kubernetes ○ Configure it to automatically scrape logs from pods running on the same node that it runs on ● Docker Driver: ○ Automatically adds labels appropriate to the running container ● Fluent Bit & Fluentd: ○ Ideal when you already have Fluentd deployed and you already have configured Parser and Filter plugins There are three unofficial clients present as well: promtail-client(Go), push-to-loki.py(Python) and Serilog-Sinks-Loki(C#)
  • 13. What is Promtail? Promtail is an agent which ships the contents of local logs to a private or cloud Loki instance. It is usually deployed to every machine that has applications needed to be monitored. It primarily: 1. Discovers targets 2. Attaches labels to log streams 3. Pushes them to the Loki instance. Currently, Promtail can tail logs from two sources: local log files and the systemd journal (on AMD64 machines only).
  • 14. OUR CHARTInsert Your Subtitle Here Reference ● https://github.com/grafana/loki/tree/master/docs ● https://docs.google.com/document/d/11tjK_lvp1-SVsFZjgOTr1vV3-q 6vBAsZYIQ5ZeYBkyM/view