BXUP Track progress & test yourself — free
Database & ERP · Playbook · Core · ~4 min read
DATABASE & ERP · PLAYBOOK · CORE

Answer Fleet Questions in Natural Language

"Which instances grew 10% this month, and why?" should not take an afternoon of spelunking across dashboards. Wire an assistant over your monitoring data with a curated metric vocabulary, and fleet questions get first-draft answers in seconds — trustworthy ones, because the vocabulary pins what every term means before the model answers.

Tier: Core · Workflow area: Governed Data Access · ~30 minutes

DBAs managing dozens of instances field the same estate questions weekly: capacity trends, version spread, backup status, who is burning IOPS. The data exists in pganalyze, Prometheus, CloudWatch or your homegrown metrics schema — the friction is translation. The trap in naive setups is vocabulary drift: "growth" meaning disk one day and row count the next. This playbook curates the vocabulary first, wires the assistant second, and keeps a verification habit for any answer that leaves your screen.

When to use

  • Fleet-level questions with fuzzy phrasing but precise answersgrowth outliers, connection saturation, replication lag patterns, patch posture across 40 instances.
  • Recurring management asksthe monthly capacity summary, the "anything worrying?" check. An assistant with vocabulary turns these from an hour into a review pass.
  • On-call context beyond one incidentpb-19 covers a single database mid-incident; this playbook is the estate view around it: "has this happened on other replicas this week?"

When NOT to use

  • As an alerting replacementassistants answer questions; they do not watch. Thresholds, pages and SLOs stay in the monitoring system.
  • When the metrics themselves are untrustworthygaps in collection, unlabeled instances, stale inventory. Fix the telemetry first; a fluent narrator over bad data is worse than no narrator.
  • For decisions executed in the same breath"which instance should we fail over" can be asked; the failover itself is a human action through change control, per this track's standing rule.

The recipe

  1. Curate the metric vocabulary — the trust foundation. Write the definitions file: every term the assistant may use, with its exact source and computation:

    # fleet-vocabulary.md
    - disk_growth_pct: (bytes_now - bytes_30d_ago) / bytes_30d_ago,
      from pganalyze storage metrics, per database, 30-day window.
    - connection_saturation: max(connections)/max_connections daily
      peak, from pg_stat_activity samples.
    - replica_lag_p95: 95th percentile replay lag over 7 days, seconds.
    - unpatched: minor version older than newest minor for its major.
    - grew_significantly: disk_growth_pct >= 10.
    

    Ten to twenty terms cover most fleet questions. This file is a governed artifact: reviewed, versioned, and pasted into every session — it is what makes two askers get the same answer.

  2. Expose the data read-only — API or MCP, fenced as always. Two good shapes: an assistant calling the pganalyze API (or Prometheus HTTP API) with a scoped read token, or a pb-34-guardrailed MCP server over your metrics warehouse. Either way the fence rules hold: read-only credentials, scoped to metrics (never production application data), rate-limited, logged.

  3. Write the system prompt around the vocabulary and an honesty rule.

    You answer database-fleet questions using ONLY the metrics
    reachable through your tools, interpreted per the attached
    vocabulary. Rules:
    - Map user phrasing to vocabulary terms; state the mapping in
      your answer ("interpreting 'grew a lot' as disk_growth_pct
      >= 10").
    - Every numeric claim cites instance, metric and window.
    - If data is missing or a term is not in the vocabulary, say so
      — never estimate.
    - For "why" questions, list ranked hypotheses with the evidence
      for each; do not assert a single cause.
    [attach fleet-vocabulary.md]
    
  4. Ask the real question and demand the evidence trail.

    Which instances grew 10% or more this month, and what is driving
    the growth on each?
    

    A good answer looks like: 3 of 41 instances at disk_growth_pct >= 10: orders-prod (+14%, driver: audit_log table +38 GB, matches retention change on Jul 12), analytics-replica (+12%, WAL accumulation — replication slot inactive since Jul 28 [warn]), hr-db (+11%, pg_largeobject growth, no hypothesis — needs a look). The shape to insist on: number, source, window, and a hypothesis explicitly separated from a fact.

  5. Verify one claim per answer — the spot-check habit. Before any answer leaves your screen, pick the highest-stakes claim and check it at the source:

    SELECT pg_size_pretty(pg_database_size('orders'));
    -- against last month's recorded size in the metrics store
    

    One check per answer is cheap insurance and continuous calibration: when spot-checks keep passing, trust is earned; the first miss tells you a vocabulary term or a collector is broken — both worth knowing immediately.

  6. Grow the vocabulary from the miss log. Keep a running note of questions the assistant refused or fumbled. Weekly, promote the recurring ones into new vocabulary terms with proper definitions — refusals are your requirements backlog. The vocabulary file's git history becomes a record of what your org actually asks its estate.

Make it yours

  • pganalyzeits API and MCP-style integrations expose per-database metrics cleanly; your vocabulary maps nearly one-to-one onto its metric names, which shortens step 1.
  • Prometheus/Grafana estatesdefine each vocabulary term as a named PromQL expression and let the assistant call the HTTP API with those exact queries; the model never composes raw PromQL for published answers.
  • CloudWatch / Azure Monitor fleetssame pattern over the metrics APIs with a read-only cloud role; watch API cost on wide historical scans and pre-aggregate the 30-day windows into a summary table the assistant reads instead.
  • SQL Server estatesa central management warehouse fed by your collection jobs (or a monitoring product's repository database) becomes the MCP target; vocabulary terms map to DMV-derived aggregates.

Quality check

  • Every term in every answer traces to the vocabulary fileif the assistant used a concept you never defined, that answer is a draft, and the term goes into the backlog or the bin.
  • Numeric claims carry instance, metric and windowan uncited fleet number is a rumor with confidence. The citation format is enforced by the prompt and checked by you.
  • The spot-check habit has a hit rate you trackyou know how often verification passes. That number, not the prose quality, is your trust dial.
  • "Why" answers are labeled hypotheses until confirmedthe assistant ranks causes with evidence; a human confirms before any cause becomes the story in a ticket or a management summary.
Warning

Fleet metadata is a reconnaissance map — instance names, versions, patch gaps and growth patterns tell an attacker exactly where to look. Keep the metrics surface read-only and internal, treat "which instances are unpatched" answers as sensitive, and never route fleet inventory through a consumer AI account.

Pro Tip

The vocabulary file outlives the assistant. It is your estate's metric contract — the same definitions feed dashboards, capacity reviews and the next tool you adopt. Curate it like code, and natural-language fleet answers become the cheapest interface to a discipline you already had.

This is the free reading view. Open BXUP to track your progress, run the hands-on labs, and prove it with original, exam-pattern assessments.
© Anvi Innovate · BXUP — Be Exponentially Upskilled · BXUP is an independent learning platform, not affiliated with or endorsed by AWS, Microsoft, Google, NVIDIA, IBM, Salesforce, Databricks, Oracle or Anthropic. All trademarks belong to their respective owners. · bxup.in