Stalar
Integrations

Loki

Search logs from Grafana Loki

Search and analyze logs from Grafana Loki.

What Stalar can do

ToolDescription
Query logsSearch logs with LogQL
Query rangeSearch logs over time ranges
List labelsDiscover available log labels
Get label valuesGet values for a specific label

Configuration

Required

FieldDescription
urlLoki server URL

Optional

FieldDescription
usernameBasic auth username
passwordBasic auth password
bearerTokenOAuth bearer token
tenantIdX-Scope-OrgID for multi-tenant Loki

Config file example

integrations:
  - name: "loki-prod"
    type: "loki"
    environment: "production"
    config:
      url: "http://loki:3100"

  # With authentication
  - name: "loki-secure"
    type: "loki"
    environment: "production"
    config:
      url: "https://loki.example.com"
      username: "admin"
      password: "${LOKI_PASSWORD}"

  # Multi-tenant Loki
  - name: "loki-tenant"
    type: "loki"
    environment: "production"
    config:
      url: "https://loki.example.com"
      bearerToken: "${LOKI_TOKEN}"
      tenantId: "my-tenant"

Example queries

  • "Show me errors from the payment service"
  • "What logs are there from the last 30 minutes?"
  • "Find logs containing 'timeout'"
  • "Show me logs around 2pm yesterday"