### Start Mail-House Example with Docker Compose Source: https://grafana.com/docs/loki/latest/query/logcli/logcli-tutorial Start the mail-house example using Docker Compose. This exposes Loki at http://localhost:3100 and Grafana at http://localhost:3000. ```bash docker compose -f alloy-scenarios/mail-house/docker-compose.yml up -d ``` -------------------------------- ### Install xk6 Extension Bundler Source: https://grafana.com/docs/loki/latest/send-data/k6 Installs the xk6 extension bundler using go install. This is the first step in building a custom k6 binary with extensions. ```bash go install go.k6.io/xk6/cmd/xk6@latest ``` -------------------------------- ### Example Pods in Meta Namespace Source: https://grafana.com/docs/loki/latest/operations/meta-monitoring/deploy Example output showing pods running in the 'meta' namespace after successful deployment. ```console NAME READY STATUS RESTARTS ... meta-loki-alloy-singleton-6d7f8d8b86-sg4wx 2/2 Running 0 ... meta-loki-kube-state-metrics-64bdcfcbd-5snqz 1/1 Running 0 ... meta-loki-node-exporter-855l5 1/1 Running 0 ... meta-loki-node-exporter-b976b 1/1 Running 0 ... meta-loki-node-exporter-vsm4s 1/1 Running 0 ... ``` -------------------------------- ### Example: Create Kubernetes Service Account Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/gcp Example of creating a Kubernetes Service Account named 'loki-gcp-ksa' in the 'loki' namespace. ```bash kubectl create serviceaccount loki-gcp-ksa \ --namespace loki ``` -------------------------------- ### Start and Enable Loki Service on openSUSE Source: https://grafana.com/docs/loki/latest/setup/install/local Starts the Loki service and configures it to start automatically on boot for openSUSE Linux. ```bash systemd start loki systemd enable loki ``` -------------------------------- ### Loki Pod Status Example Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/azure Example output showing the status of Loki pods. All pods should be in a 'Running' state. ```console NAME READY STATUS RESTARTS AGE loki-canary-crqpg 1/1 Running 0 10m loki-canary-hm26p 1/1 Running 0 10m loki-canary-v9wv9 1/1 Running 0 10m loki-chunks-cache-0 2/2 Running 0 10m loki-compactor-0 1/1 Running 0 10m loki-distributor-78ccdcc9b4-9wlhl 1/1 Running 0 10m loki-distributor-78ccdcc9b4-km6j2 1/1 Running 0 10m loki-distributor-78ccdcc9b4-ptwrb 1/1 Running 0 10m loki-gateway-5f97f78755-hm6mx 1/1 Running 0 10m loki-index-gateway-0 1/1 Running 0 10m loki-index-gateway-1 1/1 Running 0 10m loki-ingester-0 1/1 Running 0 10m loki-ingester-1 1/1 Running 0 10m loki-ingester-2 1/1 Running 0 10m loki-pattern-ingester-0 1/1 Running 0 10m loki-querier-89d4ff448-4vr9b 1/1 Running 0 10m loki-querier-89d4ff448-7nvrf 1/1 Running 0 10m loki-querier-89d4ff448-q89kh 1/1 Running 0 10m loki-query-frontend-678899db5-n5wc4 1/1 Running 0 10m loki-query-frontend-678899db5-tf69b 1/1 Running 0 10m loki-query-scheduler-7d666bf759-9xqb5 1/1 Running 0 10m loki-query-scheduler-7d666bf759-kpb5q 1/1 Running 0 10m loki-results-cache-0 2/2 Running 0 10m loki-ruler-0 1/1 Running 0 10m ``` -------------------------------- ### Example: Authenticate to GKE Cluster Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/gcp An example of authenticating to a GKE cluster with specific variables filled in. ```bash gcloud container clusters get-credentials loki-gcp \ --region=europe-west4 ``` -------------------------------- ### Loki Tenant Configuration Example Source: https://grafana.com/docs/loki/latest/setup/install/helm/reference Example of configuring tenants for Loki using an htpasswd file. This includes defining tenant names and their corresponding passwords. ```yaml tenants: - name: “test-user-1” password: “test-password-1” - name: “test-user-2” ``` -------------------------------- ### Install Loki on openSUSE Source: https://grafana.com/docs/loki/latest/setup/install/local Installs the Loki package on openSUSE Linux after adding the community repository. ```bash zypper in loki ``` -------------------------------- ### LogCLI Query Example Source: https://grafana.com/docs/loki/latest/query/logcli/getting-started An example of a basic LogCLI query using label selectors. ```shell eg '{foo="bar",baz=~".*blip"}' ``` -------------------------------- ### Install Loki Helm Chart Source: https://grafana.com/docs/loki/latest/setup/install/helm/install-monolithic Installs the Loki Helm chart with a specified values file and namespace. Use this for initial deployment. ```bash helm install loki grafana-community/loki -f values.yaml -n loki --create-namespace ``` -------------------------------- ### Query Frontend Log Example Source: https://grafana.com/docs/loki/latest/operations/blocking-queries An example log line from the query-frontend showing query details including the query hash. ```logfmt level=info ts=2023-03-30T09:08:15.2614555Z caller=metrics.go:152 component=frontend org_id=29 latency=fast query="{stream=\"stdout\",pod=\"loki-canary-9w49x\"}" query_hash=2943214005 query_type=limited range_type=range ... ``` -------------------------------- ### Install Loki using Helm Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/azure Installs the Loki Helm chart with a custom values.yaml file. Ensure the 'loki' namespace is created. ```bash helm install --values values.yaml loki grafana-community/loki -n loki --create-namespace ``` -------------------------------- ### Loki Storage Configuration Example Source: https://grafana.com/docs/loki/latest/setup/install/helm/reference Example of additional storage configuration for Loki, including bloom shipper, boltdb shipper, hedging, and tsdb shipper settings. This configuration is used when `loki.structuredConfig` is not provided. ```json { "bloom_shipper": { "working_directory": "/var/loki/data/bloomshipper" }, "boltdb_shipper": { "index_gateway_client": { "server_address": "{{ include \"loki.indexGatewayAddress\" . }}" } }, "hedging": { "at": "250ms", "max_per_second": 20, "up_to": 3 }, "tsdb_shipper": { "index_gateway_client": { "server_address": "{{ include \"loki.indexGatewayAddress\" . }}" } } } ``` -------------------------------- ### Loki Authentication Configuration Source: https://grafana.com/docs/loki/latest/setup/install/helm/reference Example of setting a password hash for authentication in Loki. This hash is typically generated using htpasswd. ```yaml passwordHash: "$2y$10$7O40CaY1yz7fu9O24k2/u.ct/wELYHRBsn25v/7AyuQ8E8hrLqpva" ``` -------------------------------- ### Loki Test Schema Configuration Source: https://grafana.com/docs/loki/latest/setup/install/helm/reference Boolean flag to enable a test schema for Loki. A real Loki installation requires a proper schemaConfig. ```json false ``` -------------------------------- ### Create and Navigate to Demo Directory Source: https://grafana.com/docs/loki/latest/get-started/quick-start/quick-start Create a directory for the demo environment and set it as the current working directory. ```bash mkdir evaluate-loki cd evaluate-loki ``` -------------------------------- ### LogCLI Volume Query Example Source: https://grafana.com/docs/loki/latest/query/logcli/getting-started Use the 'volume' command to get aggregate volumes for series matching the provided label selector(s). By default, it looks over the last hour of data. Use --since to modify or provide specific start and end times with --from and --to. ```bash logcli volume --timezone=UTC --from="2021-01-19T10:00:00Z" --to="2021-01-19T20:00:00Z" 'my-query' ``` -------------------------------- ### LogCLI Stats Query Example Source: https://grafana.com/docs/loki/latest/query/logcli/getting-started Use the 'stats' command to get statistics from the index on how much data is contained in matching streams. By default, it looks over the last hour of data. Use --since to modify or provide specific start and end times with --from and --to. ```bash logcli stats --timezone=UTC --from="2021-01-19T10:00:00Z" --to="2021-01-19T20:00:00Z" 'my-query' ``` -------------------------------- ### List installed Docker plugins Source: https://grafana.com/docs/loki/latest/send-data/docker-driver Checks for installed Docker plugins. Successfully started plugins are listed as enabled. ```bash docker plugin ls ``` -------------------------------- ### Example: Namespace Creation Output Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/gcp The expected output after successfully creating a Kubernetes namespace. ```bash namespace/loki created ``` -------------------------------- ### Filesystem Storage Migration Example (Existing) Source: https://grafana.com/docs/loki/latest/setup/migrate/migrate-storage-clients Shows the existing configuration for Filesystem storage before migration. ```yaml storage_config: filesystem: directory: /var/loki/chunks ``` -------------------------------- ### Install Tanka Loki Canary Module Source: https://grafana.com/docs/loki/latest/operations/loki-canary Use jsonnet-bundler to install the Tanka setup for Loki Canary production deployment. ```shell jb install github.com/grafana/loki-canary/production/ksonnet/loki-canary ``` -------------------------------- ### Example Runtime Configuration File Source: https://grafana.com/docs/loki/latest/configure An example runtime configuration file demonstrating overrides for tenant limits and multi-KV store settings. This file can be reloaded without restarting Loki. ```yaml overrides: tenant1: ingestion_rate_mb: 10 max_streams_per_user: 100000 max_chunks_per_query: 100000 tenant2: max_streams_per_user: 1000000 max_chunks_per_query: 1000000 multi_kv_config: mirror-enabled: false primary: consul ``` -------------------------------- ### LogCLI Volume Range Query Example Source: https://grafana.com/docs/loki/latest/query/logcli/getting-started Use the 'volume_range' command to get aggregate volumes for series matching the provided label selector(s), aggregated into buckets according to the step value. By default, it looks over the last hour of data. Use --since to modify or provide specific start and end times with --from and --to. ```bash logcli volume_range --timezone=UTC --from="2021-01-19T10:00:00Z" --to="2021-01-19T20:00:00Z" --step=1h 'my-query' ``` -------------------------------- ### Example Response for Get Rule Groups by Namespace Source: https://grafana.com/docs/loki/latest/api An example of the YAML response structure for a specific namespace, detailing the rule group's name, interval, and rules. ```yaml name: interval: rules: - alert: expr: for: annotations: : labels: : ``` -------------------------------- ### Example Schema Configuration for New Loki Installs Source: https://grafana.com/docs/loki/latest/operations/storage/schema This YAML configuration is recommended for new Grafana Loki installations. Ensure the 'from' date is in the past to activate the schema immediately upon startup. ```yaml schema_config: configs: - from: 2024-04-01 object_store: s3 store: tsdb schema: v13 index: prefix: index_ period: 24h ``` -------------------------------- ### Loki Configuration File Example Source: https://grafana.com/docs/loki/latest/configure A sample of the `loki.yaml` configuration file, illustrating various parameters and their default values. This includes settings for target components, authentication, server configuration, and UI options. ```yaml # A comma-separated list of components to run. The default value 'all' runs Loki # in single binary mode. The value 'read' is an alias to run only read-path # related components such as the querier and query-frontend, but all in the same # process. The value 'write' is an alias to run only write-path related # components such as the distributor and compactor, but all in the same process. # Supported values: all, compactor, distributor, ingester, querier, # query-scheduler, ingester-querier, query-frontend, index-gateway, ruler, # table-manager, read, write. A full list of available targets can be printed # when running Loki with the '-list-targets' command line flag. # CLI flag: -target [target: | default = "all"] # Enables authentication through the X-Scope-OrgID header, which must be present # if true. If false, the OrgID will always be set to 'fake'. # CLI flag: -auth.enabled [auth_enabled: | default = true] # The amount of virtual memory in bytes to reserve as ballast in order to # optimize garbage collection. Larger ballasts result in fewer garbage # collection passes, reducing CPU overhead at the cost of heap size. The ballast # will not consume physical memory, because it is never read from. It will, # however, distort metrics, because it is counted as live memory. # CLI flag: -config.ballast-bytes [ballast_bytes: | default = 0] # Configures the server of the launched module(s). [server: ] ui: # Enable the experimental Loki UI. # CLI flag: -ui.enabled [enabled: | default = false] # Enable debug logging for the UI. # CLI flag: -ui.debug [debug: | default = false] goldfish: # Enable the Goldfish query comparison feature. # CLI flag: -ui.goldfish.enable [enable: | default = false] storage: # Storage backend type (cloudsql, rds, or empty for no storage) # CLI flag: -ui.goldfish.storage.type [type: | default = ""] ``` -------------------------------- ### Example: Service Account Creation Response Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/gcp The expected response after successfully creating a Kubernetes Service Account. ```bash serviceaccount/loki-gcp-ksa created ``` -------------------------------- ### Authenticate to GKE Cluster Source: https://grafana.com/docs/loki/latest/setup/install/helm/deployment-guides/gcp Use this command to get credentials for your GKE cluster. Ensure kubectl is installed. ```bash gcloud container clusters get-credentials \ --region= ``` -------------------------------- ### Example cURL Request for Detected Field Values Source: https://grafana.com/docs/loki/latest/api This example demonstrates how to use cURL to query for detected field values, including required parameters like query, start, and end times. The response is piped to jq for pretty-printing. ```bash curl -H 'X-Scope-OrgID: ' -G -s "http://localhost:3100/loki/api/v1/detected_field/level/values" \ --data-urlencode 'query={app="myapp"}' \ --data-urlencode 'start=1609459200000000000' \ --data-urlencode 'end=1609462800000000000' | jq ``` -------------------------------- ### Initialize Tanka Application and Add Loki Environment Source: https://grafana.com/docs/loki/latest/installation/tanka Use these commands to create a new Tanka application, initialize it, and add a specific environment for Loki deployment. Replace `` with your desired name and `` with your Kubernetes API server address. ```bash mkdir cd tk init tk env add environments/loki --namespace=loki --server= ``` -------------------------------- ### Console Output for Docker Compose Services Source: https://grafana.com/docs/loki/latest/send-data/alloy/examples/alloy-kafka-logs Example console output indicating the status of services started by Docker Compose. ```console ✔ Container loki-fundamentals-grafana-1 Started ✔ Container loki-fundamentals-loki-1 Started ✔ Container loki-fundamentals-alloy-1 Started ✔ Container loki-fundamentals-zookeeper-1 Started ✔ Container loki-fundamentals-kafka-1 Started ``` -------------------------------- ### Deploy Sample Application with Docker Compose Source: https://grafana.com/docs/loki/latest/get-started/quick-start/tutorial Use this command to deploy the sample microservices application using Docker Compose. Ensure you are in the 'loki-fundamentals' directory. This command may take a few minutes to build the necessary images. ```bash docker compose -f greenhouse/docker-compose-micro.yml up -d --build ``` -------------------------------- ### Valid Delete Request with RFC3339 Format Source: https://grafana.com/docs/loki/latest/operations/troubleshooting/troubleshoot-operations Use this example to send a delete request with start and end times specified in RFC3339 format. ```bash curl -X POST http://compactor:3100/loki/api/v1/delete \ -H "X-Scope-OrgID: my-tenant" \ -d "query={app=\"foo\"}" \ -d "start=2024-01-01T00:00:00Z" \ -d "end=2024-01-02T00:00:00Z" ``` -------------------------------- ### Valid Delete Request with Unix Seconds Source: https://grafana.com/docs/loki/latest/operations/troubleshooting/troubleshoot-operations Use this example to send a delete request with start and end times specified in Unix seconds. ```bash curl -X POST http://compactor:3100/loki/api/v1/delete \ -H "X-Scope-OrgID: my-tenant" \ -d "query={app=\"foo\"}" \ -d "start=1704067200" \ -d "end=1704153600" ``` -------------------------------- ### Loki Configuration File Example (loki.yaml) Source: https://grafana.com/docs/loki/latest/reference/loki-config-ref A sample Loki configuration file demonstrating various parameters and their default values. This file is written in YAML format. ```yaml # A comma-separated list of components to run. The default value 'all' runs Loki # in single binary mode. The value 'read' is an alias to run only read-path # related components such as the querier and query-frontend, but all in the same # process. The value 'write' is an alias to run only write-path related # components such as the distributor and compactor, but all in the same process. # Supported values: all, compactor, distributor, ingester, querier, # query-scheduler, ingester-querier, query-frontend, index-gateway, ruler, # table-manager, read, write. A full list of available targets can be printed # when running Loki with the '-list-targets' command line flag. # CLI flag: -target [target: | default = "all"] # Enables authentication through the X-Scope-OrgID header, which must be present # if true. If false, the OrgID will always be set to 'fake'. # CLI flag: -auth.enabled [auth_enabled: | default = true] # The amount of virtual memory in bytes to reserve as ballast in order to # optimize garbage collection. Larger ballasts result in fewer garbage # collection passes, reducing CPU overhead at the cost of heap size. The ballast # will not consume physical memory, because it is never read from. It will, # however, distort metrics, because it is counted as live memory. # CLI flag: -config.ballast-bytes [ballast_bytes: | default = 0] # Configures the server of the launched module(s). [server: ] ui: # Enable the experimental Loki UI. # CLI flag: -ui.enabled [enabled: | default = false] # Enable debug logging for the UI. # CLI flag: -ui.debug [debug: | default = false] goldfish: # Enable the Goldfish query comparison feature. # CLI flag: -ui.goldfish.enable [enable: | default = false] storage: # Storage backend type (cloudsql, rds, or empty for no storage) # CLI flag: -ui.goldfish.storage.type [type: | default = ""] ``` -------------------------------- ### Check Logcli Version Source: https://grafana.com/docs/loki/latest/query/logcli/getting-started Verify the installed Logcli version to ensure compatibility with your Loki instance. This command is useful for initial setup and troubleshooting. ```bash logcli –version ``` -------------------------------- ### Copy Completed Alloy Configuration Source: https://grafana.com/docs/loki/latest/send-data/alloy/examples/alloy-kafka-logs Copies a pre-made Alloy configuration file and reloads Alloy. Use this if you get stuck or need a complete example. ```bash cp loki-fundamentals/completed/config-raw.alloy loki-fundamentals/config.alloy curl -X POST http://localhost:12345/-/reload ``` -------------------------------- ### Extract substring with substr Source: https://grafana.com/docs/loki/latest/logql/template_functions Get a substring from a string using substr. The function handles different start and end index behaviors, including negative indices. ```template `{{ .path | substr 2 5 }}` `{{ substr 0 5 "hello world"}}` // output: hello `{{ substr 6 11 "hello world"}}` // output: world ``` -------------------------------- ### Schema Configuration Example Source: https://grafana.com/docs/loki/latest/operations/storage/table-manager Defines multiple schema configurations with different versions and storage backends over time. Use this to manage schema upgrades and storage settings. ```yaml schema_config: configs: - from: 2019-01-01 store: dynamo schema: v10 index: prefix: loki_ period: 168h - from: 2019-04-15 store: dynamo schema: v11 index: prefix: loki_ period: 168h ``` -------------------------------- ### Keep Specific Labels with Exact Value Source: https://grafana.com/docs/loki/latest/query/log_queries This example demonstrates how to use the `|keep` expression to retain only the 'level' label and labels where 'method' is exactly 'GET'. Other labels are dropped. ```logql {job="varlogs"}|json|keep level, method="GET" ``` ```log {"level": "info", "method": "GET", "path": "/", "host": "grafana.net", "status": "200"} {"level": "info", "method": "POST", "path": "/", "host": "grafana.net", "status": "200"} ``` ```log {level="info", method="GET"} {"level": "info", "method": "GET", "path": "/", "host": "grafana.net", "status": "200"} {level="info"} {"level": "info", "method": "POST", "path": "/", "host": "grafana.net", "status": "200"} ``` -------------------------------- ### Kubernetes Example `values.yaml` for Loki Configuration Source: https://grafana.com/docs/loki/latest/get-started/labels/modify-default-labels This is a specific example of a Kubernetes `values.yaml` file for Loki, illustrating the configuration to demote `k8s.pod.name` and `service.instance.id` from index labels to structured metadata. ```yaml loki: distributor: otlp_config: # List of default otlp resource attributes to be picked as index labels - EDIT TO REMOVE k8s.pod.name AND service.instance.id FROM THE LIST # CLI flag: -distributor.otlp.default_resource_attributes_as_index_labels default_resource_attributes_as_index_labels: [service.name service.namespace deployment.environment deployment.environment.name cloud.region cloud.availability_zone k8s.cluster.name k8s.namespace.name k8s.container.name container.name k8s.replicaset.name k8s.deployment.name k8s.statefulset.name k8s.daemonset.name k8s.cronjob.name k8s.job.name] ``` -------------------------------- ### Drop Specific Labels Source: https://grafana.com/docs/loki/latest/query/log_queries Use the drop expression to remove specified labels from the pipeline. This example drops 'level' and 'method' labels, and any 'method' label with the value 'GET'. ```logql {job="varlogs"}|json|drop level, method="GET" ``` -------------------------------- ### Fluentd Multi-Worker Setup with Loki Source: https://grafana.com/docs/loki/latest/send-data/fluentd Configure Fluentd for multi-worker usage with Loki by including the worker ID as a label. This example uses the `fluent-plugin-record-modifier` to add the worker ID. ```conf @type record_modifier fluentd_worker "#{worker_id}" @type loki # ... # ... ``` -------------------------------- ### Create Kubernetes Namespaces Source: https://grafana.com/docs/loki/latest/send-data/k8s-monitoring-helm Create the 'meta' and 'prod' namespaces required for deploying Loki, Grafana, Alloy, and the sample application. ```bash kubectl create namespace meta && kubectl create namespace prod ``` -------------------------------- ### Drop Labels with Regex Matching Source: https://grafana.com/docs/loki/latest/query/log_queries The drop expression supports regex matching for label values. This example drops the 'level' and 'path' labels, and any 'app' label that starts with 'some-api'. ```logql {job="varlogs"}|json|drop level, path, app=~"some-api.*" ``` -------------------------------- ### Use Specific Label Selectors Source: https://grafana.com/docs/loki/latest/query/bp-query Start your query by selecting the most specific label available to reduce the data set Loki needs to search. This example uses `app_name` as it's more specific than `namespace`. ```bash {app_name="carnivorousgreenhouse"} ``` -------------------------------- ### Build Loki and LogCLI Binaries Source: https://grafana.com/docs/loki/latest/community/contributing Use the `make` command to build the Loki and LogCLI binaries. This is the preferred method for building the project. ```bash $ make loki logcli ``` -------------------------------- ### Initialize Tanka Application and Add Loki Environment Source: https://grafana.com/docs/loki/latest/setup/install/tanka Create a new Tanka application directory, initialize it, and add a Loki environment configuration pointing to the Kubernetes API server. Ensure Tanka version v0.31.0 or newer is installed. ```bash mkdir cd tk init tk env add environments/loki --namespace=loki --server= ``` -------------------------------- ### BoltDB Shipper Configuration with GCS Source: https://grafana.com/docs/loki/latest/operations/storage/boltdb-shipper Example configuration for Loki using BoltDB Shipper with Google Cloud Storage (GCS). This setup defines storage locations for index and chunks, and specifies the object store. ```yaml schema_config: configs: - from: 2018-04-15 store: boltdb-shipper object_store: gcs schema: v11 index: prefix: loki_index_ period: 24h storage_config: gcs: bucket_name: GCS_BUCKET_NAME boltdb_shipper: active_index_directory: /loki/index cache_location: /loki/boltdb-cache ``` -------------------------------- ### Filter Logs Matching a Regular Expression Source: https://grafana.com/docs/loki/latest/query/log_queries Use the `|~` operator with a regular expression to filter log lines that match a pattern. This example keeps lines containing a substring starting with 'tsdb-ops' and ending with 'io:2003'. ```none {name="kafka"} |~ "tsdb-ops.*io:2003" ``` -------------------------------- ### Install Grafana Tempo with Helm Source: https://grafana.com/docs/loki/latest/send-data/k8s-monitoring-helm Deploys a default version of Grafana Tempo to the 'prod' namespace using the Grafana Helm chart. ```bash helm install tempo grafana/tempo-distributed -n prod ``` -------------------------------- ### Clone Demo Repository Source: https://grafana.com/docs/loki/latest/send-data/alloy/examples/alloy-kafka-logs Clone the repository containing the demo application to set up your environment. ```bash git clone -b microservice-kafka https://github.com/grafana/loki-fundamentals.git ``` -------------------------------- ### List Log Deletion Requests (GET) Source: https://grafana.com/docs/loki/latest/api Retrieves a list of existing log deletion requests for the authenticated tenant. This endpoint returns both processed and unprocessed requests. It requires 'start' and 'end' parameters to be provided together. ```bash GET /loki/api/v1/delete ``` -------------------------------- ### Query index statistics using GET Source: https://grafana.com/docs/loki/latest/api Use this endpoint to query the index for the number of streams, chunks, entries, and bytes that a query resolves to. URL query parameters like 'query', 'start', and 'end' can be specified. ```bash GET /loki/api/v1/index/stats ```