Using a Loki query can be an efficient way to analyze log data. The tool is designed to be scalable, and it’s very easy to get started.
Loki has several components, including a query frontend, a ingester module, a distributor module, and a querier module. These components run on their own servers, making it possible for users to scale them up and down as needed.
The query frontend module is designed to perform large queries in parallel. It can also provide an API endpoint for queries. The ingester module is used to receive the logs from the client. It then validates them and turns them into streams.
The querier module handles user queries on the object store. It can also be used to create metrics from the logs.
Streams are pushed to Loki using an HTTP API. They are then read from all containers in the cluster. Streams are categorized into labels. These labels are used during queries to select logs to search. They are also used to further filter.
Label matchers are a crucial component of the Loki query. They allow for fast queries by reducing the number of streams required. Labels can also be modified by expressions. This allows for the logs to be re-tagged to different labels. However, labels should not be extracted from the logs.
If the log line cannot be filtered by the language, it will fail. The error will be passed along to the next stage of the pipeline.