Skip to content

Getting started

  • A Kubernetes cluster. For a laptop, k3d is enough — see Local development.
  • Helm 3+.
  • A default StorageClass. Loki, Tempo, and Mimir each claim a PVC. Grafana’s own persistence is off by default, so its local users, preferences, and any UI-created dashboards are lost when the pod restarts — turn on grafana.persistence if that matters (provisioned datasources and dashboards are unaffected).
  • For Nebari integration only: the nebari-operator (it provides the NebariApp CRD) and a Keycloak realm.

Add the Nebari Helm repository and install:

Terminal window
helm repo add nebari https://raw.githubusercontent.com/nebari-dev/helm-repository/gh-pages/
helm repo update nebari
helm install lgtm-pack nebari/nebari-lgtm-pack \
--namespace monitoring --create-namespace \
--set nebariapp.enabled=false

Or from a clone of this repository:

Terminal window
helm dependency update chart
helm install lgtm-pack chart --namespace monitoring --create-namespace \
--set nebariapp.enabled=false

nebariapp.enabled=false skips the NebariApp resource. Leave it on (the default) only when the nebari-operator is installed and you can supply nebariapp.hostname — the chart fails to render without it. See Nebari integration.

WorkloadKindPurpose
lgtm-pack-grafanaDeploymentUI on service port 80 (container 3000)
lgtm-pack-lokiStatefulSetLogs, SingleBinary mode, 10Gi PVC
lgtm-pack-tempoStatefulSetTraces, 10Gi PVC
lgtm-pack-mimirStatefulSetMetrics, -target=all, 20Gi PVC
lgtm-pack-promtailDaemonSetShips container logs to Loki
lgtm-pack-kube-state-metricsDeploymentKubernetes object metrics
lgtm-pack-prometheus-node-exporterDaemonSetNode CPU, memory, disk, network
loki-canaryDaemonSetLoki’s own write/read self-test (upstream default)

Most resources are named after the Helm release, so a release named obs produces obs-grafana, obs-loki, and so on. Every endpoint this chart templates uses .Release.Name, so custom release names work throughout. Two exceptions are worth knowing when you go looking for something:

  • Some loki and tempo subchart resources are not release-prefixed — loki-canary, loki-headless, and the loki, loki-runtime, and tempo ConfigMaps.
  • Resources this chart templates itself use Helm’s fullname helper, which yields <release>-nebari-lgtm-pack-* (for example lgtm-pack-nebari-lgtm-pack-datasources) unless the release name already contains nebari-lgtm-pack.

Without Nebari routing, port-forward:

Terminal window
kubectl -n monitoring port-forward svc/lgtm-pack-grafana 3000:80

Open http://localhost:3000 and sign in with admin / admin.

Terminal window
# Everything should be Running / Ready
kubectl -n monitoring get pods
# The three datasources Grafana provisions from the sidecar ConfigMap.
# Chart-templated resources are named <release>-nebari-lgtm-pack-*, because
# Helm's fullname helper only collapses when the release name already
# contains the chart name.
kubectl -n monitoring get cm lgtm-pack-nebari-lgtm-pack-datasources -o yaml
# Mimir reports ready once its single process has started every target
kubectl -n monitoring exec sts/lgtm-pack-mimir -- wget -qO- localhost:8080/ready

In Grafana, Connections → Data sources should list Loki (default), Tempo, and Mimir, and Dashboards should show a Kubernetes folder with four views plus a Nebari folder containing Nebari Gateway Traffic.

Expect the dashboards to be empty at this point. This pack ships no metrics scraper of its own — the Kubernetes views need something to pull kube-state-metrics, node-exporter, and cAdvisor into Mimir, which on a Nebari cluster is NIC’s OpenTelemetry collector. Logs are the exception: Promtail is already shipping them, so Explore → Loki has data immediately. See Dashboards.

Container logs arrive on their own — Promtail is already scraping every node. Metrics and traces need a producer. The push endpoints are:

SignalEndpointProtocol
Logshttp://lgtm-pack-loki:3100/loki/api/v1/pushLoki push API
Logs (OTLP)http://lgtm-pack-loki:3100/otlpOTLP/HTTP
Traceshttp://lgtm-pack-tempo:4317OTLP/gRPC
Traceshttp://lgtm-pack-tempo:4318OTLP/HTTP
Metricshttp://lgtm-pack-mimir:8080/api/v1/pushPrometheus remote-write
Metrics (OTLP)http://lgtm-pack-mimir:8080/otlpOTLP/HTTP

On a cluster deployed by nebari-infrastructure-core, the existing OpenTelemetry collector is redirected to these endpoints automatically — see OpenTelemetry collector wiring.

In distributed Mimir mode the metrics endpoint becomes http://lgtm-pack-mimir-gateway:80; the Grafana datasource and OTel exporter follow the mode on their own. See Mimir deployment modes.

Terminal window
helm uninstall lgtm-pack -n monitoring

PVCs created by StatefulSet volume claim templates survive the uninstall — delete them explicitly if you want the data gone:

Terminal window
kubectl -n monitoring delete pvc -l app.kubernetes.io/instance=lgtm-pack

If the OTel collector override was in use, note that NIC’s collector keeps the previously-resolved config until its pods restart. See Uninstall behavior.