Skip to main content
Skip table of contents

Logging Prerequisites and Architecture

Before you begin, you must:

  • Be a cluster administrator with permissions to configure cluster-level platform services.

  • Set a default storage class on each attached cluster for successful Loki deployment.

For more information, see Default Storage Providers in DKP .

DKP Logging Stack Architecture

The DKP logging stack architecture provides a comprehensive logging solution for the DKP platform. It combines Fluent Bit, Fluentd, Loki, and Grafana components to collect, process, store, and visualize log data. The architecture establishes a robust logging solution by assigning specific roles to each of those components.

Components

  1. Fluent Bit - Fluent Bit is a lightweight log processor and forwarder that collects log data from various sources, such as application logs or Kubernetes components. It forwards the collected logs to Fluentd for further processing.

  2. Fluentd - Fluentd is a powerful and flexible log aggregator that receives log data from Fluent Bit, processes it, and forwards it to the Loki Distributor. Fluentd can handle various log formats and enrich the log data with additional metadata before forwarding it.

  3. Loki - Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system. Loki components include:- Compactor: Responsible for compacting index files and chunks to improve query performance and reduce storage usage.

    1. Distributor: Receives log streams, partitions them into chunks, and forwards these chunks to the Loki Ingester component.

    2. Gateway: Acts as a single access point to various Loki components, routing requests between Distributor, Query Frontend, and other components as needed.

    3. Ingester: Compresses, indexes, and persists received log chunks.

    4. Querier: Fetches log chunks from the Ingester, decompresses and filters them based on the query, and returns the results to the Query Frontend.

    5. Query Frontend: Splits incoming queries into smaller parts, forwards these to the Loki Querier component, and combines the results from all Queriers before returning the final result.

  4. Grafana - Grafana is a visualization and analytics platform that supports Loki as one of its data sources. Grafana provides a user-friendly interface for querying and visualizing log data based on user-defined dashboards and panels.

Workflow

  • Write Path:

    • Fluent Bit instances running on each node collect log data from various sources, like application logs or Kubernetes components.

    • Fluent Bit forwards the collected log data to the Fluentd instance.

    • Fluentd processes the received log data and forwards it to the Loki Distributor through the Loki Gateway.

    • The Loki Distributor receives the log streams, partitions them into chunks, and forwards these chunks to the Loki Ingester component.

    • Loki Ingesters are responsible for compressing, indexing, and persisting the received log chunks.

  • Read Path:

    • When a user queries logs through Grafana, the request goes to the Loki Gateway, which routes it to the Loki Query Frontend.

    • The Query Frontend splits the query into smaller parts and forwards these to the Loki Querier component.

    • Loki Queriers fetch the log chunks from the Loki Ingester, decompress and filter them based on the query, and return the results to the Query Frontend.

    • The Query Frontend combines the results from all Queriers and returns the final result to Grafana through the Loki Gateway.

    • Grafana visualizes the log data based on the user's dashboard configuration

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.