Skip to content

feat: add Grafana dashboard template and Prometheus alerting rules for self-hosted workers#102

Draft
seemeroland wants to merge 1 commit into
mainfrom
oz-agent/REMOTE-2110-grafana-dashboard
Draft

feat: add Grafana dashboard template and Prometheus alerting rules for self-hosted workers#102
seemeroland wants to merge 1 commit into
mainfrom
oz-agent/REMOTE-2110-grafana-dashboard

Conversation

@seemeroland

Copy link
Copy Markdown
Contributor

Summary

Adds a ready-to-import Grafana dashboard and Prometheus alerting rules for enterprise customers running self-hosted Oz workers.

Addresses feedback from enterprise customer IMC (REMOTE-2110) who asked for Grafana dashboard templates they can import for their self-hosted Oz worker deployment.

Changes

New: grafana/ directory

  • grafana/oz-agent-worker-overview.json — Importable Grafana 10+ dashboard with 5 sections:

    • Worker Health: Connected workers, active workers, tasks active, fleet saturation gauge (green/yellow/red)
    • Task Throughput: Task completion rate by result (succeeded/failed/cancelled/rejected), 5m success rate, 5m rejection rate
    • Task Duration: p50 / p95 / p99 latency over sliding 5m window
    • Failure Analysis: Failure rate by reason (e.g., image_pull, container_oom, unschedulable) and by phase
    • Connection Health: WebSocket reconnect rate by reason, worker fleet info table

    Uses __inputs for datasource substitution at import time. Includes an Instance variable for per-worker drill-down.

  • grafana/alerts.yaml — Prometheus alerting rules covering: OzWorkerFleetEmpty (critical), OzWorkerDisconnected, OzWorkerReconnectStorm, OzWorkerFleetSaturated, OzWorkerTasksRejected, OzWorkerHighFailureRate, OzWorkerImagePullFailures, OzWorkerContainerOOM, OzWorkerUnschedulablePods. Compatible with vanilla Prometheus and Prometheus Operator.

  • grafana/README.md — Import instructions for Grafana UI, Grafana API, and direct URL. Covers alert rule deployment (vanilla + Prometheus Operator) and threshold tuning guidance.

Updated: README.md

Added a "Grafana dashboard" subsection under the Monitoring section pointing to the grafana/ directory.

Testing

  • JSON validated with python3 -m json.tool (valid)
  • Dashboard uses standard Grafana 10 schema (schemaVersion: 39)
  • PromQL expressions match the metric names in internal/metrics/metrics.go
  • Alert thresholds are conservative starting points with tuning guidance in grafana/README.md

Conversation: https://staging.warp.dev/conversation/3861b9b2-ce49-46f7-baff-bfb3e2173b0b
Run: https://oz.staging.warp.dev/runs/019f4843-a02c-7ca4-aa34-0d867981dfbc

This PR was generated with Oz.

Add ready-to-import Grafana dashboard and Prometheus alerting rules for
self-hosted Oz agent worker deployments in the new grafana/ directory.

Deliverables:
- grafana/oz-agent-worker-overview.json: Importable Grafana 10+ dashboard
  covering worker health, task throughput, latency, failure analysis, and
  WebSocket connectivity. Uses __inputs for datasource substitution.
- grafana/alerts.yaml: Prometheus alerting rules for connectivity issues,
  fleet saturation, task failures, OOM kills, and unschedulable pods.
- grafana/README.md: Import instructions for Grafana UI, Grafana API,
  and Prometheus Operator. Covers threshold tuning guidance.
- README.md: Added Grafana dashboard reference in the Monitoring section.

The dashboard connects to any Prometheus datasource (scrape or OTLP),
includes an Instance variable for per-worker drill-down, and covers all
oz_worker_* metrics exposed by the OpenTelemetry pipeline.

Closes REMOTE-2110.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from-feedback-bot Linear issue delegated from Feedback Bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant