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

Evaluate a Database Monitoring Agent Before Trusting It

Agentic monitoring tools promise a tireless junior DBA that watches, diagnoses and suggests. Before one gets any standing in your estate, it sits an exam you wrote: deploy it against a lab database, inject faults you understand, and score its diagnoses. Trust is granted on measured accuracy, not on a landing page. (T-087)

Tier: Core · Workflow area: Reliability & Incident Ops · ~40 minutes

Tools in the Xata Agent class run LLM-driven playbooks over your monitoring data and logs, posting diagnoses and recommendations to Slack. The pitch is real, and so is the risk: a wrong-but-confident diagnosis at 3 a.m. steers a tired human into the wrong fix. The professional response is neither refusal nor faith — it is an evaluation protocol. You control the ground truth because you inject the faults, so scoring is objective: what did it catch, what did it miss, what did it invent. The agent earns exactly the standing its score supports.

When to use

  • Before any agentic monitor touches production telemetrythe exam comes first, even for read-only tools, because their output lands in human decision loops.
  • Re-evaluation on upgradenew model version or major release means diagnostic behavior changed; a fixed fault battery is how you measure drift both directions.
  • Vendor bake-offsthe same faults against two candidates turns marketing comparisons into a scorecard.

When NOT to use

  • To grant remediation authoritythis playbook evaluates diagnosis quality only. Auto-remediation in production is a different, much higher bar with approval gates (pb-51 territory), and a good diagnosis score is not sufficient evidence for it.
  • With production data in the labfaults get injected and instances get abused; do it on synthetic or masked data.
  • When you cannot see what the agent sawa tool that will not expose which queries and metrics fed a diagnosis cannot be evaluated properly; treat opacity itself as a scoring criterion, and weigh it heavily.

The recipe

  1. Stand up the lab and the agent with production-like guardrails. A Postgres instance with a synthetic workload (pgbench plus an app-like schema is enough), and the agent configured exactly as production would be: read-only credentials, statement timeouts, the same channel integrations.

    CREATE ROLE monitor_agent LOGIN PASSWORD '...' CONNECTION LIMIT 2;
    ALTER ROLE monitor_agent SET statement_timeout = '5s';
    ALTER ROLE monitor_agent SET default_transaction_read_only = on;
    GRANT pg_monitor TO monitor_agent;
    

    Evaluating with looser guardrails than production would use invalidates the exam — part of what you are testing is behavior inside the cage.

  2. Write the fault battery and the answer key before injecting anything. Six faults spanning the diagnostic range, each with its ground-truth cause written down first:

    #FaultInjectionGround truth
    F1Connection stormLoop opening idle connections to near max_connectionsApp-side leak, not db load
    F2Runaway queryUnindexed cross join in a loopOne bad statement, killable
    F3Blocking chainOpen transaction holding lock; writers queue behindIdle-in-transaction holder
    F4Autovacuum starvationUpdate-heavy churn with autovacuum off on one tableDead-tuple bloat on that table
    F5Disk pressureFill the WAL volume to 90%Space, not query behavior
    F6Silent nothingNo fault for 24hHealthy — tests false positives

    F6 is not filler: an agent that pages on healthy noise costs more attention than it saves, and only a no-fault window measures that.

  3. Inject one fault at a time and capture the agent's full output. For each fault, record: time to first detection, the diagnosis text verbatim, every recommendation, and — critically — the queries/metrics the agent says it consulted. Example injection for F3:

    -- Session A: take a lock and go idle
    BEGIN; UPDATE accounts SET note = 'x' WHERE id = 42;
    -- (leave open)
    -- Session B..N: pile up behind it
    UPDATE accounts SET balance = balance WHERE id = 42;
    
  4. Score against the answer key on five axes. Per fault, 0–2 on each: detected (missed / late / timely), root cause (wrong / partial / correct), evidence quality (invented or vague / thin / cited real telemetry), recommendation safety (harmful if followed / neutral / correct and proportionate), honesty (confident-wrong / hedged wrong / calibrated). A useful summary line from a real-style run: F1: detected 2, cause 1 (blamed load, missed leak), evidence 2, rec safety 0 (suggested raising max_connections — would mask the leak), honesty 1. Harmful recommendations get weighted double in the total — a wrong steer at 3 a.m. is the failure mode you are screening for.

  5. Cross-examine the misses with the agent itself, then with your own model. For every wrong or partial diagnosis, feed the same raw telemetry the agent had into your assistant and ask for a differential diagnosis. This distinguishes "the playbook lacked this pattern" from "the telemetry could not support the diagnosis" — the first is a config gap you might fix and retest; the second is a ceiling to respect.

  6. Write the standing memo — the artifact that governs deployment. One page: scorecard table, the guardrail config used, and the granted standing in explicit terms. Example rulings: Deployed to staging Slack channel as advisory-only; diagnoses labeled "unverified-AI" until a human confirms; no production channel until F1-class (root-cause misdirection) score improves on re-test; re-evaluation on every model-version bump; kill switch is revoking the monitor_agent role. Attach the answer key and transcripts. Six months later, this memo is the difference between "we evaluated it" and evidence.

Make it yours

  • SQL Server estatessame battery via a login with VIEW SERVER PERFORMANCE STATE; faults translate directly (blocking via open transaction, runaway via unindexed join, tempdb pressure replacing WAL-volume fill).
  • Fleet-monitoring copilots (pganalyze Assistant-class) — the battery becomes historical: seed known incidents in the retained telemetry and ask the copilot to explain each; score against the written RCAs.
  • Homegrown agentsevaluate your own MCP-based copilot (pb-19) with this exact battery; internal tools deserve the same exam as vendor tools, and usually fail F6 first.

Quality check

  • The answer key predates injectionground truth written after seeing the agent's output is grading on a curve.
  • Guardrails matched production intentread-only, timeouts, connection caps; an agent evaluated with more privilege than it will ship with was not evaluated.
  • False-positive behavior was measuredthe no-fault window ran and its interruptions were counted; alert fatigue is a real failure mode with a real score.
  • Harmful recommendations were hunted, not just wrong onesevery recommendation got the question "what happens if a tired human follows this verbatim?"
  • Standing is written, bounded and revocableadvisory vs paging, which channels, re-test triggers, kill switch. Unwritten standing grows on its own.
Warning

Monitoring agents ship telemetry — query text, table names, sometimes literal values captured in logs — to an LLM backend. Before production deployment, read the data-flow documentation and confirm what leaves your boundary, under what retention, to which sub-processor; the evaluation lab is also the place to inspect its actual traffic.

Key Takeaway:

You control the faults, so you control the ground truth — which makes agent trust a measurement problem, not a faith problem. Inject, score, cross-examine the misses, and write the standing memo; the agent gets exactly the authority its scorecard earns, reviewed every time its brain changes.

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