Skip to main content
RunBook Academy

Git, CI/CD & GitOpsXCIX · Artifact Registry FailureRegistryFail

Registry monitoring and alerting — the metrics that matter

Advanced⏱ ~26 mingit

What you'll learn

  • Identify the four production metrics for an artifact registry (pull latency, pull error rate, storage used, replication lag)
  • Configure alert thresholds that distinguish a regional outage from a partial degradation
  • Derive SLOs from the metrics and document the SLOs in the runbook
  • Compose a dashboard that exposes the four metrics and the SLO burn rate
  • Map the alerts to the on-call runbook (Part XCIX-01, Part XCIX-03)

Prerequisites

Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x

Not yet marked complete on this device.

A registry that is not monitored is a registry that fails silently. The deploys that pull from the registry fail loudly; the registry that serves them fails only when the deploys time out. The monitoring discipline is to expose the four metrics that predict the deploy failure before the deploy fails, and to alert on the thresholds that distinguish a regional outage from a partial degradation.

flowchart LR
    A["registry metrics"] --> B["pull latency p99"]
    A --> C["pull error rate"]
    A --> D["storage used"]
    A --> E["replication lag"]
    B --> F["SLO: p99 under 2s"]
    C --> G["SLO: error rate under 0.1 percent"]
    D --> H["alert: 80 percent full"]
    E --> I["SLO: lag under 60s"]
    F --> J["dashboard"]
    G --> J
    H --> J
    I --> J
    J --> K["on-call alert"]

The four production metrics

The four metrics every registry is monitored on:

  • Pull latency. The end-to-end time from the kubelet issuing the pull request to the registry returning the last blob byte. The metric is a histogram; the alert is on the p99 (or p95, depending on the team’s tolerance). A p99 that climbs from two seconds to ten seconds is a sign of a registry under stress; a p99 that climbs to sixty seconds is a sign of a partial degradation.
  • Pull error rate. The fraction of pull requests that return 5xx (server errors) over a window. A baseline rate of 0.01% (one in ten thousand) is normal; a rate of 1% is a sign of a regional degradation; a rate of 50% is a sign of a regional outage.
  • Storage used. The fraction of the registry’s storage capacity that is in use. The metric is a gauge; the alert is on the percentage full. A registry that is 80% full is a registry whose garbage collection policy is overdue; a registry that is 95% full is a registry that may start rejecting pushes.
  • Replication lag. The elapsed time between a push to the primary and the replica’s confirmation that the artifact is current. The metric is a gauge; the alert is on the seconds of lag. A lag that climbs above the RPO design constraint is a sign that the replication policy is failing.

Alert thresholds and SLOs

The alert thresholds are derived from the SLOs. The SLOs are written before the incident, not after:

  • SLO: pull latency p99 under two seconds. Measured over a five-minute window. The alert threshold is p99 over four seconds for three consecutive five-minute windows (a sustained degradation, not a transient spike).
  • SLO: pull error rate under 0.1%. Measured over a five-minute window. The alert threshold is over 1% for one five-minute window (a sustained outage threshold) or over 5% for one minute (an emergency threshold).
  • SLO: replication lag under sixty seconds. Measured as a gauge. The alert threshold is over five minutes for one window (the replica is no longer meeting the RPO).
  • Alert: storage used over 80%. A capacity alert, not an SLO. The threshold is 80% for warning, 95% for critical.
# Prometheus alert rules (illustrative)
groups:
  - name: registry-slos
    rules:
      - alert: RegistryPullLatencyHigh
        expr: histogram_quantile(0.99, sum(rate(registry_pull_duration_seconds_bucket[5m])) by (le)) > 4
        for: 15m
      - alert: RegistryPullErrorRateHigh
        expr: sum(rate(registry_pull_requests_total{status=~"5.."}[5m])) / sum(rate(registry_pull_requests_total[5m])) > 0.01
        for: 5m
      - alert: RegistryReplicationLagHigh
        expr: registry_replication_lag_seconds > 300
        for: 5m
      - alert: RegistryStorageNearFull
        expr: registry_storage_used_bytes / registry_storage_capacity_bytes > 0.8
        for: 30m

The dashboard

The dashboard exposes the four metrics, the SLO burn rate, and the per-cluster breakdown. The composition:

  • Top row: the four metrics as single-stat panels with the SLO threshold as a red line.
  • Middle row: the per-cluster pull latency p99 over the last six hours, to spot the cluster that is degrading first.
  • Bottom row: the SLO burn rate (the fraction of the error budget consumed in the last 24 hours), to spot a slow degradation that has not yet tripped an alert.

The dashboard is the on-call engineer’s first stop. The alert fires into the runbook; the dashboard tells the engineer which scope (Part XCIX-01) the failure belongs to and whether the replica (Part XCIX-03) is current.

Mapping alerts to the runbook

Every alert fires into a runbook entry. The mapping:

  • RegistryPullLatencyHigh → Part XCIX-01 (the registry failure scenario) — check the scope of the failure.
  • RegistryPullErrorRateHigh → Part XCIX-02 (the impact on deployment) — confirm the tier of degradation.
  • RegistryReplicationLagHigh → Part XCIX-03 (the replication strategy) — promote the replica if the lag exceeds the RTO.
  • RegistryStorageNearFull → Part XCVII-05 (the registry recovery) — schedule garbage collection before the registry starts rejecting pushes.

The mapping is written in the alert’s runbook_url annotation; the alert fires with a link to the runbook entry. The on-call engineer opens the runbook, follows the steps, and confirms the recovery in the dashboard.

Production discipline

  1. The four production metrics are pull latency, pull error rate, storage used, replication lag. A registry that is not monitored on all four is a registry with blind spots.
  2. Alert thresholds are derived from SLOs. The SLOs are written before the incident; the alerts are configured from the SLOs.
  3. The dashboard is the on-call engineer’s first stop. The alert fires the runbook; the dashboard tells the engineer which scope the failure is.
  4. Every alert has a runbook URL. The on-call engineer follows the link, not the alert text.
  5. Alerts are windowed, not lifetime. A five-minute window catches the degradation that a lifetime average hides.

Cross-course references

  • Git, CI/CD & GitOps — Part XCIX-01 (The Registry Failure Scenario) is the runbook the latency and error-rate alerts fire into.
  • Git, CI/CD & GitOps — Part XCIX-03 (Registry Replication) is the runbook the replication-lag alert fires into.
  • Git, CI/CD & GitOps — Part XCVII-05 (Recovering the Artifact Registry) is the runbook the storage alert fires into.

Quiz

Knowledge check · 4 questions

  1. Q1. A team's registry is monitored on pull latency p99, pull error rate, storage used, and replication lag. The p99 has climbed from 1.5s to 4s over the last ten minutes. The error rate is unchanged at 0.01%. What is the correct interpretation?

  2. Q2. An alert configured on a lifetime average error rate catches a sustained five-minute degradation that has not yet affected the lifetime number.

  3. Q3. Name the four production metrics for an artifact registry and the SLO or alert threshold for each.

  4. Q4. Diagnose the alert configuration gap and recommend the alert thresholds.

    A team monitors its private Harbor registry on storage used only. The storage alert fires at 90% full and pages the on-call engineer. The team has no alerts on pull latency, pull error rate, or replication lag. The team recently suffered an outage where the manifest endpoint returned 503 for forty-five minutes; the on-call engineer was paged by a downstream team (the deploy log) after the deploys had already started failing. The team has a cross-region replica in a second region; the replication lag has never been measured.

Passing score: 75%. Answers are checked in this browser.