Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Microservices mode (微服务模式) - Metrics

In microservices mode, components are deployed in distinct processes. Scaling is per component, which allows for greater flexibility in scaling and more granular failure domains. Microservices mode is the preferred method for a production deployment, but it is also the most complex.

In microservices mode, each Grafana Mimir process is invoked with its -target parameter set to a specific Grafana Mimir component (for example, -target=ingester or -target=distributor). To get a working Grafana Mimir instance, you must deploy every required component.

Grafana Mimir components

Grafana Mimir includes a set of components that interact to form a cluster.

Diagram

The below diagram describes how data flows.

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

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

    subgraph Ingester["mimir -target=ingester"]
        I("ingester")
    end
    subgraph Distributor["mimir -target=distributor"]
        D("distributor")
    end
    subgraph StoreGateway["mimir -target=store-gateway"]
        SG("store-gateway")
    end
    subgraph Querier["mimir -target=querier"]
        Q("querier") -.->|reads| I
    end
    subgraph QueryScheduler["mimir -target=query-scheduler"]
        QS("(optional) query-scheduler")
    end
    subgraph QueryFrontend["mimir -target=query-frontend"]
        QF("query-frontend")
    end
    subgraph Compactor["mimir -target=compactor"]
        C("compactor")

        C  -->|writes| M
        C -.->|reads | M
    end

    subgraph Alertmanager["mimir -target=alertmanager"]
        AM("(optional) alertmanager") --> M
    end

    %% ruler in Remote mode
    subgraph Ruler["mimir -target=ruler"]
        R("(optional) ruler")

        R --> QF & I & AM & M
    end
Loading

Quick Start

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

make up-microservices-mode-metrics

That's it.

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

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

Clean up

make down-microservices-mode-metrics