content large_stringlengths 3 20.5k | url large_stringlengths 54 193 | branch large_stringclasses 4
values | source large_stringclasses 42
values | embeddings listlengths 384 384 | score float64 -0.21 0.65 |
|---|---|---|---|---|---|
# Loki meta-monitoring As part of your Loki implementation, you will also want to monitor your Loki cluster. As a best practice, you should collect data about Loki in a separate instance of Loki, Prometheus, and Grafana. For example, send your Loki cluster data to a [Grafana Cloud account](https://grafana.com/products/... | https://github.com/grafana/loki/blob/main//docs/sources/operations/meta-monitoring/_index.md | main | loki | [
-0.012216524221003056,
-0.06118059158325195,
-0.012813207693397999,
0.05252311751246452,
0.04781142622232437,
-0.0952780544757843,
-0.04202602058649063,
0.0014786585234105587,
-0.008649453520774841,
0.042086198925971985,
-0.03535797446966171,
-0.08334571123123169,
-0.03186573088169098,
0.0... | 0.191111 |
Metric Name | Metric Type | Description | | ---------------------------------- | ----------- | ----------------------------------------------------------------------- | | `loki\_internal\_log\_messages\_total` | Counter | Total number of log messages created by Loki itself. | | `loki\_request\_duration\_seconds` | Hist... | https://github.com/grafana/loki/blob/main//docs/sources/operations/meta-monitoring/_index.md | main | loki | [
0.000558538711629808,
-0.05683441832661629,
-0.07210499793291092,
0.019230972975492477,
-0.03290557488799095,
-0.07869341969490051,
0.04278107360005379,
0.05417212098836899,
0.05065418779850006,
0.017829639837145805,
-0.02340891771018505,
-0.09936117380857468,
0.014763102866709232,
0.06019... | 0.226199 |
severity or above. Valid levels: [debug, # info, warn, error] # CLI flag: -log.level [log\_level: | default = "info"] ``` | https://github.com/grafana/loki/blob/main//docs/sources/operations/meta-monitoring/_index.md | main | loki | [
0.03553534671664238,
0.03625170886516571,
-0.016546666622161865,
0.005594441667199135,
0.05908413603901863,
-0.0509079210460186,
0.05276564136147499,
0.09665525704622269,
-0.04574945569038391,
-0.02970198728144169,
0.03598343953490257,
-0.06594971567392349,
0.03932344913482666,
0.070274464... | 0.052351 |
# Single Store BoltDB (boltdb-shipper) {{< admonition type="note" >}} Single store BoltDB Shipper is a legacy storage option recommended for Loki 2.0 through 2.7.x and is not recommended for new deployments. The [TSDB](https://grafana.com/docs/loki//operations/storage/tsdb/) is the recommended index for Loki 2.8 and ne... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/boltdb-shipper.md | main | loki | [
-0.07390721142292023,
-0.02114388346672058,
-0.08061234652996063,
0.10560479015111923,
-0.03306785598397255,
-0.0365157388150692,
-0.10547612607479095,
0.03403608128428459,
0.02814459428191185,
0.015468908473849297,
-0.022001607343554497,
0.028474528342485428,
-0.022514112293720245,
0.0088... | 0.170587 |
folder per day and add files for that day in that folder and names those files after ingesters which created them. To reduce the size of files which help with faster transfer speeds and reduced storage costs, they are stored after compressing them with gzip. To show how BoltDB files in shared object store would look li... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/boltdb-shipper.md | main | loki | [
-0.07699764519929886,
0.023027347400784492,
-0.06380081176757812,
0.10199560970067978,
-0.015731574967503548,
-0.015630636364221573,
0.036984436213970184,
0.040399398654699326,
0.02193492278456688,
0.02810767851769924,
-0.014161527156829834,
0.05441995710134506,
0.021487457677721977,
-0.03... | 0.117835 |
files. This will obtain better read performance, and it will avoid using node disk. ### Index Gateway An Index Gateway downloads and synchronizes the BoltDB index from the Object Storage in order to serve index queries to the Queriers and Rulers over gRPC. This avoids running Queriers and Rulers with a disk for persist... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/boltdb-shipper.md | main | loki | [
-0.013663768768310547,
0.008105054497718811,
-0.08913788199424744,
0.0699525997042656,
-0.09286392480134964,
-0.056497253477573395,
-0.054469868540763855,
-0.017381791025400162,
0.0747951865196228,
0.03734931722283363,
-0.04943927749991417,
0.03705080971121788,
-0.003345814533531666,
-0.05... | 0.094157 |
# Log retention Retention in Grafana Loki is achieved through the [Compactor](#compactor). By default the `compactor.retention-enabled` flag is not set, so the logs sent to Loki live forever. {{< admonition type="note" >}} If you have a lifecycle policy configured on the object store, please ensure that it is longer th... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/retention.md | main | loki | [
-0.06660235673189163,
0.006227079778909683,
-0.0689857080578804,
0.06336863338947296,
-0.02072390355169773,
-0.036248717457056046,
-0.032779403030872345,
-0.046531230211257935,
0.018286898732185364,
0.049683719873428345,
0.036657534539699554,
0.01688908040523529,
-0.018996786326169968,
0.0... | 0.098261 |
retention\_delete\_worker\_count: 150 delete\_request\_store: gcs schema\_config: configs: - from: "2020-07-31" index: period: 24h prefix: index\_ object\_store: gcs schema: v13 store: tsdb storage\_config: tsdb\_shipper: active\_index\_directory: /data/index cache\_location: /data/index\_cache gcs: bucket\_name: loki ... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/retention.md | main | loki | [
-0.021927619352936745,
-0.03323545679450035,
-0.05717648193240166,
0.08120933920145035,
-0.02847066894173622,
-0.0076636066660285,
0.041519902646541595,
-0.014269920997321606,
0.013584041967988014,
0.07097983360290527,
0.05134709179401398,
-0.010619916953146458,
0.03605744615197182,
0.0247... | 0.09136 |
`72h` retention period. - For the rest of the streams in this tenant, per-tenant override `retention\_period` value of `168h` is applied. - For tenant `30`: - Streams that have the label `nginx` and level `debug` will have a retention period of `24h`. - For the rest of the streams in this tenant the global retention pe... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/retention.md | main | loki | [
-0.06738618016242981,
0.022772647440433502,
-0.058800507336854935,
0.031570956110954285,
-0.018335282802581787,
-0.05864149332046509,
-0.045702092349529266,
-0.08951062709093094,
0.04688207060098648,
0.023371919989585876,
0.020267831161618233,
-0.028309812769293785,
-0.023349057883024216,
... | 0.017828 |
# Single Store TSDB (tsdb) Starting with Loki v2.8, TSDB is the recommended Loki index. It is heavily inspired by the Prometheus's TSDB [sub-project](https://github.com/prometheus/prometheus/tree/main/tsdb). For a deeper explanation you can read Loki maintainer Owen's [blog post](https://www.pikach.us/posts/tsdb/). The... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/tsdb.md | main | loki | [
-0.04474101960659027,
-0.043079815804958344,
0.013286108151078224,
0.0981006771326065,
-0.0006960898754186928,
-0.03830813616514206,
-0.06817303597927094,
0.041782356798648834,
0.0040931724943220615,
0.020264379680156708,
-0.034254059195518494,
0.03660993278026581,
-0.015014083124697208,
0... | 0.211108 |
we suggest running without an index cache (it isn't used in TSDB). | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/tsdb.md | main | loki | [
0.02055310271680355,
-0.06334179639816284,
-0.013047116808593273,
0.07388502359390259,
-0.00208709086291492,
-0.01884695701301098,
-0.00647642882540822,
-0.04366495460271835,
-0.02330361306667328,
0.06516686826944351,
-0.050608959048986435,
0.056244391947984695,
-0.04495924711227417,
-0.00... | 0.050668 |
# Legacy storage {{< admonition type="warning" >}} The concepts described on this page are considered legacy and pre-date the single store storage introduced in Loki 2.0. The usage of legacy storage for new installations is highly discouraged and documentation is meant for informational purposes in case of upgrade to a... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/legacy-storage.md | main | loki | [
-0.040119193494319916,
0.04725249484181404,
-0.017221467569470406,
0.028407370671629906,
0.029673904180526733,
-0.04777683690190315,
-0.10544287413358688,
0.002622963860630989,
-0.007795650977641344,
0.029577670618891716,
0.01996539905667305,
-0.0062492829747498035,
0.07402054220438004,
-0... | 0.074223 |
# Introduction {{< admonition type="caution" >}} Compactor horizontal scaling is an experimental feature. Use it with caution in your production environments. {{< /admonition >}} Grafana Loki saw a major improvement in its operational complexity and cost-effectiveness with the introduction of object-storage-based index... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/compactor-horizontal-scaling.md | main | loki | [
-0.13069532811641693,
0.029005054384469986,
-0.0573759488761425,
0.032647836953401566,
-0.010542046278715134,
-0.049365460872650146,
-0.03559166193008423,
-0.007470782846212387,
0.021639177575707436,
0.01461070217192173,
0.021160786971449852,
0.08019919693470001,
-0.01938992738723755,
0.06... | 0.164647 |
to Job Builder. Also notifies about failed jobs after running out of retries. ### Working of Worker mode Workers connect to the Main Compactor via gRPC to fetch and execute jobs, returning results on the same gRPC stream. It uses `compactor\_grpc\_address` under the [common config](https://grafana.com/docs/loki//config... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/compactor-horizontal-scaling.md | main | loki | [
-0.1786757856607437,
0.01364593580365181,
-0.08062043786048889,
0.017448347061872482,
-0.030413372442126274,
-0.07820505648851395,
-0.05106541886925697,
-0.12501904368400574,
-0.0005097539979033172,
-0.02906082011759281,
-0.012091309763491154,
0.06229379400610924,
-0.012097593396902084,
-0... | 0.17143 |
# Write Ahead Log Ingesters temporarily store data in memory. In the event of a crash, there could be data loss. The Write Ahead Log (WAL) helps fill this gap in reliability. The WAL in Grafana Loki records incoming data and stores it on the local file system in order to guarantee persistence of acknowledged data in th... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/wal.md | main | loki | [
-0.02045850083231926,
-0.022128242999315262,
0.025215724483132362,
0.005624218378216028,
-0.0031331260688602924,
0.0005416733329184353,
0.0007705632597208023,
0.043607957661151886,
0.0781916081905365,
0.10936133563518524,
-0.018564267084002495,
0.08460137993097305,
-0.02817632630467415,
-0... | 0.251243 |
pressure during WAL replays, allowing a WAL many times larger than available memory to be replayed. This is provided to minimize reconciliation time after very bad situations, i.e. an outage, and will likely not impact regular operations/rollouts \_at all\_. We suggest setting this to a high percentage (~75%) of availa... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/wal.md | main | loki | [
0.023446733132004738,
0.0008526957826688886,
0.02472616359591484,
0.030804596841335297,
-0.008131435140967369,
-0.011799816973507404,
-0.002127081388607621,
0.0009997360175475478,
-0.026822933927178383,
0.0820150300860405,
-0.01586730033159256,
0.11322859674692154,
-0.07480786740779877,
-0... | 0.032716 |
on. Much of this stems from immutable fields on the specification. For example, if one wants to start using the WAL with single store Loki and wants separate volume mounts for the WAL and the boltdb-shipper, you may see immutability errors when attempting updates the Kubernetes StatefulSets. In this case, try `kubectl ... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/wal.md | main | loki | [
0.005965816788375378,
-0.023942673578858376,
0.06606936454772949,
0.0057394434697926044,
-0.03175313025712967,
-0.0011740258196368814,
-0.029031801968812943,
-0.021168608218431473,
0.026385532692074776,
0.04894028976559639,
-0.023540912196040154,
0.014474638737738132,
-0.01327657699584961,
... | 0.107443 |
# Log entry deletion Grafana Loki supports the deletion of log entries from a specified stream. Log entries that fall within a specified time window and match an optional line filter are those that will be deleted. Log entry deletion is supported \_only\_ when TSDB or BoltDB shipper is configured as the index store. Th... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/logs-deletion.md | main | loki | [
-0.11247000098228455,
-0.025675741955637932,
-0.06401951611042023,
0.059689026325941086,
0.014877675101161003,
-0.054133303463459015,
-0.04089885950088501,
-0.07358724623918533,
0.07943596690893173,
0.06091509014368057,
-0.02537304162979126,
0.06279086321592331,
-0.005212909076362848,
0.01... | 0.161587 |
# Manage storage You can read a high level overview of Loki storage [here](https://grafana.com/docs/loki//configure/storage/) Grafana Loki needs to store two different types of data: \*\*chunks\*\* and \*\*indexes\*\*. When using Accelerated Search (experimental), then a third data type is used: \*\*bloom blocks\*\*. L... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/_index.md | main | loki | [
-0.08070982992649078,
0.012194394133985043,
-0.12490082532167435,
0.07036042213439941,
-0.028852270916104317,
-0.05227784067392349,
-0.012460753321647644,
-0.050140831619501114,
0.014689745381474495,
0.01590048149228096,
0.02116580493748188,
0.003509150817990303,
0.004565057810395956,
-0.0... | 0.138141 |
IAM `Writer` role is needed. See the [IBM Cloud Object Storage section](https://grafana.com/docs/loki//configure/storage/#ibm-deployment-cos-single-store) on the storage page for a detailed setup guide. ## Chunk Format ``` // Header +-----------------------------------+ | Magic Number (uint32, 4 bytes) | +-------------... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/_index.md | main | loki | [
-0.09368623048067093,
-0.0010318896966055036,
-0.10534073412418365,
0.006994276307523251,
-0.11263817548751831,
-0.023378916084766388,
-0.05916469544172287,
0.008811400271952152,
0.004144084174185991,
0.07014620304107666,
0.02932649850845337,
-0.045657187700271606,
0.019430940970778465,
-0... | 0.120626 |
# Filesystem object store The filesystem object store is the easiest to get started with Grafana Loki but there are some pros/cons to this approach. Very simply it stores all the objects (chunks) in the specified directory: ```yaml storage\_config: filesystem: directory: /tmp/loki/ ``` A folder is created for every ten... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/filesystem.md | main | loki | [
-0.05449685826897621,
-0.05680830031633377,
-0.12268444895744324,
0.02731756493449211,
-0.02801712416112423,
-0.0549207404255867,
-0.06854663789272308,
0.07211180031299591,
0.005147394258528948,
0.04348873719573021,
0.035046450793743134,
0.021097859367728233,
0.007441207300871611,
0.045301... | 0.148071 |
# Storage schema To support iterations over the storage layer contents, Loki has a configurable storage schema. The schema is defined to apply over periods of time. A `from` value marks the starting point of that schema. The schema is active until another entry defines a new schema with a new `from` date. . If you are using either TSDB (recommended), or BoltDB (deprecated) you do not need the Table Manager. {{< /admonition >}} Grafana Loki supports storing... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/table-manager/_index.md | main | loki | [
-0.06584034860134125,
-0.029173720628023148,
-0.0751120075583458,
0.08613867312669754,
-0.0366092212498188,
-0.03412296622991562,
0.0007987844874151051,
-0.013018322177231312,
-0.000003828950866591185,
0.07593385875225067,
0.013359764590859413,
-0.016867399215698242,
0.013404354453086853,
... | 0.147195 |
prefix: loki\_ period: 168h - from: 2019-04-15 store: dynamo schema: v11 index: prefix: loki\_ period: 168h ``` ### Table creation The Table Manager creates new tables slightly ahead of their start period, in order to make sure that the new table is ready once the current table end period is reached. The `creation\_gra... | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/table-manager/_index.md | main | loki | [
-0.1036648079752922,
-0.011662676930427551,
-0.04383951425552368,
0.042387865483760834,
0.010715137235820293,
-0.053864460438489914,
-0.05795305222272873,
-0.07888801395893097,
0.06435158103704453,
0.06003297120332718,
0.08817239850759506,
-0.00439579039812088,
0.07253354787826538,
-0.0387... | 0.05676 |
a production grade deployment example at [`table-manager.libsonnet`](https://github.com/grafana/loki/blob/main/production/ksonnet/loki/table-manager.libsonnet). | https://github.com/grafana/loki/blob/main//docs/sources/operations/storage/table-manager/_index.md | main | loki | [
-0.018688581883907318,
-0.07379953563213348,
-0.07169220596551895,
-0.03809714689850807,
-0.01061881985515356,
-0.04242578148841858,
-0.00839780829846859,
-0.014759480021893978,
-0.10044598579406738,
0.09435472637414932,
0.07581596821546555,
0.0005232844268903136,
0.041481222957372665,
0.0... | 0.084264 |
# Isolate tenant workflows using shuffle sharding Shuffle sharding is a resource-management technique used to isolate tenant workloads from other tenant workloads, to give each tenant more of a single-tenant experience when running in a shared cluster. This technique is explained by AWS in their article [Workload isola... | https://github.com/grafana/loki/blob/main//docs/sources/operations/shuffle-sharding/_index.md | main | loki | [
-0.013138110749423504,
0.02829696796834469,
-0.008543589152395725,
0.029447369277477264,
-0.004983284045010805,
-0.022054016590118408,
0.019095592200756073,
-0.13340549170970917,
0.04950491711497307,
-0.03415311872959137,
0.0031468230299651623,
0.047471415251493454,
0.07228875160217285,
-0... | 0.063393 |
The per-tenant configuration parameter `max\_query\_parallelism` describes how many sub queries, after query splitting and query sharding, can be scheduled to run at the same time for each request of any tenant. Configuration parameter `querier.concurrency` controls the quantity of worker threads (goroutines) per singl... | https://github.com/grafana/loki/blob/main//docs/sources/operations/shuffle-sharding/_index.md | main | loki | [
0.05017038434743881,
-0.06146194040775299,
-0.0318593755364418,
0.021096134558320045,
-0.08647555112838745,
-0.019815804436802864,
-0.021196793764829636,
-0.09351857751607895,
-0.003467384958639741,
-0.061547234654426575,
0.016803832724690437,
0.00681240763515234,
0.018925020471215248,
-0.... | 0.001188 |
# Audit data propagation latency and correctness using Loki Canary Loki Canary is a standalone app that audits the log-capturing performance of a Grafana Loki cluster. This component emits and periodically queries for logs, making sure that Loki is ingesting logs without any data loss. When something is wrong with Loki... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-canary/_index.md | main | loki | [
-0.02365664578974247,
0.019015302881598473,
-0.04594134911894798,
0.04160519316792488,
0.031794510781764984,
-0.12636765837669373,
-0.012993273325264454,
-0.009881936013698578,
0.047939956188201904,
0.025333436205983162,
-0.02899259887635708,
-0.06437293440103531,
-0.028348132967948914,
0.... | 0.23808 |
have a list of 16 entries it will query every minute (default `spot-check-query-rate` interval is 1m), so be aware of the query load this can put on Loki if you have a lot of canaries. \_\_NOTE:\_\_ if you are using `out-of-order-percentage` to test ingestion of out-of-order log lines be sure not to set the two out of ... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-canary/_index.md | main | loki | [
-0.07372914999723434,
-0.012670251540839672,
-0.007356143556535244,
0.03075176477432251,
-0.04089516028761864,
-0.08439697325229645,
-0.03418653458356857,
0.013723867945373058,
-0.021288378164172173,
-0.002601292682811618,
-0.05073762312531471,
-0.0772576630115509,
0.04141068458557129,
0.0... | 0.086543 |
loki-canary resources: {} --- apiVersion: v1 kind: Service metadata: name: loki-canary labels: app: loki-canary spec: type: ClusterIP selector: app: loki-canary ports: - name: metrics protocol: TCP port: 3500 targetPort: 3500 ``` DaemonSet Implementation of loki-canary ``` --- kind: DaemonSet apiVersion: extensions/v1b... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-canary/_index.md | main | loki | [
0.03597799316048622,
-0.0033477204851806164,
-0.05999733880162239,
-0.017673613503575325,
0.06384270638227463,
-0.024186372756958008,
-0.03423517569899559,
0.0007967062992975116,
0.008459262549877167,
-0.0003629772982094437,
0.037801843136548996,
-0.07034336775541306,
-0.04388587176799774,
... | 0.165855 |
in the log selector (default "name") -labelvalue string The unique label value for this instance of loki-canary to use in the log selector (default "loki-canary") -max-wait duration Duration to keep querying Loki for missing websocket entries before reporting them missing (default 5m0s) -metric-test-interval duration T... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-canary/_index.md | main | loki | [
0.02048996463418007,
-0.003736165352165699,
-0.07496907562017441,
0.03414396941661835,
-0.012013549916446209,
-0.02977379970252514,
-0.003586363047361374,
0.0036742056254297495,
0.021257219836115837,
-0.021046316251158714,
0.04592951387166977,
-0.06888309866189957,
-0.022838056087493896,
0... | 0.153085 |
both label pairs if no additional label exists. Labels can be added when Alloy scrapes the logs. ### Scrape logs Scrape the `/var/log/loki-canary.log` file with Alloy. ```alloy loki.source.file "canary" { forward\_to = [loki.write.local.receiver] targets = [{ \_\_path\_\_ = "/var/log/loki-canary.log", job = "loki\_cana... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-canary/_index.md | main | loki | [
-0.07504823803901672,
0.02126176469027996,
-0.04611748084425926,
0.06009465083479881,
0.03819267824292183,
-0.00017557114188093692,
0.06383902579545975,
0.002887232694774866,
0.010505510494112968,
-0.0632357969880104,
0.034674134105443954,
-0.07550002634525299,
0.03202701359987259,
0.03652... | 0.185491 |
# Loki deployment user interface {{< admonition type="warning" >}} The Loki Deployment UI is experimental and subject to change. Before attempting to deploy the Loki UI, make sure to consult the [Considerations](#considerations) section. {{< /admonition >}} The Loki Deployment UI is a web-based user interface that allo... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-ui/_index.md | main | loki | [
-0.018191464245319366,
-0.041827768087387085,
0.00878065824508667,
-0.026459095999598503,
-0.005004575941711664,
-0.06806670129299164,
-0.04953765124082565,
0.009414272382855415,
-0.07379782199859619,
0.06912793964147568,
0.07938158512115479,
-0.044755782932043076,
-0.011712251231074333,
0... | 0.126768 |
will also include any unique identifiers such as pod hashes or zone information. - \*\*Target\*\*: The target is classifies the type of component the node is. This can be a distributor, ingester, querier, etc. - \*\*Version\*\*: The version of the component. This is based upon the container image tag. - \*\*Build Date\... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-ui/_index.md | main | loki | [
-0.04164288192987442,
0.01421197410672903,
0.005448585841804743,
-0.0017832061275839806,
0.059582825750112534,
0.03883473202586174,
0.04395333677530289,
-0.03941342607140541,
-0.013944077305495739,
-0.0027506218757480383,
0.03708240017294884,
0.006426055915653706,
0.016404172405600548,
-0.... | 0.209518 |
feature is coming soon. {{< /admonition >}} ### Analyze Labels Analyze Labels page allows you to analyze label distribution across your log streams within a given tenant and timerange. This feature is useful for understanding label cardinality. The tool can be broken down into three sections: 1. \*\*Analyze Labels\*\*:... | https://github.com/grafana/loki/blob/main//docs/sources/operations/loki-ui/_index.md | main | loki | [
-0.007076635956764221,
0.07160067558288574,
-0.09293454140424728,
0.04721083864569664,
0.07809820026159286,
0.016161102801561356,
0.05920973792672157,
-0.028773406520485878,
0.039886459708213806,
-0.05044885352253914,
0.0443241186439991,
-0.0992952361702919,
0.0025687948800623417,
0.070660... | 0.0967 |
# Governance This document describes the rules and governance of the project. It is meant to be followed by all the developers of the project and the Loki community. Common terminology used in this governance document are listed below: - \*\*Team members\*\*: Any members of the private [team mailing list][team]. - \*\*... | https://github.com/grafana/loki/blob/main//docs/sources/community/governance.md | main | loki | [
-0.12623195350170135,
-0.024313705042004585,
-0.055379562079906464,
-0.026771027594804764,
-0.0218550655990839,
-0.03974839672446251,
-0.019457664340734482,
-0.023033900186419487,
0.03648139536380768,
0.0350254587829113,
0.0005552384536713362,
-0.06037384271621704,
0.018968569114804268,
0.... | 0.201462 |
- Li Guozhong - [liguozhong](https://github.com/liguozhong) ([Alibaba Cloud](https://alibabacloud.com/)) - Michel Hollands - [michelhollands](https://github.com/michelhollands) ([Grafana Labs](/)) - Owen Diehl - [owen-d](https://github.com/owen-d) ([Grafana Labs](/)) - Periklis Tsirakidis - [periklis](https://github.co... | https://github.com/grafana/loki/blob/main//docs/sources/community/governance.md | main | loki | [
-0.1299651563167572,
-0.007027360610663891,
-0.07130163908004761,
-0.034481290727853775,
0.05995994806289673,
0.023689838126301765,
-0.023102832958102226,
0.03401181101799011,
-0.026111407205462456,
0.016260705888271332,
0.048389945179224014,
-0.026480169966816902,
-0.06029334291815758,
0.... | 0.158825 |
limited to [team members](#team-members). ### Consensus The default decision making mechanism for the Loki project is [rough][rough] consensus. This means that any decision on technical issues is considered supported by the [team][team] as long as nobody objects or the objection has been considered but not necessarily ... | https://github.com/grafana/loki/blob/main//docs/sources/community/governance.md | main | loki | [
-0.07559797912836075,
-0.0020859786309301853,
0.03369394317269325,
-0.035647232085466385,
0.01819736883044243,
-0.06836438924074173,
-0.017389576882123947,
0.03353811800479889,
0.03850884363055229,
0.04662080854177475,
-0.04695736616849899,
-0.0019059792393818498,
0.03262079134583473,
0.08... | 0.100118 |
team membership. - added to the projects with commit rights. - added to the [team mailing list][team]. ### Offboarding The ex-member is - removed from the list of [team members](#team-members). Ideally by sending a PR of their own, at least approving said PR. In case of forced removal, no approval is needed. - removed ... | https://github.com/grafana/loki/blob/main//docs/sources/community/governance.md | main | loki | [
-0.12672510743141174,
-0.009559988044202328,
0.011639307253062725,
0.005912251304835081,
0.09242033213376999,
-0.026067208498716354,
0.0933404192328453,
-0.03923483565449715,
0.019459528848528862,
0.014027930796146393,
0.06176910921931267,
0.010085461661219597,
0.04435650631785393,
0.00939... | 0.098398 |
# Contacting the Loki Team For questions regarding Loki: - Ask a question in the `#loki` channel of our [Slack](https://slack.grafana.com/) community - Open source Loki users are welcome to post technical questions on the Grafana Labs Community Forums under the Grafana Loki category at [community.grafana.com](https://c... | https://github.com/grafana/loki/blob/main//docs/sources/community/getting-in-touch.md | main | loki | [
-0.10606168210506439,
-0.07508085668087006,
-0.046263810247182846,
0.018102142959833145,
-0.0011259329039603472,
-0.07381356507539749,
-0.07976832240819931,
0.026968687772750854,
-0.05465805158019066,
0.07429321855306625,
-0.0008355040336027741,
-0.04144912585616112,
-0.0003968249075114727,
... | 0.139001 |
# Contributing to Loki Loki uses [GitHub](https://github.com/grafana/loki) to manage reviews of pull requests: - If you have a trivial fix or improvement, go ahead and create a pull request. - If you plan to do something more involved, discuss your ideas on the relevant GitHub issue (creating one if it doesn't exist). ... | https://github.com/grafana/loki/blob/main//docs/sources/community/contributing.md | main | loki | [
-0.05039187893271446,
-0.08432193100452423,
-0.01331778522580862,
-0.020068781450390816,
-0.018056310713291168,
-0.012305800803005695,
-0.021468080580234528,
0.07894422113895416,
0.0025960910134017467,
0.055242329835891724,
0.04514284431934357,
-0.04664907231926918,
-0.008578294888138771,
... | 0.070748 |
# XXXX: Template > \_NOTE: the file should be named `\_DRAFT\_.md` and be placed in the `docs/sources/lids` directory. Once accepted, it will be assigned a LID number and the file will be renamed by the sponsor. > \*\*Remove this section before submitting, and retain the structure of this document.\*\*\_ \*\*Author:\*\... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/template.md | main | loki | [
-0.08848016709089279,
0.11705069243907928,
0.0214780755341053,
0.012247378937900066,
0.10697968304157257,
-0.01600574143230915,
0.051925040781497955,
-0.02885017730295658,
-0.023076636716723442,
0.08524315804243088,
-0.03163992241024971,
-0.026415009051561356,
0.01165949646383524,
-0.03695... | 0.108933 |
# 0002: Remote Rule Evaluation \*\*Author:\*\* Danny Kopping (danny.kopping@grafana.com) \*\*Date:\*\* 01/2023 \*\*Sponsor(s):\*\* @dannykopping \*\*Type:\*\* Feature \*\*Status:\*\* Accepted \*\*Related issues/PRs:\*\* https://github.com/grafana/mimir/pull/1536 \*\*Thread from [mailing list](https://groups.google.com/... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0002-RemoteRuleEvaluation.md | main | loki | [
-0.1317678987979889,
0.0122196851298213,
-0.02625449188053608,
-0.04936512932181358,
-0.007432642392814159,
-0.07527361065149307,
-0.014138739556074142,
-0.020386535674333572,
-0.02118072286248207,
0.04130743816494942,
0.013264579698443413,
-0.00806894339621067,
0.059726011008024216,
-0.00... | 0.17071 |
groups have more expensive queries than others. Another consequence of this is that rule groups execute sequentially, so expensive queries can cause subsequent rules in the group to be delayed or even missed. Rule groups are evaluated concurrently. Rule-based sharding distributes rules evenly across all available `rule... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0002-RemoteRuleEvaluation.md | main | loki | [
0.04877832531929016,
-0.013849073089659214,
-0.01703503355383873,
0.01456004660576582,
-0.04776667058467865,
-0.0768422782421112,
-0.07001840323209763,
-0.0915970578789711,
0.07983698695898056,
-0.018518967553973198,
0.015214098617434502,
0.025201331824064255,
0.0431194044649601,
-0.039021... | -0.07897 |
# 0006: Expose Split Logic in API \*\*Author:\*\* Karsten Jeschkies (karsten.jeschkies@grafana.com) \*\*Date:\*\* 03/2025 \*\*Sponsor(s):\*\* @trevorwhitney \*\*Type:\*\* API \*\*Status:\*\* Review \*\*Related issues/PRs:\*\* N/A \*\*Thread from [mailing list](https://groups.google.com/forum/#!forum/lokiproject):\*\* N... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0006-api-expose-split.md | main | loki | [
-0.09548968821763992,
0.03434387221932411,
-0.004624254535883665,
-0.003976623527705669,
-0.03760361671447754,
-0.007977275177836418,
0.04013226181268692,
-0.011933221481740475,
0.017305226996541023,
0.010929184034466743,
-0.007358510047197342,
-0.06844969838857651,
0.07150932401418686,
-0... | 0.137951 |
- Arrow Flight RPC assumes the data is being queried on the first request. Which means all shards are available at the same time. However, the intent of this document is that shards can be queried independently. | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0006-api-expose-split.md | main | loki | [
0.07502596825361252,
-0.11149291694164276,
-0.009755435399711132,
0.08107268810272217,
-0.007937624119222164,
-0.04058760032057762,
-0.007359894458204508,
-0.06677389144897461,
0.06033477932214737,
-0.0034530654083937407,
0.01612946391105652,
0.10364294052124023,
-0.054990947246551514,
0.0... | 0.012154 |
# 0005: Loki mixin configuration improvements \*\*Author:\*\* Alexandre Chouinard (Daazku@gmail.com) \*\*Date:\*\* 03/2025 \*\*Sponsor(s):\*\* N/A \*\*Type:\*\* Feature \*\*Status:\*\* Draft \*\*Related issues/PRs:\*\* - [Issue #15881](https://github.com/grafana/loki/issues/15881) - [Issue #13631](https://github.com/gr... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0005-loki-mixin-configuration-improvements.md | main | loki | [
-0.13177186250686646,
-0.05690273642539978,
0.03281795606017113,
0.009611504152417183,
0.036151524633169174,
-0.03860408812761307,
-0.057064443826675415,
-0.030107341706752777,
-0.0845324769616127,
0.017086582258343697,
0.046199653297662735,
0.01628209836781025,
-0.027247706428170204,
0.03... | 0.10036 |
# 0004: Index Gateway Sharding \*\*Author:\*\* Christian Haudum (christian.haudum@grafana.com) \*\*Date:\*\* 02/2023 \*\*Sponsor(s):\*\* @chaudum @owen-d \*\*Type:\*\* Feature \*\*Status:\*\* Rejected / Not Implemented \*\*Related issues/PRs:\*\* \*\*Thread from [mailing list](https://groups.google.com/forum/#!forum/lo... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0004-IndexGatewaySharding.md | main | loki | [
-0.042321961373090744,
0.022020651027560234,
0.025952288880944252,
0.024229828268289566,
-0.046468742191791534,
-0.043553151190280914,
0.016876017674803734,
-0.10746118426322937,
-0.048580847680568695,
-0.013639850541949272,
-0.010805987752974033,
0.009229020215570927,
0.03564709052443504,
... | 0.120612 |
allows to utilize a certain amount of `n` instances. The amount of shards can be implemented as a per-tenant override setting. This would allow to use different amount of instances for each tenant. However, this approach results in non-deterministic hash keys. ### Proposal 3: Shard by index files In order to answer req... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0004-IndexGatewaySharding.md | main | loki | [
0.08433613926172256,
-0.0022745796013623476,
0.01613372378051281,
0.01096422877162695,
-0.029017332941293716,
-0.03575488552451134,
-0.024765977635979652,
-0.07385283708572388,
0.1094968393445015,
-0.022531406953930855,
0.001094861887395382,
0.05073104053735733,
0.029366210103034973,
-0.00... | 0.022556 |
# 0003: Query fairness across users within tenants \*\*Author:\*\* Christian Haudum () \*\*Date:\*\* 02/2023 \*\*Sponsor(s):\*\* @chaudum @owen-d \*\*Type:\*\* Feature \*\*Status:\*\* Accepted \*\*Related issues/PRs:\*\* \*\*Thread from [mailing list](https://groups.google.com/forum/#!forum/lokiproject):\*\* --- ## Bac... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0003-QueryFairnessInScheduler.md | main | loki | [
-0.03777247667312622,
-0.019144516438245773,
0.021386366337537766,
0.026309257373213768,
-0.05563659965991974,
-0.027831824496388435,
0.027181433513760567,
-0.09121033549308777,
-0.03602312505245209,
0.026144417002797127,
0.0049512954428792,
-0.0500907227396965,
0.05703389644622803,
0.0042... | 0.085091 |
(that does not exist yet in Loki) leaks into the scheduler domain. \*\*Pros:\*\* \* Relatively simple to to implement \*\*Cons:\*\* \* Not extensible \* Leaks domain knowledge ### Proposal 2: Fully hierarchical scheduler This proposal is similar to \_Proposal 1\_, but with the difference that there are no fixed levels ... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0003-QueryFairnessInScheduler.md | main | loki | [
-0.09079557657241821,
-0.008144493214786053,
-0.0009865355677902699,
0.027781391516327858,
-0.020753834396600723,
-0.0551772303879261,
0.0016219352837651968,
-0.054355308413505554,
0.04681524261832237,
0.014944260939955711,
-0.017757093533873558,
-0.037458062171936035,
0.05040441080927849,
... | 0.112903 |
# 0001: Introducing LIDs \*\*Author:\*\* Danny Kopping (danny.kopping@grafana.com) \*\*Date:\*\* 01/2023 \*\*Sponsor(s):\*\* @dannykopping \*\*Type:\*\* Process \*\*Status:\*\* Accepted \*\*Related issues/PRs:\*\* N/A \*\*Thread from [mailing list](https://groups.google.com/forum/#!forum/lokiproject):\*\* N/A --- ## Ba... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/0001-Introduction.md | main | loki | [
-0.15325170755386353,
0.027807684615254402,
0.05403228476643562,
-0.028002839535474777,
0.04069904983043671,
-0.027661679312586784,
0.019256170839071274,
0.011710475198924541,
-0.03303627669811249,
0.06795503944158554,
-0.029194144532084465,
-0.051903966814279556,
-0.00018254021415486932,
... | 0.164654 |
# Loki Improvement Documents (LIDs) ## Purpose Loki Improvement Documents (\_LIDs\_) are proposals for modifying Grafana Loki's feature-set and/or processes. These documents serve to promote engagement between the community and maintainers \_before\_ making large changes to Grafana Loki. This ensures that we will only ... | https://github.com/grafana/loki/blob/main//docs/sources/community/lids/_index.md | main | loki | [
-0.09376022219657898,
0.021353747695684433,
0.019127052277326584,
-0.04389932379126549,
0.02576981671154499,
-0.04817179590463638,
0.023420425131917,
-0.010551934130489826,
-0.0599251352250576,
0.056142814457416534,
-0.003394676372408867,
-0.04578576609492302,
-0.02359115518629551,
0.04774... | 0.165855 |
# Releasing Loki Build Image The [`loki-build-image`](https://github.com/grafana/loki/blob/main/loki-build-image) is the Docker image used to run tests and build Grafana Loki binaries in CI. The build and publish process of the image is triggered upon a merge to `main` if any changes were made in the folder `./loki-bui... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release-loki-build-image.md | main | loki | [
-0.0156673826277256,
0.012113656848669052,
0.00027086728368885815,
-0.031565017998218536,
-0.0024656231980770826,
-0.09028203040361404,
-0.09148205816745758,
0.014674017205834389,
-0.0031246531289070845,
0.08688993752002716,
0.009939497336745262,
-0.10809799283742905,
0.01615787111222744,
... | 0.039928 |
# Prepare Upgrade guide The upgrade guide records changes that require user attention or interaction to upgrade to specific Loki version from previous versions. ## Before you begin The upgrade guide in Grafana Loki works as follows. We have a `setup/upgrade/\_index.md` file that records upgrade information for all Loki... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/prepare-upgrade-guide.md | main | loki | [
-0.008833943866193295,
-0.025049105286598206,
0.041656624525785446,
-0.03852500766515732,
0.011400572955608368,
-0.05440979078412056,
-0.07352609187364578,
-0.05909767001867294,
-0.03653975948691368,
0.030340099707245827,
0.058397553861141205,
0.01962970197200775,
-0.02333008125424385,
-0.... | -0.001989 |
# Prepare Release Releasing Grafana Loki consists of merging a long-running release PR. Two workflows keep these PRs up to date, one for patch releases (which runs on commits to branches matching `release-[0-9]+.[0-9]+.x`) and one for minor releases (which runs on commits to branches matching `k[0-9]+`). These pipeline... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/prepare-release.md | main | loki | [
-0.04406484588980675,
-0.02351038157939911,
0.03732656314969063,
-0.030530760064721107,
-0.0010793128749355674,
-0.06555455178022385,
-0.10462890565395355,
0.006625518202781677,
-0.005167403724044561,
0.06203913688659668,
0.023562155663967133,
-0.02426571026444435,
-0.05612576752901077,
-0... | 0.071815 |
# Merge Release PR To release Loki, merge the release PR. This PR will have the title `chore(): release `. Here's what the 3.0 release PR looked like.  3.0 was the first major release using this new process, and enforcing conventional commits was relatively new. Going forward the r... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/merge-release-pr.md | main | loki | [
-0.0013922371435910463,
-0.024277828633785248,
0.036171622574329376,
-0.03443322703242302,
0.08189915120601654,
-0.08380448073148727,
-0.0903463214635849,
-0.020011750981211662,
0.0071955397725105286,
0.08524107933044434,
0.07463939487934113,
-0.024813035503029823,
0.013213551603257656,
-0... | 0.027333 |
# Backport commits Any PRs or commits not on the release branch that you want to include in the release must be backported to the release branch. ## Before you begin 1. Determine the [VERSION\_PREFIX](../concepts/version/). 2. If the release branch already has all the code changes on it, skip this step. ## Steps 1. Pic... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/backport-commits.md | main | loki | [
-0.07969802618026733,
-0.017472457140684128,
-0.04874342307448387,
-0.001116215018555522,
-0.006770648527890444,
0.02819899655878544,
0.015163186937570572,
0.04287270829081535,
-0.035644061863422394,
0.09270913898944855,
0.08387861400842667,
-0.04077040031552315,
0.03102472424507141,
-0.04... | 0.060293 |
# Patch Go version Update vulnerable Go version to non-vulnerable Go version to build Grafana Loki binaries. ## Before you begin. 1. Determine the [VERSION\_PREFIX](../concepts/version/). 1. Need to sign-in to Docker hub to be able to push Loki build image. ## Steps 1. Find Go version to which you need to update. Examp... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/patch-go-version.md | main | loki | [
0.009171847254037857,
0.016884444281458855,
0.01648596115410328,
-0.06271039694547653,
-0.015414661727845669,
-0.023023635149002075,
-0.09606213122606277,
0.0005000364035367966,
-0.04161814600229263,
0.04214450344443321,
0.04239973425865173,
-0.07702558487653732,
-0.027542579919099808,
0.0... | -0.018898 |
# Update version numbers Upgrade the Loki version to the new release version in documents, examples, jsonnets, etc. ## Before you begin 1. Determine the [VERSION\_PREFIX](../concepts/version/). 2. Skip this step if you are doing a patch release on old release branch. Example: Latest release branch is `release-2.9.x` bu... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/update-version-numbers.md | main | loki | [
0.0036235779989510775,
-0.0210079587996006,
0.07620813697576523,
-0.03689088299870491,
0.037138842046260834,
-0.0660952478647232,
-0.033715710043907166,
0.027683405205607414,
-0.030990350991487503,
0.03059626743197441,
0.08429263532161713,
0.0018271866720169783,
-0.07723105698823929,
0.043... | 0.011 |
# Patch vulnerabilities This step patches vulnerabilities in Grafana Loki binaries and Docker images. ## Before you begin 1. Determine the [VERSION\_PREFIX](../concepts/version/). Vulnerabilities can be from two main sources. 1. Grafana Loki source code. 1. Grafana Loki dependencies. Grafana Loki dependencies can be 1.... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/patch-vulnerabilities.md | main | loki | [
-0.06751585751771927,
0.023252887651324272,
-0.0024781133979558945,
-0.04998641088604927,
-0.009900795295834541,
-0.06294656544923782,
-0.04979048669338226,
-0.00039028338505886495,
-0.06419365108013153,
0.038652367889881134,
0.02207169122993946,
-0.04385223984718323,
-0.02303878404200077,
... | 0.072377 |
# Prepare Major Release A major release follows the same process as [minor and patch releases](../prepare-release/), but requires a custom workflow to be created to run on the branch we want to release from. The reason for this is that we don't do major releases very often, so it is not economical to keep those workflo... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/major-release.md | main | loki | [
0.017334140837192535,
-0.04044777899980545,
0.04538599029183388,
-0.050116993486881256,
0.02534293197095394,
-0.06267345696687698,
-0.1253277063369751,
-0.00172702525742352,
0.032613158226013184,
0.0319259874522686,
0.04750349000096321,
0.038133393973112106,
-0.04096793010830879,
-0.021297... | 0.036787 |
# Document metrics and configurations changes Any metrics and configurations that are removed or modified need to be documented in the upgrade guide. Configurations whose default values changed should also be documented in the upgrade guide. ## Before you begin All the steps are performed on `release-VERSION\_PREFIX` b... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/document-metrics-configurations-changes.md | main | loki | [
0.013579797931015491,
-0.020848294720053673,
0.0513681098818779,
-0.04485759511590004,
0.047460611909627914,
-0.1059470847249031,
-0.05285578966140747,
-0.03795989975333214,
-0.05058271437883377,
0.02684619091451168,
0.06008460000157356,
0.016856318339705467,
-0.016495313495397568,
-0.0226... | -0.047009 |
# Create Release Branch A single release branch is created for every `major` or `minor` release (not for patch releases). That release branch is then used for all the Stable Releases, and all Patch Releases for that `major` and `minor` versions of the Grafana Loki. ## Before you begin 1. Determine the [VERSION\_PREFIX]... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/create-release-branch.md | main | loki | [
-0.006572145968675613,
-0.06811381131410599,
0.02931937761604786,
-0.009650442749261856,
-0.044205084443092346,
-0.03977736458182335,
-0.0713328942656517,
0.01213157456368208,
-0.04344898834824562,
0.09346739947795868,
0.013292004354298115,
-0.03755031153559685,
-0.04211462661623955,
0.023... | 0.070963 |
# Releasing Grafana Loki This document is a series of instructions for core Grafana Loki maintainers to be able to publish a new [Grafana Loki](https://github.com/grafana/loki) release. The general process for releasing a new version of Grafana Loki is to merge the release PR for that version. Every commit to branches ... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/_index.md | main | loki | [
-0.07337234169244766,
-0.028092460706830025,
0.014947999268770218,
-0.02835208736360073,
-0.02968035824596882,
-0.05915828049182892,
-0.08455124497413635,
-0.002263726433739066,
0.009828643873333931,
0.0729406476020813,
0.04948872700333595,
0.008883039467036724,
-0.03588893637061119,
-0.04... | 0.126393 |
# Version Grafana Loki uses Semantic Versioning. The next version can be determined by looking at the current version and incrementing it. When the release is a new `major` version (for example, after 2.9.1 we decide to go 3.0.0 instead of 2.9.2) this should not be done. You need to set two environmental values `VERSIO... | https://github.com/grafana/loki/blob/main//docs/sources/community/maintaining/release/concepts/version.md | main | loki | [
-0.022126097232103348,
-0.045252908021211624,
0.04936566203832626,
-0.08507538586854935,
0.01242811419069767,
-0.0523153655230999,
-0.10030579566955566,
-0.004009307827800512,
-0.045328155159950256,
0.021550044417381287,
0.03491895645856857,
-0.05351853370666504,
-0.09164739400148392,
0.00... | 0.015274 |
# Promtail Push API - Author: Robert Fratto (@rfratto) - Date: Feb 4 2020 - Status: DRAFT Despite being an optional piece of software, Promtail provides half the power of Loki's story: log transformations, service discovery, metrics from logs, and context switching between your existing metrics and logs. Today, Promtai... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2020-02-Promtail-Push-API.md | main | loki | [
-0.04346819594502449,
-0.05136243999004364,
-0.028577759861946106,
0.012557745911180973,
-0.006866784766316414,
-0.09596161544322968,
-0.02970043569803238,
0.05669381469488144,
-0.00827303808182478,
0.06073179841041565,
0.0028446807991713285,
-0.014963402412831783,
-0.011495587415993214,
0... | 0.13754 |
Option 2: gRPC Service The [logproto.Pusher](https://github.com/grafana/loki/blob/f7ee1c753c76ef63338d53cfba782188a165144d/pkg/logproto/logproto.proto#L8-L10) service could be exposed through Promtail. This would enable clients stubs to be generated for languages that have gRPC support, and, for HTTP1 support, a [gRPC ... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2020-02-Promtail-Push-API.md | main | loki | [
-0.0764707550406456,
-0.07962293177843094,
-0.06032031401991844,
-0.08041374385356903,
-0.03384765237569809,
-0.08386863768100739,
0.011753077618777752,
0.04550964757800102,
-0.012422137893736362,
0.053013380616903305,
0.004336958285421133,
-0.013080851174890995,
-0.041655853390693665,
0.0... | 0.079364 |
## Write-Ahead Logs Author: Owen Diehl - [owen-d](https://github.com/owen-d) ([Grafana Labs](/)) Date: 30/09/2020 ## Impetus Loki already takes numerous steps to ensure the persistence of log data, most notably the use of a configurable replication factor (redundancy) in the ingesters. However, this still leaves much t... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2020-09-Write-Ahead-Log.md | main | loki | [
-0.05513354018330574,
-0.017504701390862465,
-0.027101460844278336,
0.010188769549131393,
-0.009801513515412807,
-0.039733219891786575,
-0.003580936463549733,
0.01752513274550438,
-0.005413193255662918,
0.09341052174568176,
-0.04276049882173538,
0.05324560031294823,
0.004656614735722542,
-... | 0.19493 |
ingester receives a push, containing the fingerprint of the series it refers to and a list of `(timestamp, log\_line)` tuples, \_after\_ a `Stream` record type is written, if applicable. ```golang type LogsRecord struct { UserID string Fingperprint uint64 // label fingerprint for the series these logs refer to Entries ... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2020-09-Write-Ahead-Log.md | main | loki | [
-0.061439160257577896,
-0.004976911470293999,
0.0011426418786868453,
0.002985386410728097,
-0.009371341206133366,
-0.015917373821139336,
0.05605992302298546,
0.022714123129844666,
-0.04075033590197563,
0.03144388645887375,
0.015227272175252438,
0.05000711604952812,
-0.05440429970622063,
-0... | 0.162634 |
-> `Series` -> `Samples` such that we could no-op the later (lesser priority) types that are superseded by the former types. The benefits do not seem worth the cost here, especially considering the simpler suggested alternative and the extensibility costs if we need to add new record types if/when the ingester changes ... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2020-09-Write-Ahead-Log.md | main | loki | [
-0.1251354217529297,
-0.04888992756605148,
0.015689117833971977,
-0.005541226826608181,
0.019156591966748238,
0.06502720713615417,
-0.03670160844922066,
0.025261705741286278,
0.04416899383068085,
-0.015143209137022495,
-0.018607543781399727,
0.045775797218084335,
-0.08007656037807465,
-0.0... | 0.163833 |
# Labels Author: Ed Welch Date: February 2019 This is the official version of this doc as of 2019/04/03, the original discussion was had via a [Google doc](https://docs.google.com/document/d/16y\_XFux4h2oQkJdfQgMjqu3PUxMBAq71FoKC\_SkHzvk/edit?usp=sharing), which is being kept for posterity but will not be updated movin... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/labels.md | main | loki | [
-0.043128855526447296,
0.03337211161851883,
0.019994191825389862,
0.010553611442446709,
0.0881841629743576,
0.022293224930763245,
0.054818831384181976,
-0.019932014867663383,
0.03810003027319908,
-0.03033611923456192,
0.020241158083081245,
0.024831010028719902,
0.01993563212454319,
0.04762... | 0.099881 |
### Details As mentioned previously in the challenges for working with unstructured data, there isn’t a good one size fits all solution for extracting structured data. The Docker log format is an example where multiple levels of processing may be required, where the docker log is json, however, it also contains the log... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/labels.md | main | loki | [
-0.029308758676052094,
0.09692849963903427,
0.04644991084933281,
0.003996842075139284,
-0.01670963130891323,
-0.0800691619515419,
0.022313885390758514,
0.05579158291220665,
-0.025741280987858772,
-0.015188603661954403,
-0.049395784735679626,
-0.06917563825845718,
-0.020284172147512436,
0.0... | 0.085444 |
``` ① Similar to the json parser, if your log label matches the regex named group, you need only specify the label name as a yaml key ② If you had a use case for specifying a different label name from the regex group name you can optionally provide the `source` key with the value matching the named capture group. You c... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/labels.md | main | loki | [
-0.06437046825885773,
0.007156840059906244,
0.03770315647125244,
-0.016802605241537094,
0.03023519739508629,
-0.03094043955206871,
0.0673568919301033,
-0.022875536233186722,
0.06766171008348465,
-0.05730149894952774,
0.00038269907236099243,
-0.05686724931001663,
-0.02028018608689308,
0.071... | 0.059181 |
support loading code into the pipeline stages for even more advanced/powerful parsing capabilities. | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/labels.md | main | loki | [
-0.04345947131514549,
-0.034763798117637634,
0.017049023881554604,
0.0004786558565683663,
-0.06766969710588455,
-0.10659442096948624,
-0.08676525205373764,
0.046641938388347626,
-0.08082828670740128,
-0.05918295308947563,
-0.06963223963975906,
-0.012618663720786572,
-0.06457972526550293,
-... | 0.107992 |
## Ordering Constraint Removal Author: Owen Diehl - [owen-d](https://github.com/owen-d) ([Grafana Labs](/)) Date: 28/01/2021 ## Problem Loki imposes an ordering constraint on ingested data; that is to say incoming data must have monotonically increasing timestamps, partitioned by stream. This has historical inertia fro... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2021-01-Ordering-Constraint-Removal.md | main | loki | [
-0.07446762174367905,
-0.021364854648709297,
0.06746048480272293,
0.025086482986807823,
0.041360773146152496,
-0.047202326357364655,
-0.022483443841338158,
-0.02842596173286438,
0.06945919245481491,
0.06714938580989838,
0.019888486713171005,
0.012974572367966175,
0.02623770572245121,
0.060... | 0.080989 |
tree structure, enabling logarithmic inserts/lookups and `n log(n)` scans. \_Cutting\_ a block from the head block will iterate through this tree, creating a sorted block identical to the ones currently in use. However, because we'll be accepting arbitrarily-ordered writes, there will no longer be any guaranteed inter-... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2021-01-Ordering-Constraint-Removal.md | main | loki | [
-0.0910060852766037,
0.030380282551050186,
0.018911147490143776,
-0.013885977678000927,
0.01795744150876999,
-0.10741228610277176,
-0.024396823719143867,
-0.016735166311264038,
0.012320124544203281,
0.08243933320045471,
-0.019548408687114716,
0.04534608870744705,
0.016259251162409782,
-0.0... | 0.079975 |
timestamp ingested past this bound will trigger a cut. This process aids in increasing chunk determinism and therefore our deduplication ratio in object storage because chunks are [content addressed](https://en.wikipedia.org/wiki/Content-addressable\_storage). With the removal of our ordering constraint, it's possible ... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2021-01-Ordering-Constraint-Removal.md | main | loki | [
-0.10236133635044098,
0.014614371582865715,
0.08600375801324844,
0.0013374225236475468,
-0.010577957145869732,
-0.05181122571229935,
-0.007689795922487974,
-0.05765300616621971,
0.05115368962287903,
0.045271143317222595,
0.0010626278817653656,
0.049406543374061584,
-0.020454194396734238,
0... | 0.048804 |
a block index within it, or the pre-existing block format directly. These are stored on disk to lessen memory pressure and loaded for queries when necessary. ##### Block Index Incoming reads in an LSM-Tree may need access to the SSTable entries in addition to the currently active memtable (head block). In order to impr... | https://github.com/grafana/loki/blob/main//docs/sources/community/design-documents/2021-01-Ordering-Constraint-Removal.md | main | loki | [
-0.01578039489686489,
0.044222403317689896,
-0.012349438853561878,
0.051601216197013855,
0.019751787185668945,
-0.017107568681240082,
-0.03239712491631508,
0.033826712518930435,
-0.009303051978349686,
0.02055242285132408,
0.0038901756051927805,
0.08793939650058746,
0.02281077951192856,
-0.... | 0.064328 |
# Matching IP addresses LogQL supports matching IP addresses. With logs such as ``` 3.180.71.3 - - [17/May/2015:08:05:32 +0000] "GET /downloads/product\_1 HTTP/1.1" 304 0 "-" "Debian APT-HTTP/1.3 (0.8.16~exp12ubuntu10.21)" 80.91.33.133 - - [17/May/2015:08:05:14 +0000] "GET /downloads/product\_1 HTTP/1.1" 304 0 "-" "Deb... | https://github.com/grafana/loki/blob/main//docs/sources/query/ip.md | main | loki | [
0.021470127627253532,
-0.006557097192853689,
0.00469245994463563,
-0.10716108977794647,
0.016154298558831215,
-0.09354081749916077,
0.06530977785587311,
-0.059859465807676315,
0.06945984810590744,
0.059459201991558075,
0.05357297882437706,
-0.047657668590545654,
0.060375016182661057,
-0.00... | 0.003874 |
# Query best practices The way you write queries in Loki affects how quickly you get results returned from those queries. Understanding the way Loki parses queries can help you write queries that are efficient and performant. {{< admonition type="tip" >}} Before you start optimizing queries, read the [labels best pract... | https://github.com/grafana/loki/blob/main//docs/sources/query/bp-query.md | main | loki | [
-0.061008520424366,
0.02815660648047924,
-0.07928528636693954,
0.06870044022798538,
-0.09173282235860825,
-0.03815443441271782,
0.042975474148988724,
0.02944055385887623,
0.024329176172614098,
0.014531648717820644,
-0.014621572569012642,
-0.03132953867316246,
0.0028565244283527136,
0.01456... | 0.147592 |
log line and extract labels in different formats, which can be useful but are also more intensive for Loki to do than line filter expressions. Using them after line filter expressions means that Loki only needs to evaluate parser expressions for log lines that match the line filter expression, reducing the amount of lo... | https://github.com/grafana/loki/blob/main//docs/sources/query/bp-query.md | main | loki | [
-0.14964398741722107,
0.05507649853825569,
-0.026001760736107826,
0.023218726739287376,
-0.010067058727145195,
-0.06210937723517418,
0.010301093570888042,
-0.0027963609900325537,
0.016561312600970268,
0.005931769963353872,
-0.025843597948551178,
-0.0354284793138504,
-0.043520838022232056,
... | 0.165387 |
# Query examples These LogQL query examples have explanations of what the queries accomplish. ## Log query examples ### Examples that filter on IP address - Return log lines that are not within a range of IPv4 addresses: ```logql {job\_name="myapp"} != ip("192.168.4.5-192.168.4.20") ``` - This example matches log lines... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_examples.md | main | loki | [
0.039808038622140884,
0.0824093371629715,
-0.0007588100852444768,
-0.02605331502854824,
0.019720103591680527,
-0.037322547286748886,
0.08145834505558014,
-0.017076915130019188,
0.002693795133382082,
-0.018138619139790535,
-0.014900476671755314,
-0.02768685109913349,
0.05565118417143822,
-0... | 0.04223 |
the line format reduce the amount of information and creates a tabular output. For these given log lines: ```log level=info ts=2020-10-23T20:32:18.094668233Z caller=metrics.go:81 org\_id=29 traceID=1980d41501b57b68 latency=fast query="{cluster=\"ops-tools1\", job=\"loki-ops/query-frontend\"} |= \"query\_range\"" query\... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_examples.md | main | loki | [
-0.017037849873304367,
0.002985506085678935,
-0.03442326933145523,
0.03187781944870949,
-0.029751965776085854,
-0.11970148235559464,
0.0593075230717659,
-0.013832639902830124,
0.002181326039135456,
0.03705679997801781,
-0.021380973979830742,
-0.048973217606544495,
-0.014160282909870148,
0.... | 0.122739 |
# Metric queries {{< shared id="metric-queries" >}} Metric queries extend log queries by applying a function to log query results. This powerful feature creates metrics from logs. Metric queries can be used to calculate the rate of error messages or the top N log sources with the greatest quantity of logs over the last... | https://github.com/grafana/loki/blob/main//docs/sources/query/metric_queries.md | main | loki | [
-0.0705084279179573,
0.016903650015592575,
-0.015733424574136734,
0.03592044115066528,
-0.0525350384414196,
-0.06569547951221466,
0.0004989354056306183,
0.016814975067973137,
0.06414072215557098,
-0.03548352047801018,
-0.043921053409576416,
-0.05391502007842064,
0.023295056074857712,
0.026... | 0.246191 |
sample. Optionally the label identifier can be wrapped by a conversion function `| unwrap (label\_identifier)`, which will attempt to convert the label value from a specific format. We currently support the functions: - `duration\_seconds(label\_identifier)` (or its short equivalent `duration`) which will convert the l... | https://github.com/grafana/loki/blob/main//docs/sources/query/metric_queries.md | main | loki | [
-0.02370118722319603,
0.07451768219470978,
-0.0803922489285469,
-0.004663729574531317,
-0.023281730711460114,
0.03377912938594818,
0.021644311025738716,
0.05465564504265785,
-0.00658711651340127,
-0.10842270404100418,
0.02333032339811325,
-0.11963891983032227,
-0.008317001163959503,
0.0505... | 0.143233 |
`bottomk`. `topk` and `bottomk` are different from other aggregators in that a subset of the input samples, including the original labels, are returned in the result vector. `by` and `without` are only used to group the input vector. The `without` clause removes the listed labels from the resulting vector, keeping all ... | https://github.com/grafana/loki/blob/main//docs/sources/query/metric_queries.md | main | loki | [
-0.04814077913761139,
0.061825305223464966,
-0.013395730406045914,
0.02434319444000721,
0.03948872908949852,
-0.05484643206000328,
0.04476752504706383,
0.009643428027629852,
0.0882192850112915,
-0.011727198958396912,
0.01257589552551508,
0.042443886399269104,
0.06974207609891891,
-0.061267... | 0.077741 |
# Query acceleration {{< admonition type="warning" >}} In Loki and Grafana Enterprise Logs (GEL), Query acceleration using blooms is an [experimental feature](/docs/release-life-cycle/). Engineering and on-call support is not available. No SLA is provided. In Grafana Cloud, Query acceleration using Bloom filters is ena... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_acceleration.md | main | loki | [
-0.04240265488624573,
-0.0011206443887203932,
-0.016181910410523415,
0.07218895852565765,
-0.07055063545703888,
-0.09539530426263809,
0.017996082082390785,
-0.04790739342570305,
0.0050836168229579926,
0.062027011066675186,
-0.00575320515781641,
-0.016526835039258003,
0.004044993780553341,
... | 0.13965 |
# LogQL template functions The Go templating language is embedded in the Loki query language, LogQL. The [text template](https://golang.org/pkg/text/template) format used in `| line\_format` and `| label\_format` support the usage of functions. {{< admonition type="note" >}} In the examples below we use backticks to qu... | https://github.com/grafana/loki/blob/main//docs/sources/query/template_functions.md | main | loki | [
0.013514170423150063,
0.10720725357532501,
0.0036472545471042395,
0.006689864676445723,
-0.05621091648936272,
0.031508918851614,
0.06384127587080002,
0.07454764097929001,
0.025872852653265,
-0.022081999108195305,
0.0073561640456318855,
-0.07142920047044754,
-0.02443082258105278,
0.05103306... | 0.011141 |
and returns the time value it represents using the local timezone of the server running Loki. For more consistency between Loki installations, it's recommended to use `toDateInZone` The format string must use the exact date as defined in the [golang datetime layout](https://pkg.go.dev/time#pkg-constants) Signature: `to... | https://github.com/grafana/loki/blob/main//docs/sources/query/template_functions.md | main | loki | [
0.027789492160081863,
0.06095315143465996,
-0.007535944227129221,
-0.05150100961327553,
0.024638783186674118,
-0.006966202054172754,
-0.024662772193551064,
0.09490473568439484,
0.02272520773112774,
-0.0800507664680481,
-0.01922050677239895,
-0.10551977157592773,
-0.09341689199209213,
0.094... | 0.056953 |
returns the value of 'src'. Useful for JSON fields that can be missing, like HTTP headers in a log line that aren't required, as in the following example: ```logql {job="access\_log"} | json | line\_format `{{.http\_request\_headers\_x\_forwarded\_for | default "-"}}` ``` Signature: `default(d string, src string) strin... | https://github.com/grafana/loki/blob/main//docs/sources/query/template_functions.md | main | loki | [
-0.0799994021654129,
0.10770134627819061,
-0.012758947908878326,
0.013205454684793949,
-0.007905485108494759,
-0.04193483665585518,
0.018770908936858177,
0.039920076727867126,
0.03328034281730652,
-0.013730071485042572,
-0.028771238401532173,
-0.05189616233110428,
-0.01653871312737465,
0.0... | 0.019974 |
last example will return `Hello World`. ### trim The trim function removes space from either side of a string. Signature: `trim(string) string` Examples: ```template `{{ .ip | trim }}` `{{ trim " hello " }}` // output: hello ``` ### trimAll Use this function to remove given characters from the front or back of a string... | https://github.com/grafana/loki/blob/main//docs/sources/query/template_functions.md | main | loki | [
0.015500024892389774,
0.13397887349128723,
0.12060506641864777,
0.022043665871024132,
-0.042913082987070084,
-0.009744691662490368,
-0.03370928391814232,
0.07674939185380936,
-0.008741297759115696,
-0.0427461601793766,
-0.02060176432132721,
0.03696117177605629,
-0.01033420767635107,
-0.010... | -0.036907 |
1.25 ``` ### float64 Convert a string to a float64. Signature: `toFloat64(v interface{}) float64` Example: ```template `{{ "3.5" | float64 }}` //output 3.5 ``` ### floor Returns the greatest float value less than or equal to input value. Signature: `floor(a interface{}) float64` Example: ```template `{{ floor 123.9999 ... | https://github.com/grafana/loki/blob/main//docs/sources/query/template_functions.md | main | loki | [
0.004589184187352657,
0.11260560899972916,
-0.029573874548077583,
-0.07331673055887222,
-0.04899487644433975,
-0.06338588893413544,
-0.019347265362739563,
0.10397914797067642,
-0.09479699283838272,
-0.04569575563073158,
-0.059275783598423004,
-0.03961605578660965,
0.03811256214976311,
0.02... | 0.034102 |
Signature: regexReplaceAllLiteral(regex string, src string, replacement string) Example: ```template `{{ regexReplaceAllLiteral "(ts=)" .timestamp "timestamp=" }}` ``` | https://github.com/grafana/loki/blob/main//docs/sources/query/template_functions.md | main | loki | [
-0.02449202351272106,
0.10201095789670944,
0.09139331430196762,
0.00047790122334845364,
0.01627432182431221,
0.04394446313381195,
-0.018984196707606316,
0.057656459510326385,
0.004209520295262337,
-0.04348202049732208,
-0.07798483222723007,
0.004946960601955652,
-0.05588879808783531,
0.031... | -0.000329 |
# LogQL Reference Loki accepts a number of operators and functions within a [LogQL query](https://grafana.com/docs/loki//query). ## Binary operators ### Arithmetic operators The following binary arithmetic operators exist in Loki: - `+` (addition) - `-` (subtraction) - `\*` (multiplication) - `/` (division) - `%` (modu... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_reference.md | main | loki | [
-0.05256962776184082,
-0.014791186898946762,
-0.015279296785593033,
0.0522148460149765,
-0.09056605398654938,
-0.12158017605543137,
0.018486028537154198,
-0.020815104246139526,
0.07624812424182892,
0.03062189556658268,
-0.014160490594804287,
-0.038591135293245316,
0.05875620245933533,
0.02... | 0.103988 |
that would be dropped instead have the value 0 and vector elements that would be kept have the value 1. Filters the streams which logged at least 10 lines in the last minute: ```logql count\_over\_time({foo="bar"}[1m]) > 10 ``` Attach the value(s) `0`/`1` to streams that logged less/more than 10 lines: ```logql count\_... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_reference.md | main | loki | [
-0.028211748227477074,
0.04716377705335617,
0.027988290414214134,
0.019811879843473434,
0.05868249759078026,
0.01235369686037302,
0.12241114675998688,
-0.04568087309598923,
0.11931145936250687,
-0.007183522451668978,
-0.0015149073442444205,
-0.07187120616436005,
0.03400692716240883,
0.0498... | 0.038307 |
syntax: ```logql on() ``` This example will return every machine total count within the last minutes ratio in app `foo`: ```logql sum by(machine) (count\_over\_time({app="foo"}[1m])) / on() sum(count\_over\_time({app="foo"}[1m])) ``` ### Many-to-one and one-to-many vector matches Many-to-one and one-to-many matchings o... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_reference.md | main | loki | [
0.021973952651023865,
0.00014192427624948323,
-0.0198571365326643,
0.039328839629888535,
-0.006314428057521582,
-0.03180309012532234,
0.08384212106466293,
-0.04449991509318352,
0.04613953083753586,
-0.047060802578926086,
0.019570719450712204,
-0.06688406318426132,
0.08565731346607208,
0.02... | 0.056497 |
unwrap response\_latency\_seconds | \_\_error\_\_=""[1m] ) by (cluster) ``` >Metric queries cannot contain errors, in case errors are found during execution, Loki will return an error and appropriate status code. ## Functions Loki supports functions to operate on data. ### label\_replace() For each time series in `v`, ... | https://github.com/grafana/loki/blob/main//docs/sources/query/query_reference.md | main | loki | [
-0.035272784531116486,
0.023593731224536896,
0.015350819565355778,
0.05271889641880989,
0.022546440362930298,
-0.04365285113453865,
0.010966434143483639,
-0.005658789072185755,
0.058745067566633224,
-0.04041226953268051,
0.0354158841073513,
-0.08377518504858017,
-0.013714645057916641,
0.03... | 0.152228 |
# Simple LogQL simulator The LogQL simulator is an online tool that you can use to experiment with writing simple LogQL queries and seeing the results, without needing to run an instance of Loki. A set of example log lines are included for each of the primary log parsers supported by Loki: - [Logfmt](https://brandur.or... | https://github.com/grafana/loki/blob/main//docs/sources/query/analyzer.md | main | loki | [
-0.11853588372468948,
0.012421705760061741,
-0.07381878793239594,
0.0655302181839943,
-0.04290108010172844,
-0.1154700294137001,
-0.006380817387253046,
-0.028856070712208748,
0.03164157271385193,
0.011337671428918839,
-0.01472764927893877,
-0.08021832257509232,
0.01328561082482338,
0.04935... | 0.148124 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.