Skip to main content
Gå til innhold

Exploring Data in Grafana

The Explore view is your go-to tool for ad-hoc queries and investigations. It's designed for quick, interactive exploration of your observability data.

Opening Explore

  1. Click the Explore icon in the left sidebar (compass icon)
  2. Select your data source from the dropdown at the top

Querying Logs (Loki)

Select your Loki data source, then enter a LogQL query:

{namespace="my-namespace"} |= "error"

This finds all logs from my-namespace containing the word "error".

Common LogQL Patterns

PatternMeaning
{app="myapp"}Logs from app labeled "myapp"
|= "text"Contains "text"
|~ "regex"Matches regex
!= "text"Does not contain "text"

See LogQL Best Practices for query optimization tips.

Querying Metrics (Mimir)

Select your Mimir data source, then enter a PromQL query:

rate(http_requests_total{namespace="my-namespace"}[5m])

This shows the rate of HTTP requests over 5-minute windows.

Common PromQL Patterns

PatternMeaning
metric_nameRaw metric value
rate(metric[5m])Per-second rate over 5 minutes
sum by (label) (metric)Aggregate by label

For detailed PromQL documentation, see the Prometheus docs.

Viewing Traces (Tempo)

Select your Tempo data source. You can:

  • Search by trace ID
  • Search by service name and operation
  • Find traces by duration or status

Traces show the full journey of a request across services, with timing information for each span.

Tips

  • Time range: Adjust the time picker (top right) before running expensive queries
  • Live tail: For logs, use the "Live" button to stream new logs in real-time
  • Split view: Click "Split" to compare two queries side by side

Learn More