Skip to content

Grafana Loki Browser

grafana-loki

The Grafana Loki Browser adapter queries Loki through your existing Grafana instance. Cruncher opens a browser session to authenticate with Grafana, then uses the Grafana API to run LogQL queries against your Loki data source. Use this adapter if your Loki is hosted and accessed through Grafana.

grafanaUrl string

The base URL of your Grafana instance (e.g., https://my-grafana.example.com).

uid string

The UID of the Loki data source in Grafana.

filter array Optional

A list of filter objects to apply to your queries. Each filter object should have:


  • key (string): The label or field to filter on.
  • value (string): The value to match.
  • operator (enum): One of =, =~, !=, !~ (exact match, regex match, not equal, not regex match).
querySuffix array Optional

Additional query suffixes to append to your Loki queries.

connectors:
- type: grafana_browser
name: my_loki
params:
grafanaUrl: "https://my-grafana.example.com"
uid: "loki-uid-123"
connectors:
- type: grafana_browser
name: my_loki
params:
grafanaUrl: "https://my-grafana.example.com"
uid: "loki-uid-123"
filter:
- key: "job"
value: "my-app"
operator: "="
querySuffix: ["| json"]
  • When you run a query using this adapter, Cruncher will automatically open a login prompt in your browser if you are not already authenticated with Grafana.
  • You can use the filter parameter to restrict logs to specific labels or values.
  • The querySuffix parameter allows you to append additional Loki query language expressions to your queries.

For more information on how to obtain your Grafana Loki data source UID, see the Grafana documentation or ask your Grafana administrator.