Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Microservices mode (微服务模式) - Logs

The microservices deployment mode instantiates components of Loki as distinct processes. Each process is invoked specifying its target:

  • compactor
  • distributor
  • index-gateway
  • ingester
  • overrides-exporter
  • querier
  • query-frontend
  • query-scheduler
  • ruler

Running components as individual microservices allows scaling up by increasing the quantity of microservices.

Loki microservices mode

Diagram

The below diagram describes how data flows.

flowchart LR
    A --->|writes| D   -->|writes| I  -->|writes| M
    G -.->|reads | QF -.->|reads | Q -.->|reads | M

    subgraph Minio
        M{"Object Storage"}
    end
    subgraph Agent["Grafana Alloy"]
        A("alloy")
    end
    subgraph Grafana
        G("grafana")
    end

    subgraph Ingester["loki -target=ingester"]
        I("ingester")
    end

    subgraph Distributor["loki -target=distributor"]
        D("distributor")
    end

    subgraph Querier["loki -target=querier"]
        Q("querier") -.->|reads| I
    end

    subgraph QueryFrontend["loki -target=query-frontend"]
        QF("query-frontend")
    end

    subgraph Ruler["loki -target=ruler"]
        R("ruler")
        R -.->|reads | M & I
    end
Loading

Quick Start

Install dependencies tools

git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make install-build-deps

Create a cluster and mapping the ingress port 80 to localhost:8080

make cluster

Deploy manifests

make deploy-microservices-mode-logs

Once all containers are up and running you can search for logs in Grafana.

Navigate to http://localhost:8080/explore and select the search tab.

Clean up

make delete-microservices-mode-logs