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.

Four-stage continuous topology governance flow from eBPF kernel capture to deterministic change veto gate

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:

  1. 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.
  2. 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.
  3. 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)$.
  4. 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.

Four physical constraints where static CMDBs fail against ephemeral workloads and shadow connections

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

ApproachHow Dependencies Are CapturedWhere It BreaksDecision
Manual ITIL CMDB + CrawlersHuman change tickets and scheduled API pollingBlind to ephemeral pods and unapproved JDBC clients; slow recursive SQL joinsRejected — structural drift
Application OTel SDK TracingLanguage SDKs injecting traceparent headersMisses legacy binaries, sidecars, and uninstrumented batch jobs; head-sampling drops rare jobsRejected — incomplete coverage
Service Mesh Telemetry OnlyEnvoy sidecar L7/L4 metricsBlind to workloads outside the mesh and direct host-network DB connectionsPartial — useful supplement only
eBPF + Property Graph + Vectorized RAGKernel sockops, DB session catalogs, GitOps pins, Neo4j, and versioned runbooksRequires kernel 5.8+ for BPF_MAP_TYPE_RINGBUF and proxy identity propagationChosen — ground-truth topology

Comparison of manual CMDB, OpenTelemetry SDK tracing, and eBPF plus property graph architecture

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.

Three-plane architecture separating eBPF and catalog ingestion, Neo4j property graph, and LLM policy gate

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 sockops program switches on skops->op for BPF_SOCK_OPS_TCP_CONNECT_CB (active client SYN sent) and BPF_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_RINGBUF map (introduced in Linux 5.8), whose max_entries size 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 with ring_buffer__new() and consumes events via mmap and ring_buffer__poll(), which blocks on epoll until the kernel signals new records. The daemon resolves CGroup IDs against the local Kubelet API into pod_name, namespace, service_account, and git_commit_sha, then aggregates pod-level sockets up to the parent Deployment or StatefulSet so pod restarts do not churn graph nodes.
  • Database Session Enrichment: Collectors concurrently query pg_stat_activity on PostgreSQL (client_addr, usename, application_name, state) or v$session on 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 engine and major_version metadata 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 DatabaseInstance and Microservice node stores runbook_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:

  1. 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
  1. Policy Retrieval: Fetch the version-filtered runbook chunks referenced by the target database and every discovered Tier-1 node.
  2. Schema-Validated Verdict: The LLM synthesizes the traversal path and SLA constraints into a strict JSON verdict (APPROVE or VETO). 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:

Four-phase rollout from passive eBPF audit to enforced CI/CD policy veto with deterministic fallback

  1. Phase 1 — Passive Telemetry Audit: Deploy the eBPF sockops collector 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.
  2. Phase 2 — Graph Ingestion & GitOps Pinning: Stream socket and database catalog events into Neo4j, aggregate ephemeral pods to their parent Deployment or StatefulSet, and import declarative GitOps edges for monthly or quarterly batch jobs. Gate: depth-capped Cypher BFS p99 latency stays predictable under peak node churn.
  3. Phase 3 — Shadow Veto Mode: Wire the CI/CD pre-flight hook to run the Cypher traversal, retrieve vectorized runbooks, and log APPROVE/VETO JSON payloads without failing builds. Platform engineers audit every VETO against actual change outcomes. Gate: zero false-positive blocks over consecutive maintenance cycles.
  4. Phase 4 — Enforced Gate with Deterministic Fallback: Switch the CI/CD hook to enforce VETO responses 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 kprobes on send() and recv() with user-space uprobes on TLS libraries (OpenSSL, Go crypto/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_activity view exposes client_addr, usename, application_name, and state, while Oracle’s v$session exposes MACHINE, PROGRAM, USERNAME, and MODULE. Joining these views with kernel socket tuples resolves which database role and application binary owns a given TCP stream.

Where It Breaks

Edge CaseFailure MechanismConsequenceDetection & Mitigation
Ephemeral Pod SprawlAutoscaling 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 MaskingProxies 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 JobsMonthly 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 OpacityKernel 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 OverflowReconnect 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 ShardingClients 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 RAGVector 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 TraversalMonoliths 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.

Four failure paths breaking naive eBPF topology graphs: proxy masking, TTL pruning batch jobs, TLS opacity, and ring buffer drops

April 2026 Update

Between 2023 and 2026, three ecosystem shifts made this pattern easier to standardize:

  1. eBPF + Uprobe Correlation: While kernel sockops hooks remain blind to TLS ciphertext on their own, production eBPF collectors increasingly pair kernel socket tracing with uprobes on OpenSSL/Go TLS or kTLS offload and OpenTelemetry traceparent extraction to unify L4 topology with L7 SQL context.
  2. 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.
  3. 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 sockops hooks 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_name forwarding 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 VETO in 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)