跳转到主要内容

书籍

Grafana Loki 文档

Grafana Loki 文档。内容保持上游原样。

11 章129 页更新于 2 天前

开始阅读

目录129

  1. 第 1 章 Community 20 页
    1. 1.1 Contributing to Loki For the full contribution guide, see CONTRIBUTING.md in the root of the repository. Building Clone the repo... 2 天前
    2. 1.2 Loki community frequently asked questions Is Loki open source? What is the license? Grafana Loki is open source, licensed under the GNU Affero Genera... 2 天前
    3. 1.3 Contacting the Loki Team For questions regarding Loki: Ask a question in the #loki channel of our Slack community Open source Loki ... 2 天前
    4. 1.4 Governance This document describes the rules and governance of the project. It is meant to be followed by all the deve... 2 天前
    5. 1.5 Promtail Push API Author: Robert Fratto (@rfratto) Date: Feb 4 2020 Status: DRAFT Despite being an optional piece of software... 2 天前
    6. 1.6 Write-Ahead Logs Author: Owen Diehl - owen-d (Grafana Labs) Date: 30/09/2020 Impetus Loki already takes numerous steps to en... 2 天前
    7. 1.7 Ordering Constraint Removal Author: Owen Diehl - owen-d (Grafana Labs) Date: 28/01/2021 Problem Loki imposes an ordering constraint on ... 2 天前
    8. 1.8 Labels Author: Ed Welch Date: February 2019 This is the official version of this doc as of 2019/04/03, the origina... 2 天前
    9. 1.9 Releasing Loki Build Image The loki-build-image is the Docker image used to run tests and build Grafana Loki binaries in CI. The buil... 2 天前
    10. 1.10 Backport commits Any PRs or commits not on the release branch that you want to include in the release must be backported to ... 2 天前
    11. 1.11 Create Release Branch A single release branch is created for every major or minor release (not for patch releases). That releas... 2 天前
    12. 1.12 Document metrics and configurations changes Any metrics and configurations that are removed or modified need to be documented in the upgrade guide. Con... 2 天前
    13. 1.13 Prepare Major Release A major release follows the same process as minor and patch releases, but requires a custom workflow to be ... 2 天前
    14. 1.14 Merge Release PR To release Loki, merge the release PR. This PR will have the title chore(<BRANCH>): release <VERSION>. Her... 2 天前
    15. 1.15 Patch Go version Update vulnerable Go version to non-vulnerable Go version to build Grafana Loki binaries. Steps Find Go ver... 2 天前
    16. 1.16 Patch vulnerabilities This step patches vulnerabilities in Grafana Loki binaries and Docker images. Before you begin Determine th... 2 天前
    17. 1.17 Prepare Release Releasing Grafana Loki consists of merging a long-running release PR. Two workflows keep these PRs up to da... 2 天前
    18. 1.18 Prepare Upgrade guide The upgrade guide records changes that require user attention or interaction to upgrade to specific Loki ve... 2 天前
    19. 1.19 Update version numbers Upgrade the Loki version to the new release version in documents, examples, jsonnets, etc. Before you begin... 2 天前
    20. 1.20 Version Grafana Loki uses Semantic Versioning. The next version can be determined by looking at the current version... 2 天前
  2. 第 2 章 Configure 7 页
    1. 2.1 Configuration best practices Grafana Loki is under active development, and the Loki team is constantly working to improve performance. B... 2 天前
    2. 2.2 Understanding Loki configuration limits Loki implements configuration limits to maintain system stability, ensure fair resource distribution, and p... 2 天前
    3. 2.3 Storage Unlike other logging systems, Grafana Loki is built around the idea of only indexing metadata about your lo... 2 天前
    4. 2.4 Usage statistics Loki sends anonymous usage statistics to Grafana Labs. This reporting is enabled by default and helps the L... 2 天前
    5. 2.5 Legacy configuration examples These examples configure Loki's legacy, non-default storage clients. Since Loki 4.0, Loki uses the Thanos-b... 2 天前
    6. 2.6 Query frontend example Before you begin This is a general-purpose example. It contains placeholder variables in the format <varia... 2 天前
    7. 2.7 Configuration examples for using Thanos-based storage clients Use these examples as a starting point for configuring Thanos-based object storage clients in Grafana Loki.... 2 天前
  3. 第 3 章 Get Started 11 页
    1. 3.1 Loki architecture Grafana Loki has a microservices-based architecture and is designed to run as a horizontally scalable, dist... 2 天前
    2. 3.2 Loki components {{< youtube id="_hv4i84Z68s" >}} Loki is a modular system that contains many components that can either be ... 2 天前
    3. 3.3 Loki deployment modes Loki is a distributed system consisting of many microservices. It also has a unique build model where all o... 2 天前
    4. 3.4 Consistent hash rings Consistent hash rings are incorporated into Loki cluster architectures to aid in the sharding of log lines ... 2 天前
    5. 3.5 Loki overview Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Promethe... 2 天前
    6. 3.6 Label best practices Grafana Loki is under active development, and we are constantly working to improve performance. But here ar... 2 天前
    7. 3.7 Cardinality The cardinality of a data attribute is the number of distinct values that the attribute can have. For exam... 2 天前
    8. 3.8 Modify default OpenTelemetry labels When Grafana Loki first started supporting OpenTelemetry, we selected a set of default resource attributes ... 2 天前
    9. 3.9 What is structured metadata {{< admonition type="warning" >}} Structured metadata was added to chunk format V4, which is used if the sc... 2 天前
    10. 3.10 Quickstart to run Loki locally Quickstart to run Loki locally If you want to experiment with Loki, you can run Loki locally using the Dock... 2 天前
    11. 3.11 Loki Tutorial Loki Tutorial This quickstart guide will walk you through deploying Loki in single binary mode (also known ... 2 天前
  4. 第 4 章 Operations 30 页
    1. 4.1 Manage authentication Grafana Loki does not come with any included authentication layer. You must run an authenticating reverse p... 2 天前
    2. 4.2 Manage large volume log streams with automatic stream sharding Automatic stream sharding can keep streams under a desired_rate by adding new labels and values to existin... 2 天前
    3. 4.3 Manage varying workloads at scale with autoscaling queriers A microservices deployment of a Loki cluster that runs on Kubernetes typically handles a workload that vari... 2 天前
    4. 4.4 Block unwanted queries In certain situations, you may not be able to control the queries being sent to your Loki installation. The... 2 天前
    5. 4.5 Manage bloom filter building and querying (Deprecated) {{< admonition type="warning" >}} In Loki and Grafana Enterprise Logs (GEL), Query acceleration using bloom... 2 天前
    6. 4.6 Configure caches to speed up queries Loki supports caching for query results, chunks, and index lookups to speed up query performance and reduce... 2 天前
    7. 4.7 Kafka-based ingestion (Experimental) {{< admonition type="warning" >}} Kafka-based ingestion is an experimental feature. Engineering and on-call... 2 天前
    8. 4.8 Use label-based access control with Loki {{< admonition type="note" >}} This feature is generally available from v4.0. For the latest releases, refe... 2 天前
    9. 4.9 Manage tenant isolation Grafana Loki is a multi-tenant system; requests and data for tenant A are isolated from tenant B. Requests ... 2 天前
    10. 4.10 Monitor tenant limits using the Overrides Exporter Loki is a multi-tenant system that supports applying limits to each tenant as a mechanism for resource mana... 2 天前
    11. 4.11 Manage recording rules Recording rules are queries that run in an interval and produce metrics from logs that can be pushed to a P... 2 天前
    12. 4.12 Enforce rate limits and push request validation Loki will reject requests if they exceed a usage threshold (rate limit error) or if they are invalid (valid... 2 天前
    13. 4.13 Manage larger production deployments When needing to scale Loki due to increased log volume, operators should consider running several Loki proc... 2 天前
    14. 4.14 Manage version upgrades Upgrade from one Loki version to a newer version. Upgrade Helm from Helm v2.x to Helm v3.x. 2 天前
    15. 4.15 Speed up ingester rollout using zone awareness The Loki zone aware ingesters are used by Grafana Labs in order to allow for easier rollouts of large Loki ... 2 天前
    16. 4.16 Deploy Loki meta-monitoring with chart version 3 The primary method for collecting and monitoring a Loki cluster is to use the Kubernetes Monitoring Helm ch... 2 天前
    17. 4.17 Deploy Loki meta-monitoring The primary method for collecting and monitoring a Loki cluster is to use the Kubernetes Monitoring Helm ch... 2 天前
    18. 4.18 Key metrics for monitoring Loki Loki exposes many metrics, and each component behaves differently under load. This page focuses on the high... 2 天前
    19. 4.19 Install dashboards, alerts, and recording rules Loki is instrumented to expose metrics about itself via the /metrics endpoint, designed to be scraped by P... 2 天前
    20. 4.20 Single binary meta-monitoring Meta monitoring for monolithic mode deployments involves some additional configuration. This approach does ... 2 天前
    21. 4.21 Horizontal scaling of Compactor {{< admonition type="caution" >}} Compactor horizontal scaling is an experimental feature. Use it with caut... 2 天前
    22. 4.22 Filesystem object store The filesystem object store is the easiest way to get started with Grafana Loki. This topic describes its p... 2 天前
    23. 4.23 Log entry deletion Grafana Loki supports the deletion of log entries from a specified stream. Log entries that fall within a s... 2 天前
    24. 4.24 Log retention Retention in Grafana Loki is achieved through the Compactor. By default the compactor.retention-enabled fl... 2 天前
    25. 4.25 Single Store TSDB (tsdb) Starting with Loki v2.8, TSDB is the recommended Loki index. It is heavily inspired by the Prometheus TSDB ... 2 天前
    26. 4.26 Write Ahead Log Ingesters temporarily store data in memory. In the event of a crash, there could be data loss. The Write Ah... 2 天前
    27. 4.27 Troubleshoot Logs Drilldown {{< docs/shared lookup="troubleshoot-logs-drilldown.md" source="explore-logs" version="next" >}} 2 天前
    28. 4.28 Troubleshoot log ingestion (WRITE) This guide helps you troubleshoot errors that occur when ingesting logs into Loki and writing logs to stora... 2 天前
    29. 4.29 Troubleshoot Loki operations This guide helps you troubleshoot errors that occur during Loki operations, including configuration issues,... 2 天前
    30. 4.30 Troubleshoot log queries (READ) {{< docs/shared lookup="troubleshoot-query.md" source="loki" version="<LOKI_VERSION>" >}} 2 天前
  5. 第 5 章 Query 11 页
    1. 5.1 Simple LogQL simulator Simple LogQL simulator The LogQL simulator is an online tool that you can use to experiment with writing si... 2 天前
    2. 5.2 Query best practices The way you write queries in Loki affects how quickly you get results returned from those queries. Understa... 2 天前
    3. 5.3 Matching IP addresses LogQL supports matching IP addresses. With logs such as 3.180.71.3 - - [17/May/2015:08:05:32 +0000] "GET /d... 2 天前
    4. 5.4 Metric queries {{< shared id="metric-queries" >}} Metric queries extend log queries by applying a function to log query re... 2 天前
    5. 5.5 Query acceleration {{< admonition type="warning" >}} In Loki and Grafana Enterprise Logs (GEL), Query acceleration using bloom... 2 天前
    6. 5.6 Query examples These LogQL query examples have explanations of what the queries accomplish. Log query examples Examples th... 2 天前
    7. 5.7 LogQL Reference Loki accepts a number of operators and functions within a LogQL query. Binary operators Arithmetic operator... 2 天前
    8. 5.8 LogQL template functions The Go templating language is embedded in the Loki query language, LogQL. The text template format used in ... 2 天前
    9. 5.9 Troubleshoot log queries (READ) {{< docs/shared lookup="troubleshoot-query.md" source="loki" version="<LOKI_VERSION>" >}} 2 天前
    10. 5.10 LogCLI getting started logcli is a command-line client for Loki that lets you run LogQL queries against your Loki instance. The q... 2 天前
    11. 5.11 LogCLI tutorial LogCLI tutorial This LogCLI tutorial will walk you through the following concepts: Querying logs Meta Queri... 2 天前
  6. 第 6 章 Reference 7 页
    1. 6.1 Grafana Loki configuration parameters Grafana Loki is configured in a YAML file (usually referred to as loki.yaml ) which contains information o... 2 天前
    2. 6.2 Loki HTTP API Loki exposes an HTTP API for pushing, querying, and tailing log data, as well as for viewing and managing c... 2 天前
    3. 6.3 Loki network ports Loki components communicate with each other over the network, and clients such as Grafana and Grafana Alloy... 2 天前
    4. 6.4 Query Loki with Python This page provides Python examples for the most common Loki HTTP API operations: querying logs, pushing log... 2 天前
    5. 6.5 TSDB index format v2 Version 2 is Loki's initial TSDB index format. It is written for periods with schema versions v9 through ... 2 天前
    6. 6.6 TSDB index format v3 Version 3 is written for periods with schema version v13. It is identical to version 2 except for the chun... 2 天前
    7. 6.7 TSDB index format v4 Version 4 is written for periods with schema version v14. This version is experimental. It keeps the pagin... 2 天前
  7. 第 7 章 Release Notes 10 页
    1. 7.1 Release cadence Stable Releases Loki releases (this includes Promtail, Loki Canary, etc.) use the following naming scheme: ... 2 天前
    2. 7.2 V?.? Grafana Labs is excited to announce the release of Loki ?.?.? Here's a summary of new enhancements and impo... 2 天前
    3. 7.3 v3.0 Grafana Labs and the Loki team are excited to announce the release of Loki 3.0. Here's a summary of new enh... 2 天前
    4. 7.4 v3.1 Grafana Labs and the Loki team are excited to announce the release of Loki 3.1. Here's a summary of new enh... 2 天前
    5. 7.5 v3.2 Grafana Labs and the Loki team are excited to announce the release of Loki 3.2. Explore Logs is also now Ge... 2 天前
    6. 7.6 v3.3 Grafana Labs and the Loki team are excited to announce the release of Loki 3.3. Here's a summary of new enh... 2 天前
    7. 7.7 v3.4 Grafana Labs and the Loki team are excited to announce the release of Loki 3.4. Here's a summary of new enh... 2 天前
    8. 7.8 v3.5 Grafana Labs and the Loki team are excited to announce the release of Loki 3.5. Here's a summary of new enh... 2 天前
    9. 7.9 v3.6 Grafana Labs and the Loki team are excited to announce the release of Loki 3.6. Here's a summary of new enh... 2 天前
    10. 7.10 v3.7 Grafana Labs and the Loki team are excited to announce the release of Loki 3.7. Here's a summary of new enh... 2 天前
  8. 第 8 章 Send Data 11 页
    1. 8.1 Sending Logs to Loki via Kafka using Alloy Sending Logs to Loki via Kafka using Alloy Alloy natively supports receiving logs via Kafka. In this exampl... 2 天前
    2. 8.2 Sending OpenTelemetry logs to Loki using Alloy Sending OpenTelemetry logs to Loki using Alloy Alloy natively supports receiving logs in the OpenTelemetry ... 2 天前
    3. 8.3 Docker driver client configuration The Docker daemon on each machine has a default logging driver and each container will use the default driv... 2 天前
    4. 8.4 Fluent Bit community plugin {{< admonition type="warning" >}} We recommend using the official Fluent Bit Loki plugin. The official plug... 2 天前
    5. 8.5 Sending logs to Loki using Fluent Bit tutorial Sending logs to Loki using Fluent Bit tutorial In this tutorial, you will learn how to send logs to Loki us... 2 天前
    6. 8.6 Fluent Bit Loki output plugin Fluent Bit is a fast and lightweight logs and metrics processor and forwarder that can be configured with t... 2 天前
    7. 8.7 Generating log data for testing You can use k6 to generate log data for load testing. Using pushParameterized Push logs to Loki with push... 2 天前
    8. 8.8 Use k6 to load test log queries When designing a test scenario for load testing the read path of a Loki installation, it is important to kn... 2 天前
    9. 8.9 Use k6 to load test the write path There are multiple considerations when load testing a Loki cluster's write path. The most important conside... 2 天前
    10. 8.10 How is native OTLP endpoint different from Loki Exporter Introduction OpenTelemetry (OTel) is quickly becoming an industry standard with increasing adoption. Prior ... 2 天前
    11. 8.11 Getting started with the OpenTelemetry Collector and Loki tutorial Getting started with the OpenTelemetry Collector and Loki tutorial The OpenTelemetry Collector offers a ven... 2 天前
  9. 第 9 章 Setup 16 页
    1. 9.1 Install Loki with Docker or Docker Compose You can install Loki and Alloy with Docker or Docker Compose if you are evaluating, testing, or developing ... 2 天前
    2. 9.2 Build from source Clone the Grafana Loki repository and use the provided Makefile to build Loki from source. {{< admonition ... 2 天前
    3. 9.3 Install on Istio When installing Loki on Istio service mesh you must complete some additional steps. Without these steps, th... 2 天前
    4. 9.4 Install Grafana Loki locally To log events with Grafana Loki, download and install Loki. Loki is the logging engine. Grafana Alloy is re... 2 天前
    5. 9.5 Tanka Tanka is a reimplementation of Ksonnet that Grafana Labs created after Ksonnet was deprecated. Tanka is use... 2 天前
    6. 9.6 Helm chart components This section describes the components installed by the Helm Chart. For the ports and protocols these compon... 2 天前
    7. 9.7 Helm chart values Helm chart values This is the generated reference for the Loki Helm chart values, sourced from the values.... 2 天前
    8. 9.8 Deploy the Loki Helm chart on AWS This guide shows how to deploy a minimally viable Loki in microservice mode on AWS using the Helm chart. To... 2 天前
    9. 9.9 Deploy the Loki Helm chart on Azure This guide shows how to deploy a minimally viable Loki in microservice mode on Azure using the Helm chart. ... 2 天前
    10. 9.10 Deploy the Loki Helm chart on GCP This guide shows how to deploy a minimally viable Loki in microservices mode on Google Cloud Platform (GCP)... 2 天前
    11. 9.11 Migrate from `loki-distributed` Helm chart This guide will walk you through migrating to the loki Helm Chart, v3.0 or higher, from the loki-distribu... 2 天前
    12. 9.12 Upgrade Loki 1.x versions Every attempt is made to keep Grafana Loki backwards compatible, such that upgrades should be low risk and ... 2 天前
    13. 9.13 Upgrade Loki 2.x versions Every attempt is made to keep Grafana Loki backwards compatible, such that upgrades should be low risk and ... 2 天前
    14. 9.14 Upgrade the Helm chart to 3.0 v3.x represents a major milestone for this chart, showing a commitment by the Loki team to provide a better... 2 天前
    15. 9.15 Upgrade the Helm chart to 6.0 v6.x of this chart introduces distributed mode but also introduces breaking changes from v5x. {{< admonitio... 2 天前
    16. 9.16 Upgrade from the Loki Helm chart to the Community Helm chart The Loki Helm chart has moved from the Loki repository to the Grafana Community Helm Charts repository. Cha... 2 天前
  10. 第 10 章 Shared 5 页
    1. 10.1 Grafana Loki configuration parameters Printing Loki config at runtime If you pass Loki the flag -print-config-stderr or -log-config-reverse-ord... 2 天前
    2. 10.2 index headless: true description: | A headless page sets the render and list build options to never, creating a b... 2 天前
    3. 10.3 otel headless: true description: Shared file for Loki OTEL content. labels: products: - enterprise - oss - cloud... 2 天前
    4. 10.4 promtail-deprecation description: Deprecation notice for Promtail. headless: true labels: products: - enterprise - oss {{< admon... 2 天前
    5. 10.5 troubleshoot-query headless: true description: | A headless page sets the render and list build options to never, creating a b... 2 天前
  11. 第 11 章 Visualize 1 页
    1. 11.1 Visualize log data Grafana Loki does not have its own user interface. Most users install Grafana in order to visualize their l... 2 天前