The Vectorized Runbook: Replacing CMDBs with Graph Databases and LLMs
Content reflects the state as of October 2026. AI tooling and model capabilities in this area change frequently.
A Configuration Management Database (CMDB) documents what an architect hoped the system looked like rather than the living topology executing in production.
TL;DR
- Problem: Manual ITIL CMDBs drift behind ephemeral Kubernetes workloads and shadow JDBC connections, hiding Tier-1 blast radiuses during database maintenance.
- Answer: Stream kernel-level eBPF socket telemetry and database session views into a Neo4j property graph, bind vectorized runbooks to nodes, and gate CI/CD changes with bounded Cypher traversals.
- Watch out: Connection poolers (PgBouncer) and mTLS sidecars mask client IPs, and naive 72-hour graph TTLs prune monthly batch jobs unless pinned via GitOps.
Situation
Enterprise infrastructure has shifted from static server fleets to ephemeral compute meshes. Across multi-tenant Kubernetes clusters and managed database replica sets, pods reschedule and scale continuously. Under ITIL governance, teams register service-to-database dependencies manually in a central CMDB such as ServiceNow or Jira Service Management. Database Administrators (DBAs) and Site Reliability Engineers (SREs) query those records to approve change windows, kernel patches, and schema migrations.
As deployment pipelines moved to continuous delivery, the gap between human-maintained CMDB entries and live TCP sockets turned into an operational blind spot. A service can scale out, open a connection pool to a backend database, and serve customer traffic before any ticket or daily CMDB discovery crawler records the edge.
The Problem
Relying on human-governed CMDBs to calculate maintenance blast radiuses fails against four physical constraints:
- Governance Latency vs. Ephemeral Lifecycles: Kubernetes controllers and autoscalers mutate pod-to-database connections in seconds, whereas CMDB updates depend on human tickets or periodic batch crawlers running on multi-hour or daily schedules. If a CMDB discovery job runs every 24 hours, any workload scaled out or deployed after the sweep has an average blind window of 12 hours and a worst-case blind window of 24 hours before its dependencies appear in change review.
- Shadow Microservice Dependencies: Application teams under delivery pressure frequently open direct JDBC or ODBC connections to an internal reporting or analytics database instead of routing through an approved API gateway. Because the CMDB still classifies that database as isolated Tier-3 infrastructure, a daytime restart drops upstream Tier-1 traffic.
- Relational Modeling of Cyclic Graphs: Traditional CMDBs store configuration items in relational tables. Computing a transitive blast radius—walking 3 to 5 hops from a target database through intermediate services to customer-facing APIs—requires recursive SQL Common Table Expressions (
WITH RECURSIVE) or multi-way self-joins. On a cyclic dependency graph with fan-out $b$ and depth $d$, relational join intermediates grow as $O(b^d)$ unless cycle-tracked, whereas an adjacency-indexed property graph traversal visits each reachable vertex and edge once in $O(V + E)$. - Detached Runbook State: Standard Operating Procedures (SOPs) and SLA constraints live in unindexed Markdown or Wiki pages. During an incident or maintenance check, engineers manually search documents, match hostnames against stale inventory, and verify whether commands apply to the running database engine version.
The core engineering question is: How can platform teams construct a self-updating dependency graph from live kernel telemetry and bind it to operational runbooks so CI/CD pipelines evaluate blast radiuses deterministically without manual CMDB tickets?
Options Considered
| Approach | How Dependencies Are Captured | Where It Breaks | Decision |
|---|---|---|---|
| Manual ITIL CMDB + Crawlers | Human change tickets and scheduled API polling | Blind to ephemeral pods and unapproved JDBC clients; slow recursive SQL joins | Rejected — structural drift |
| Application OTel SDK Tracing | Language SDKs injecting traceparent headers | Misses legacy binaries, sidecars, and uninstrumented batch jobs; head-sampling drops rare jobs | Rejected — incomplete coverage |
| Service Mesh Telemetry Only | Envoy sidecar L7/L4 metrics | Blind to workloads outside the mesh and direct host-network DB connections | Partial — useful supplement only |
| eBPF + Property Graph + Vectorized RAG | Kernel sockops, DB session catalogs, GitOps pins, Neo4j, and versioned runbooks | Requires kernel 5.8+ for BPF_MAP_TYPE_RINGBUF and proxy identity propagation | Chosen — ground-truth topology |
Manual CMDBs fail because human compliance cannot keep pace with automated orchestration. Application-level OpenTelemetry tracing provides rich SQL context when every binary is instrumented, yet a single uninstrumented vendor container or legacy cron job breaks completeness. Worse, production tracing pipelines routinely apply head-based sampling (for example, keeping 1% to 5% of traces to control collector cost), which statistically drops low-frequency batch jobs that run only a few times per week. Service mesh sidecars solve instrumentation for HTTP/gRPC traffic inside the mesh, but databases often run on dedicated VMs or RDS endpoints outside the mesh, or receive connections from host-networked utilities. Attaching eBPF probes at the Linux kernel socket layer captures every TCP connection from the host regardless of language runtime, while GitOps declarations preserve rare scheduled jobs that fall outside active observation windows.
The Graph-Driven RAG Architecture: Continuous Topology Mapping
To keep documentation aligned with runtime state, the platform treats the kernel network path as the primary source of truth and layers three planes: telemetry ingestion, property graph storage, and bounded policy reasoning.
flowchart TD
A[eBPF Socket Probes — sockops] --> D[Neo4j Property Graph Engine]
B[DB Session Views — pg_stat_activity] --> D
C[GitOps Repo — Declarative CRDs] --> D
E[CI/CD Pipeline — Change Intent] --> F[LLM Policy Gate]
F --> D
F --> G[Vector Runbook Store — pgvector]
F --> E
1. Kernel-Level Telemetry Ingestion via eBPF
Rather than injecting sidecars or modifying application code, the ingestion plane attaches BPF_PROG_TYPE_SOCK_OPS programs (available since Linux 4.13) to cgroups on every container host and database VM:
- Socket Layer Interception: The
sockopsprogram switches onskops->opforBPF_SOCK_OPS_TCP_CONNECT_CB(active clientSYNsent) andBPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB(server handshake established). - Metadata Extraction: On database port matches (e.g., PostgreSQL 5432, Oracle 1521, MongoDB 27017), the probe records source IP, source port, destination IP, destination port, and CGroup ID.
- Ring Buffer Streaming: Events are written to a
BPF_MAP_TYPE_RINGBUFmap (introduced in Linux 5.8), whosemax_entriessize must be a power-of-two multiple of the kernel page size (typically 4 KB). Unlike per-CPU perf buffers (BPF_MAP_TYPE_PERF_EVENT_ARRAY), a shared multi-producer, single-consumer ring buffer preserves chronological event ordering across CPUs and avoids per-CPU memory fragmentation. A user-space Go or C daemon initializes the reader withring_buffer__new()and consumes events viammapandring_buffer__poll(), which blocks onepolluntil the kernel signals new records. The daemon resolves CGroup IDs against the local Kubelet API intopod_name,namespace,service_account, andgit_commit_sha, then aggregates pod-level sockets up to the parentDeploymentorStatefulSetso pod restarts do not churn graph nodes. - Database Session Enrichment: Collectors concurrently query
pg_stat_activityon PostgreSQL (client_addr,usename,application_name,state) orv$sessionon Oracle (MACHINE,PROGRAM,USERNAME,MODULE) to join client socket IPs with authenticated database roles and active query states. This join also reveals whether a connection terminates at a shared pooler or directly at an application pod.
2. Living Property Graph Topology Schema
Resolved metadata streams into Neo4j as attributed nodes and directed edges:
// Property Graph Node Definitions
(:Microservice {
name: 'mobile-auth-service',
tier: 'Tier-1',
namespace: 'prod-api',
owner_team: 'identity-platform'
})
(:DatabaseInstance {
name: 'db-user-credentials-primary',
engine: 'PostgreSQL-15.4',
tier: 'Tier-1',
endpoint: '10.240.12.84:5432'
})
// Attributed Relationship Created by eBPF Telemetry
(app:Microservice)-[:ESTABLISHES_TCP {
target_port: 5432,
protocol: 'PostgresWireProtocol',
last_observed: datetime('2023-01-15T14:32:00Z'),
active_connections: 32,
source: 'ebpf'
}]->(db:DatabaseInstance)
To prevent ephemeral pod churn from bloating the graph, dynamic ebpf-sourced edges carry a Time-To-Live (TTL). A scheduled Cypher maintenance job prunes dynamic edges where last_observed < datetime() - duration('P3D') (72 hours), while preserving edges tagged source: 'gitops' so infrequent batch dependencies remain intact.
3. Vectorized Runbook Architecture
Maintenance runbooks, SLA windows, and engine-specific locking constraints are chunked by structural section and stored in a vector index (pgvector or Milvus):
- Version-Scoped Metadata: Each vector record stores
engineandmajor_versionmetadata alongside the embedding so retrieval filters out obsolete operational rules (for example, legacy MySQL 5.7 locking caveats when evaluating a MySQL 8.0 cluster). - Bi-Directional Graph Binding: Every
DatabaseInstanceandMicroservicenode storesrunbook_vector_ids, linking physical topology directly to policy constraints.
4. Bounded Agentic Reasoning and Blast Radius Evaluation
When a CI/CD pipeline requests a database patch or schema migration, the orchestrator executes three steps:
- Depth-Capped Cypher Traversal: Query Neo4j with a strict hop ceiling (
*1..4) to find upstream Tier-1 services:
MATCH (target:DatabaseInstance {name: $database_name})
MATCH path = (root:Microservice)-[:CALLS|ESTABLISHES_TCP*1..4]->(target)
WHERE root.tier = 'Tier-1'
RETURN root.name AS critical_service,
root.owner_team AS owner,
length(path) AS dependency_depth,
[n in nodes(path) | coalesce(n.name, labels(n)[0])] AS traversal_path
- Policy Retrieval: Fetch the version-filtered runbook chunks referenced by the target database and every discovered Tier-1 node.
- Schema-Validated Verdict: The LLM synthesizes the traversal path and SLA constraints into a strict JSON verdict (
APPROVEorVETO). Deterministic rules still hold final authority: if an active Tier-1 edge exists outside the approved maintenance window, the pipeline blocks regardless of LLM phrasing.
{
"verdict": "VETO",
"risk_score": 92,
"target_entity": "db-user-credentials-primary",
"reason": "Live upstream dependency detected: mobile-checkout-api (Tier-1) holds active sockets via eBPF. Maintenance outside Sun 02:00-04:00 UTC violates SLA policy DOC-8493.",
"recommended_action": "Reschedule maintenance window or drain client traffic via replica failover."
}
How It Rolls Out
Deploying an autonomous veto gate directly into production CI/CD without calibration will block legitimate releases. Roll out the system across four gated phases:
- Phase 1 — Passive Telemetry Audit: Deploy the eBPF
sockopscollector as a DaemonSet on non-production nodes first, then production read-only. Diff observed client IPs against existing CMDB records. Gate: zero ring buffer drops and verified host CPU overhead within budget before advancing. - Phase 2 — Graph Ingestion & GitOps Pinning: Stream socket and database catalog events into Neo4j, aggregate ephemeral pods to their parent
DeploymentorStatefulSet, and import declarative GitOps edges for monthly or quarterly batch jobs. Gate: depth-capped Cypher BFS p99 latency stays predictable under peak node churn. - Phase 3 — Shadow Veto Mode: Wire the CI/CD pre-flight hook to run the Cypher traversal, retrieve vectorized runbooks, and log
APPROVE/VETOJSON payloads without failing builds. Platform engineers audit everyVETOagainst actual change outcomes. Gate: zero false-positive blocks over consecutive maintenance cycles. - Phase 4 — Enforced Gate with Deterministic Fallback: Switch the CI/CD hook to enforce
VETOresponses for Tier-1 blast radius collisions. If the LLM endpoint times out or fails JSON schema validation, fall back to a deterministic rule (block if any active Tier-1 edge exists outside the declared window). Rollback: flip a single pipeline feature flag back to log-only mode.
In Practice
I have not operated an LLM-enforced CMDB veto gate at enterprise scale personally; the architecture above synthesizes documented eBPF observability systems and native database catalog behavior.
- Kernel-Level Service Dependency Mapping (Cilium Hubble): In Kubernetes environments running Cilium, Hubble attaches eBPF hooks to kernel traffic control (TC) and socket data paths to track L3/L4/L7 flows—source and destination pods, namespaces, ports, and TCP states—and aggregates them into cluster-wide service dependency maps without application code changes (Cilium Hubble).
- Zero-Instrumentation Database Protocol Tracing (Pixie): Pixie (a CNCF project) deploys an edge module per node that combines kernel
kprobesonsend()andrecv()with user-spaceuprobeson TLS libraries (OpenSSL, Gocrypto/tls) to parse PostgreSQL, MySQL, Redis, Cassandra, and MongoDB requests in plaintext before encryption or after decryption (Pixie Architecture). - Database Session Correlation (PostgreSQL & Oracle): PostgreSQL’s
pg_stat_activityview exposesclient_addr,usename,application_name, andstate, while Oracle’sv$sessionexposesMACHINE,PROGRAM,USERNAME, andMODULE. Joining these views with kernel socket tuples resolves which database role and application binary owns a given TCP stream.
Where It Breaks
| Edge Case | Failure Mechanism | Consequence | Detection & Mitigation |
|---|---|---|---|
| Ephemeral Pod Sprawl | Autoscaling churns thousands of pod IPs per hour. | Neo4j accumulates dead nodes, slowing BFS traversals. | Aggregate pod edges to parent Deployment or StatefulSet; run 72h TTL pruning. |
| PgBouncer & mTLS Proxy Masking | Proxies multiplex client traffic over shared backend sockets. | pg_stat_activity and kernel sockets show only the proxy IP. | Propagate application_name in pooler startup params; ingest Envoy/proxy access logs. |
| Infrequent Batch Jobs | Monthly or quarterly reconciliation jobs run once every 30+ days. | 72h TTL evicts the edge; gate misclassifies DB as isolated. | Pin declarative GitOps edges with source: 'gitops' so TTL jobs skip them. |
| TLS Socket Opacity | Kernel sockops sees encrypted ciphertext on TLS-enabled DB links. | Socket probes cannot parse SQL statements or catalog names. | Attach uprobes to OpenSSL/Go TLS (like Pixie) or rely on DB session views for L7 metadata. |
| Ring Buffer Overflow | Reconnect storms saturate BPF_MAP_TYPE_RINGBUF. | Kernel drops socket events; new dependencies disappear briefly. | Size ring buffers as a power-of-2 page multiple; alert on ringbuf drop counters. |
| DNS Read-Replica Sharding | Clients hit a round-robin DNS alias across read replicas. | Graph edges fragment across ephemeral replica IPs. | Roll up replica IPs to a single DatabaseCluster parent node in Neo4j. |
| Unversioned Runbook RAG | Vector search retrieves legacy engine SOPs (e.g., MySQL 5.7 rules for 8.0). | Gate enforces obsolete locking or downtime policies. | Filter vector queries strictly by engine and major_version metadata. |
| High Fan-Out Traversal | Monoliths connect to hundreds of databases across domains. | Deep graph traversals overflow LLM context tokens. | Cap Cypher paths at *1..3 or *1..4; enforce strict JSON schema output. |
April 2026 Update
Between 2023 and 2026, three ecosystem shifts made this pattern easier to standardize:
- eBPF + Uprobe Correlation: While kernel
sockopshooks remain blind to TLS ciphertext on their own, production eBPF collectors increasingly pair kernel socket tracing withuprobeson OpenSSL/Go TLS or kTLS offload and OpenTelemetrytraceparentextraction to unify L4 topology with L7 SQL context. - Standardized Model Context Protocol (MCP) Tools: Rather than writing bespoke pipeline glue, teams expose Neo4j traversal queries and vector runbook lookups as typed, read-only MCP tools behind explicit authorization boundaries.
- Typed GraphRAG over Ad-Hoc Cypher: Production gates avoid letting LLMs generate raw Cypher; instead, models invoke parameterized, depth-capped graph traversal functions and return schema-validated verdicts backed by deterministic fallback rules.
Key Takeaways
- Treat the kernel socket layer, not human tickets, as topology ground truth: eBPF
sockopshooks capture uninstrumented and shadow database connections that manual CMDBs and SDK-based tracing miss. - Combine dynamic TTLs with declarative GitOps pins: Prune ephemeral pod edges automatically after 72 hours, but pin monthly or quarterly batch edges from GitOps manifests so rare jobs are never erased.
- Keep the LLM out of raw query generation: Run parameterized, depth-capped Cypher traversals (
*1..4) and version-filtered vector lookups, and enforce a deterministic fallback if the model times out. - Propagate identity through poolers and proxies: Without
application_nameforwarding in PgBouncer or Envoy metadata ingestion, kernel telemetry collapses all upstream clients onto the proxy IP. - Roll out in shadow mode first: Validate zero ring buffer drops and audit every
VETOin log-only CI/CD mode before letting an automated gate block production maintenance.
What to Do Next
- Problem: Verify whether your database maintenance approvals still depend on manual CMDB tickets and human memory to identify Tier-1 upstream callers.
- Solution: Replace static CMDB dependency tables with a continuous Neo4j topology graph fed by eBPF socket telemetry, database session catalogs, and GitOps manifests, linked to versioned runbooks.
- Proof: Deploy Cilium Hubble or an eBPF socket collector in passive audit mode on a staging cluster and diff the observed client IPs against your CMDB records.
- Action: Export your database maintenance SOPs with explicit engine-version metadata, stand up a depth-capped Cypher blast-radius query, and run the CI/CD gate in shadow log-only mode this week.
Sources to Verify
- Linux Kernel Documentation: BPF Ring Buffer (
docs.kernel.org/bpf/ringbuf.html) - eBPF Documentation: BPF_PROG_TYPE_SOCK_OPS (
ebpf.io) - Cilium Documentation: Hubble Observability and Service Dependency Maps (
cilium.io/use-cases/hubble/) - Pixie Documentation: How Pixie Works — eBPF kprobes and TLS uprobes (
docs.px.dev/about-pixie/how-pixie-works/) - Neo4j Cypher Manual: Temporal Durations and Variable-Length Patterns (
neo4j.com/docs/cypher-manual/current/values-and-types/temporal/) - PostgreSQL Documentation: The Statistics Collector — pg_stat_activity (
postgresql.org/docs/current/monitoring-stats.html)