prorm API Reference
    Preparing search index...

    Class LokiStore

    LokiStore wraps Grafana Loki's HTTP push/query API (log ingestion via the push endpoint, LogQL range search, and label/series metadata lookups) behind the NoSqlStore lifecycle.

    Implements

    Index
    name: "loki" = 'loki'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "fetch" = 'fetch'

    The client library being used

    • Pushes a batch of log entries for one stream (identified by its label set) via POST /loki/api/v1/push. Each entry is serialized as [<ts-ns>, <line>] (plus optional structured metadata) in Loki's push payload shape.

      Parameters

      • labels: Record<string, string>
      • entries: LokiEntry[]

      Returns Promise<any>

    • Runs a LogQL query over a time window via GET /loki/api/v1/query_range. Returns the data payload ({ resultType, result }).

      Parameters

      • logql: string
      • options: LokiQueryOptions = {}

      Returns Promise<any>

    • Lists the known label names via GET /loki/api/v1/labels.

      Returns Promise<any>

    • Lists the label sets (streams) matching an optional selector via GET /loki/api/v1/series.

      Parameters

      • Optionalmatch: string | string[]

      Returns Promise<any>

    • Lists the distinct values of a label via GET /loki/api/v1/label/<name>/values.

      Parameters

      • label: string

      Returns Promise<any>