Grafana

PackDB drops into Grafana today as standard Prometheus, Loki, Tempo, and Jaeger datasources — PromQL for metrics, LogQL for logs, and TraceQL for traces, straight from Grafana Explore.

1. Provision the datasource

Add PackDB to your Grafana provisioning directory. Authentication is the same machine key (packdb_…) you use for ingestion, sent as the X-API-Key header — mint one from API keys.

yaml
apiVersion: 1

datasources:
  - name: PackDB Metrics
    type: prometheus
    access: proxy
    uid: packdb
    url: https://api.packdb.io
    isDefault: true
    editable: true
    jsonData:
      httpMethod: POST
      httpHeaderName1: X-API-Key
      timeInterval: 10s
      queryTimeout: 60s
    secureJsonData:
      httpHeaderValue1: "<YOUR_PACKDB_API_KEY>"

  - name: PackDB Logs
    type: loki
    access: proxy
    uid: packdb-loki
    url: https://api.packdb.io
    editable: true
    jsonData:
      httpHeaderName1: X-API-Key
      timeout: 60
    secureJsonData:
      httpHeaderValue1: "<YOUR_PACKDB_API_KEY>"

  - name: PackDB Traces
    type: tempo
    access: proxy
    uid: packdb-tempo
    url: https://api.packdb.io
    editable: true
    jsonData:
      httpHeaderName1: X-API-Key
    secureJsonData:
      httpHeaderValue1: "<YOUR_PACKDB_API_KEY>"

  - name: PackDB Jaeger
    type: jaeger
    access: proxy
    uid: packdb-jaeger
    url: https://api.packdb.io/jaeger
    editable: true
    jsonData:
      httpHeaderName1: X-API-Key
    secureJsonData:
      httpHeaderValue1: "<YOUR_PACKDB_API_KEY>"

Prefer the UI? Add equivalent Prometheus, Loki, and Tempo datasources pointing at the same URL, plus a Jaeger datasource pointing at /jaeger. Add the custom HTTP header X-API-Key with your key under Auth → Custom HTTP Headers.

2. Verify in Explore

Use Grafana Explore to confirm each signal: run a PromQL query against PackDB Metrics, a LogQL query against PackDB Logs, and a trace search against PackDB Traces.

Existing Prometheus dashboards also work unchanged. In Grafana, go to Dashboards → New → Import, paste a dashboard's JSON or its grafana.com ID, and select your PackDB Metrics datasource when prompted.

See also

  • Quickstart — send your first telemetry before wiring up dashboards.
  • Connect panel — the same datasource YAML, wired to your environment endpoints and workspace API key.