<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mario Ezquerro</title>
    <description>The latest articles on DEV Community by Mario Ezquerro (@marioezquerro).</description>
    <link>https://dev.to/marioezquerro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F878530%2F7288c9b0-63e5-4a85-b7a1-be9f1234dfbd.jpeg</url>
      <title>DEV Community: Mario Ezquerro</title>
      <link>https://dev.to/marioezquerro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marioezquerro"/>
    <language>en</language>
    <item>
      <title>Pre-Inference Guardrails &amp; Prompt DLP: Stopping PII, Secrets &amp; Prompt Injection Before Your LLM</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Tue, 01 Dec 2026 09:42:23 +0000</pubDate>
      <link>https://dev.to/gde/pre-inference-guardrails-prompt-dlp-stopping-pii-secrets-prompt-injection-before-your-llm-8g9</link>
      <guid>https://dev.to/gde/pre-inference-guardrails-prompt-dlp-stopping-pii-secrets-prompt-injection-before-your-llm-8g9</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frrc3vb757k4g3tpxmdoo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frrc3vb757k4g3tpxmdoo.jpg" alt=" " width="800" height="447"&gt;&lt;/a&gt;---&lt;br&gt;
title: "Pre-Inference Guardrails &amp;amp; Prompt DLP: Stopping PII, Secrets &amp;amp; Prompt Injection Before Your LLM"&lt;br&gt;
published: true&lt;br&gt;
description: "How we built a sub-millisecond, zero-bypass Guardrails &amp;amp; Prompt DLP engine in Sarrera with 23 checksum-verified detectors, Cloudflare AI Guardrails taxonomy, Global &amp;gt; User &amp;gt; Group precedence, and SHA-256 SIEM auditing."&lt;/p&gt;
&lt;h2&gt;
  
  
  tags: ai, security, llm, opensource
&lt;/h2&gt;

&lt;p&gt;When engineering teams adopt AI coding assistants (VS Code Continue, Cline, Roo Code, Cursor) and internal chat portals (Open WebUI), security teams almost always ask the same terrifying question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"What happens the day a developer pastes a production &lt;code&gt;.env&lt;/code&gt; file, a customer IBAN, a database URI with credentials, or a real SQL dump into a prompt?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even if you self-host your LLMs on-premise, &lt;strong&gt;post-hoc auditing is too late&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The raw secret or PII has already entered the model context window.&lt;/li&gt;
&lt;li&gt;It has already been persisted in observability traces (Langfuse) and object storage (MinIO).&lt;/li&gt;
&lt;li&gt;You now have a GDPR / LOPDGDD / PCI-DSS / NIS2 / DORA compliance incident on your hands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To solve this at the root, we built a &lt;strong&gt;Pre-Inference Guardrails &amp;amp; Prompt DLP (Data Loss Prevention) Engine&lt;/strong&gt; directly into &lt;strong&gt;&lt;a href="https://github.com/Sarrera/sarrera" rel="noopener noreferrer"&gt;Sarrera&lt;/a&gt;&lt;/strong&gt; — our open-source, self-hosted Enterprise AI Inference Gateway.&lt;/p&gt;

&lt;p&gt;In this post, I'll walk through how the engine works, how we avoid false positives in source code using real mathematical checksums, how policy precedence is enforced (&lt;code&gt;Global &amp;gt; User &amp;gt; Group&lt;/code&gt;), and how every incident is logged to a tamper-evident SHA-256 SIEM chain &lt;strong&gt;without ever storing raw PII&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  Zero-Bypass Edge Architecture
&lt;/h2&gt;

&lt;p&gt;Most gateway guardrails only protect &lt;code&gt;/v1/chat/completions&lt;/code&gt;—leaving Open WebUI, &lt;code&gt;/v1/embeddings&lt;/code&gt;, or &lt;code&gt;/v1/responses&lt;/code&gt; as accidental bypass paths.&lt;/p&gt;

&lt;p&gt;In Sarrera, &lt;strong&gt;every single inference path&lt;/strong&gt; flows through the Guardrails Gatekeeper &lt;em&gt;before&lt;/em&gt; it touches LiteLLM, Ollama, or Langfuse:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  [ VS Code / Cline / Cursor / curl ]       [ Open WebUI (Chat Portal) ]
                  │                                      │
                  ▼ (HTTPS :443)                         ▼ (OPENAI_API_BASE_URL)
         ┌─────────────────┐                             │
         │   Caddy Edge    │─────────────────────────────┤
         └─────────────────┘                             ▼
                                     ┌──────────────────────────────────────┐
                                     │   Sarrera Guardrails &amp;amp; DLP Engine    │
                                     │   (Sub-millisecond Pre-Inference)    │
                                     │                                      │
                                     │  1. Resolve Identity (Key / SSO)     │
                                     │  2. Evaluate Global &amp;gt; User &amp;gt; Group   │
                                     │  3. Run 23 Checksum + AI Detectors   │
                                     │  4. Enforce: BLOCK | REDACT | AUDIT  │
                                     └──────┬──────────────────────┬────────┘
                                            │                      │ (Async, masked preview only)
                       ┌────────────────────┴──────────┐           ▼
                       ▼ (BLOCK: HTTP 400, 0 GPU)      ▼      ┌──────────────────────────┐
               [ Immediate Error ]            [ Clean Prompt ]│ SHA-256 SIEM Chain (CEF) │
                                                       │      └──────────────────────────┘
                                                       ▼
                                         [ LiteLLM → Ollama → Langfuse ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because inspection happens &lt;strong&gt;pre-inference&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blocked prompts&lt;/strong&gt; return an OpenAI-compatible HTTP &lt;code&gt;400&lt;/code&gt; (&lt;code&gt;guardrails_violation&lt;/code&gt;) in under a millisecond—consuming &lt;strong&gt;zero GPU slots and zero tokens&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redacted prompts&lt;/strong&gt; replace sensitive spans in-place (&lt;code&gt;[REDACTED:AWS_KEY]&lt;/code&gt;, &lt;code&gt;[REDACTED:FIN_IBAN]&lt;/code&gt;) across &lt;code&gt;messages&lt;/code&gt;, &lt;code&gt;prompt&lt;/code&gt;, and &lt;code&gt;input&lt;/code&gt; so developers keep working without interruption, while neither the LLM nor Langfuse ever sees the raw secret.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  23 Built-In Detectors (With Mathematical Checksums)
&lt;/h2&gt;

&lt;p&gt;Naive regex-only DLP engines are notorious for crying wolf on source code—flagging random 16-digit constants as credit cards or arbitrary strings as IDs.&lt;/p&gt;

&lt;p&gt;Sarrera combines &lt;strong&gt;Cloudflare Zero Trust DLP Predefined Profiles&lt;/strong&gt;, &lt;strong&gt;Cloudflare AI Gateway Guardrails (&lt;code&gt;P1&lt;/code&gt; + &lt;code&gt;S1–S14&lt;/code&gt;)&lt;/strong&gt;, and &lt;strong&gt;real mathematical checksum validation&lt;/strong&gt; to keep false positives near zero:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Built-In Detectors&lt;/th&gt;
&lt;th&gt;Validation &amp;amp; Standards&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;National IDs &amp;amp; Health / PHI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;es_dni_nie&lt;/code&gt;, &lt;code&gt;es_cif&lt;/code&gt;, &lt;code&gt;es_nss&lt;/code&gt;, &lt;code&gt;cf_eu_us_national_id&lt;/code&gt;, &lt;code&gt;cf_health_phi&lt;/code&gt;, &lt;code&gt;pii_email&lt;/code&gt;, &lt;code&gt;pii_phone&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Spanish &lt;strong&gt;DNI/NIF &amp;amp; NIE&lt;/strong&gt; (modulo-23 check letter), &lt;strong&gt;CIF&lt;/strong&gt; control digit, &lt;strong&gt;Social Security (NSS)&lt;/strong&gt; mod-97, US SSN, EU passports, medical/PHI records (GDPR Art. 9 / HIPAA), allowlist-aware emails &amp;amp; phones.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Financial (PCI-DSS / DORA)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;fin_iban&lt;/code&gt;, &lt;code&gt;fin_credit_card&lt;/code&gt;, &lt;code&gt;cf_swift_bic&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Spanish &amp;amp; SEPA &lt;strong&gt;IBAN (ISO 7064 MOD-97)&lt;/strong&gt;, Visa/Mastercard/Amex/Discover (&lt;strong&gt;Luhn algorithm&lt;/strong&gt;), SWIFT/BIC &amp;amp; ABA routing codes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Developer Secrets (OWASP LLM02)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;secret_cloud_api_keys&lt;/code&gt;, &lt;code&gt;secret_private_keys&lt;/code&gt;, &lt;code&gt;secret_jwt_bearer&lt;/code&gt;, &lt;code&gt;secret_db_uri&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;AWS (&lt;code&gt;AKIA&lt;/code&gt;/&lt;code&gt;ASIA&lt;/code&gt;), Azure SAS/Storage, GCP (&lt;code&gt;AIza&lt;/code&gt;), Cloudflare API tokens, GitHub (&lt;code&gt;ghp_&lt;/code&gt;/&lt;code&gt;github_pat_&lt;/code&gt;), GitLab, Slack, Stripe, OpenAI/Anthropic (&lt;code&gt;sk-&lt;/code&gt;), PEM/SSH private keys, JWT/Bearer tokens, DB URIs with embedded passwords.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI Guardrails (&lt;code&gt;P1&lt;/code&gt; / &lt;code&gt;S1–S14&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sec_prompt_injection&lt;/code&gt;, &lt;code&gt;sec_obfuscation&lt;/code&gt;, &lt;code&gt;cf_safety_harmful&lt;/code&gt;, &lt;code&gt;cf_s6_specialized_advice&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;P1&lt;/strong&gt; Prompt Injection &amp;amp; Jailbreak (EN &amp;amp; ES), &lt;strong&gt;S14&lt;/strong&gt; Code Interpreter Abuse / reverse shells / destructive commands &amp;amp; Unicode smuggling, &lt;strong&gt;S1–S11&lt;/strong&gt; malware/phishing/harmful content, &lt;strong&gt;S6&lt;/strong&gt; regulated medical/legal/financial advice.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Corporate IP &amp;amp; Abuse Limits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;infra_private_ip&lt;/code&gt;, &lt;code&gt;corp_confidential_markers&lt;/code&gt;, &lt;code&gt;corp_sql_dump&lt;/code&gt;, &lt;code&gt;cf_s8_intellectual_property&lt;/code&gt;, &lt;code&gt;limit_prompt_size&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;RFC 1918 internal IPs/domains, confidentiality headers, production &lt;code&gt;INSERT INTO&lt;/code&gt; SQL dumps, &lt;strong&gt;S8&lt;/strong&gt; license/DRM bypass markers, and max prompt size caps (Denial of Wallet protection).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Deterministic Policy Precedence: &lt;code&gt;Global &amp;gt; User &amp;gt; Group&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Enterprise security teams often need two operating modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Corporate Lockdown Mode&lt;/strong&gt;: One strict global policy applies to everyone, everywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delegated Mode&lt;/strong&gt;: Different departments (e.g., &lt;em&gt;Finance&lt;/em&gt;, &lt;em&gt;Platform Engineering&lt;/em&gt;, &lt;em&gt;R&amp;amp;D&lt;/em&gt;) or individual power users have tailored rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sarrera enforces a strict, deterministic precedence hierarchy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Is Global Policy ACTIVE (`global_policy.enabled == true`)?
 ├── YES ──▶ Enforce ONLY the Global Policy (User &amp;amp; Group policies are overridden)
 └── NO  ──▶ Delegated Mode:
              1. Does the User have an active policy?  ──▶ Enforce User Policy
              2. Else, does any of their Groups have an active policy?
                 ──▶ Merge active Group policies using most-restrictive action:
                     block &amp;gt; redact &amp;gt; audit
              3. Otherwise                             ──▶ Pass-through
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even when &lt;strong&gt;Global Policy&lt;/strong&gt; is active, administrators can still pre-configure User and Group policies in the portal—they display a clear &lt;code&gt;OVERRIDDEN BY GLOBAL&lt;/code&gt; indicator so teams can prepare delegated rules safely without weakening corporate enforcement.&lt;/p&gt;

&lt;p&gt;Identity (&lt;code&gt;user_id&lt;/code&gt;, &lt;code&gt;user_email&lt;/code&gt;, &lt;code&gt;groups&lt;/code&gt;) is resolved automatically from LiteLLM Virtual API Keys (&lt;code&gt;/key/info&lt;/code&gt; + &lt;code&gt;/user/info&lt;/code&gt;) and Sarrera SSO headers (&lt;code&gt;X-User-Email&lt;/code&gt;, &lt;code&gt;X-User-Groups&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ 3 Enforcement Actions
&lt;/h2&gt;

&lt;p&gt;Every policy defines a default action and supports per-rule overrides:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;block&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rejects the request immediately with HTTP &lt;code&gt;400&lt;/code&gt; and a clear explanation. Zero tokens or GPU slots used.&lt;/td&gt;
&lt;td&gt;Secrets, private keys, prompt injection, strict GDPR/PCI-DSS boundaries.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;redact&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Masks sensitive spans in-place (&lt;code&gt;[REDACTED:FIN_IBAN]&lt;/code&gt;) before forwarding to LiteLLM, with an optional subtle stream notice.&lt;/td&gt;
&lt;td&gt;Uninterrupted developer flow with automatic PII scrubbing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;audit&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lets the request through while logging a masked preview to the incident log and SIEM chain.&lt;/td&gt;
&lt;td&gt;Dry-run rollouts and tuning before enforcing blocks.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Interactive Governance Console &amp;amp; Live DLP Playground
&lt;/h2&gt;

&lt;p&gt;The Sarrera Admin Portal includes a dedicated &lt;strong&gt;Guardrails &amp;amp; DLP&lt;/strong&gt; section (now organized cleanly in the collapsible left sidebar) with four specialized views:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Global Policy&lt;/strong&gt;: Toggle global enforcement, apply &lt;strong&gt;4 one-click Cloudflare/Enterprise Preset Profiles&lt;/strong&gt;, fine-tune any built-in rule in-place (&lt;code&gt;min_matches&lt;/code&gt; thresholds, extra regexes, extra keywords, per-rule exceptions, custom redaction tags), create custom rules with a full CRUD editor, and &lt;strong&gt;Import/Export policies as JSON&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group &amp;amp; User Policies&lt;/strong&gt;: Manage delegated policies per company group or individual user with real-time precedence badges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live DLP Playground&lt;/strong&gt;: Test any prompt against a simulated &lt;code&gt;user_id&lt;/code&gt;, &lt;code&gt;group&lt;/code&gt;, and &lt;code&gt;model&lt;/code&gt; with 1-click realistic test payloads (DNI, IBAN, AWS Key, Prompt Injection, SQL Dump) and inspect the exact effective policy, matched rules, and redacted output before rolling out to production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incident History &amp;amp; KPIs&lt;/strong&gt;: Real-time counters for blocks, redactions, and audit alerts, with direct deep-linking to Sarrera's &lt;strong&gt;SIEM SHA-256 Chain&lt;/strong&gt; (&lt;code&gt;/certificates?tab=siem&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Tamper-Evident SHA-256 SIEM Logging (Zero Raw PII Stored)
&lt;/h2&gt;

&lt;p&gt;Every &lt;code&gt;block&lt;/code&gt;, &lt;code&gt;redact&lt;/code&gt;, or &lt;code&gt;audit&lt;/code&gt; event is forwarded asynchronously to &lt;code&gt;POST /auth/compliance/internal-event&lt;/code&gt; and appended to Sarrera's cryptographically hash-chained &lt;strong&gt;SHA-256 &lt;code&gt;CEF:0&lt;/code&gt; SIEM audit log&lt;/strong&gt; (&lt;code&gt;prev_hash → entry_hash&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Crucially, &lt;strong&gt;raw sensitive values are never stored in logs&lt;/strong&gt;—only safe masked previews (e.g., &lt;code&gt;12****78Z&lt;/code&gt; or &lt;code&gt;AKIA****MPLE&lt;/code&gt;) and rule metadata, keeping your audit trail compliant with GDPR, NIS2, DORA, and ISO 27001.&lt;/p&gt;




&lt;h2&gt;
  
  
  Built for Scale: Ready for Standalone Extraction
&lt;/h2&gt;

&lt;p&gt;Today, the engine runs in-process inside &lt;code&gt;services/discovery/guardrails_engine.py&lt;/code&gt; with sub-millisecond latency and zero extra RAM footprint, persisting policies in a dedicated &lt;code&gt;discovery_data&lt;/code&gt; Docker volume.&lt;/p&gt;

&lt;p&gt;Need heavy ML/NLP scanners like &lt;strong&gt;Microsoft Presidio&lt;/strong&gt; or &lt;strong&gt;ProtectAI LLM Guard&lt;/strong&gt; down the road? Sarrera already exposes a &lt;code&gt;GUARDRAILS_URL&lt;/code&gt; (&lt;code&gt;external_guardrails_url&lt;/code&gt;) hook so you can offload scanning to a dedicated &lt;code&gt;ai-guardrails&lt;/code&gt; microservice without touching a single line of gateway routing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try Sarrera Yourself
&lt;/h2&gt;

&lt;p&gt;Sarrera is 100% open source and runs on Docker Compose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/Sarrera/sarrera" rel="noopener noreferrer"&gt;https://github.com/Sarrera/sarrera&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guardrails &amp;amp; DLP Documentation&lt;/strong&gt;: &lt;a href="https://github.com/Sarrera/sarrera/blob/main/docs/governance-rbac/guardrails-dlp.md" rel="noopener noreferrer"&gt;docs/governance-rbac/guardrails-dlp.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Hub (Multi-Arch &lt;code&gt;amd64&lt;/code&gt;/&lt;code&gt;arm64&lt;/code&gt;)&lt;/strong&gt;: &lt;code&gt;cloudresources/sarrera-portal:latest&lt;/code&gt;, &lt;code&gt;cloudresources/sarrera-discovery:latest&lt;/code&gt;, &lt;code&gt;cloudresources/sarrera-auth:latest&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How are you protecting against prompt data leakage and secret exposure in your AI coding workflows today? Would love to hear your thoughts and detector ideas in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Adopt Pre-Existing Docker Containers with Zero Downtime: Reverse-Engineering docker-compose.yml in Gubernator v4.0</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Thu, 19 Nov 2026 11:44:51 +0000</pubDate>
      <link>https://dev.to/gde/adopt-pre-existing-docker-containers-with-zero-downtime-reverse-engineering-docker-composeyml-in-3cic</link>
      <guid>https://dev.to/gde/adopt-pre-existing-docker-containers-with-zero-downtime-reverse-engineering-docker-composeyml-in-3cic</guid>
      <description>&lt;p&gt;When you roll out a container orchestrator on a real production Linux server, you rarely start with an empty machine. Most teams face the classic &lt;strong&gt;brownfield reality&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Containers have already been running for months.&lt;/li&gt;
&lt;li&gt;Some were launched with &lt;code&gt;docker compose&lt;/code&gt;, others manually with &lt;code&gt;docker run&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Nobody remembers where the original &lt;code&gt;docker-compose.yml&lt;/code&gt; lives—or it &lt;strong&gt;doesn't exist at all&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;And rule #1 of production still applies: &lt;strong&gt;you cannot stop or restart live workloads just because you installed an orchestrator&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;strong&gt;Gubernator v4.0&lt;/strong&gt;, we tackled this exact problem head-on with a native &lt;strong&gt;Unmanaged Container Discovery &amp;amp; Zero-Downtime Stack Adoption&lt;/strong&gt; engine powered by &lt;code&gt;docker inspect&lt;/code&gt; reverse-engineering.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 The Goal: Govern Live Workloads Without Breaking Them
&lt;/h2&gt;

&lt;p&gt;Most orchestrators assume a &lt;em&gt;greenfield&lt;/em&gt; world: &lt;em&gt;"redeploy everything from scratch using my manifests."&lt;/em&gt; In practice, migrating running services usually means scheduling maintenance windows, recreating containers by hand, or painfully reconstructing YAML files line by line from raw &lt;code&gt;docker inspect&lt;/code&gt; JSON.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Gubernator v4.0&lt;/strong&gt;, brownfield adoption follows a safe, &lt;strong&gt;two-phase workflow&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Production Docker Hosts (Manager + Workers)
                      │
                      ▼  1. Non-Intrusive Scan (Zero-Touch)
  ┌──────────────────────────────────────────────────────────┐
  │           Unmanaged / Discovered (Cluster-Wide)          │
  │  • Auto-grouped by com.docker.compose.project            │
  │  • Detects standalone containers (docker run)            │
  │  • Day-1 actions: status, start, stop, restart           │
  └─────────────────────┬────────────────────────────────────┘
                        │
                        ▼  2. Reverse-Engineering (docker inspect)
  ┌──────────────────────────────────────────────────────────┐
  │       docker-compose.yml Generator + Interactive YAML    │
  │  • Extracts image, ports, volumes, networks, env, limits │
  │  • Filters image-default env vars via docker image inspect│
  │  • Optional toggle to read original host compose file    │
  └─────────────────────┬────────────────────────────────────┘
                        │
          ┌─────────────┴─────────────┐
          ▼                           ▼
  Adopt (Zero-Downtime)        Adopt &amp;amp; Redeploy
  Registers Stack &amp;amp; Tasks      Adopts and redeploys under
  without restarting anything  Gubernator DNS / Load Balancing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔎 Step 1: Multi-Node Automatic Discovery (&lt;code&gt;Unmanaged / Discovered&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;With Gubernator v4.0's new &lt;strong&gt;3-level collapsible sidebar&lt;/strong&gt;, &lt;strong&gt;Cluster → Legions [Stacks]&lt;/strong&gt; now provides two dedicated subsections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Managed Stacks&lt;/strong&gt;: your standard Gubernator-orchestrated stacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unmanaged / Discovered&lt;/strong&gt;: a cluster-wide radar that scans both the &lt;strong&gt;Manager&lt;/strong&gt; (locally) and all &lt;strong&gt;Worker Centurions&lt;/strong&gt; (over SSH) for any running or stopped container not tracked by Gubernator and not belonging to internal system infrastructure (&lt;code&gt;CORE-GBNT&lt;/code&gt;, monitoring, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Smart Automatic Grouping
&lt;/h3&gt;

&lt;p&gt;Instead of dumping a flat, noisy list of containers, Gubernator inspects Docker's native metadata:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Docker Compose Projects (&lt;code&gt;COMPOSE PROJECT&lt;/code&gt;)&lt;/strong&gt;: containers created with &lt;code&gt;docker compose&lt;/code&gt; already carry &lt;code&gt;com.docker.compose.project&lt;/code&gt;, &lt;code&gt;com.docker.compose.service&lt;/code&gt;, and &lt;code&gt;com.docker.compose.project.config_files&lt;/code&gt;. Gubernator automatically groups them into a single project card showing the detected host YAML path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standalone Containers (&lt;code&gt;DOCKER RUN&lt;/code&gt;)&lt;/strong&gt;: manually started containers appear under &lt;em&gt;Standalone&lt;/em&gt; with multi-select checkboxes, letting you adopt a single container or bundle multiple standalone containers into a brand-new Stack.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛠️ Step 2: Reverse-Engineering &lt;code&gt;docker-compose.yml&lt;/code&gt; from &lt;code&gt;docker inspect&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Clicking &lt;strong&gt;Adopt Project as Stack&lt;/strong&gt; (or &lt;strong&gt;Adopt Selected&lt;/strong&gt;) runs &lt;code&gt;docker inspect&lt;/code&gt; on the target host and synthesizes a clean, production-ready &lt;code&gt;docker-compose.yml&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Runtime identity:&lt;/strong&gt; &lt;code&gt;image&lt;/code&gt;, &lt;code&gt;container_name&lt;/code&gt;, and &lt;code&gt;restart&lt;/code&gt; (&lt;code&gt;RestartPolicy&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networking &amp;amp; ports:&lt;/strong&gt; deduplicated &lt;code&gt;ports&lt;/code&gt; (&lt;code&gt;hostIP:hostPort:containerPort&lt;/code&gt;) and custom Docker networks automatically declared as &lt;code&gt;external: true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent storage:&lt;/strong&gt; &lt;code&gt;bind mounts&lt;/code&gt; (preserving &lt;code&gt;:ro&lt;/code&gt; flags) and named volumes declared as &lt;code&gt;external: true&lt;/code&gt; so existing data is never lost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart &lt;code&gt;environment&lt;/code&gt; cleanup:&lt;/strong&gt; a common pain point with naive &lt;code&gt;docker inspect&lt;/code&gt; generators is dumping dozens of boilerplate image variables (&lt;code&gt;PATH&lt;/code&gt;, &lt;code&gt;GOSU_VERSION&lt;/code&gt;, etc.). Gubernator cross-references &lt;code&gt;docker image inspect&lt;/code&gt; and &lt;strong&gt;strips out image-default variables&lt;/strong&gt;, keeping only real user-configured environment variables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operations &amp;amp; limits:&lt;/strong&gt; overridden &lt;code&gt;command&lt;/code&gt;, &lt;code&gt;working_dir&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;, &lt;code&gt;healthcheck&lt;/code&gt;, and CPU/Memory limits (&lt;code&gt;deploy.resources.limits&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bonus — Original Host Compose File:&lt;/strong&gt; if &lt;code&gt;com.docker.compose.project.config_files&lt;/code&gt; points to a readable file on the host, the adoption dialog exposes a one-click toggle to switch between &lt;strong&gt;the &lt;code&gt;docker inspect&lt;/code&gt; reconstruction&lt;/strong&gt; and &lt;strong&gt;the original host &lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚡ Step 3: Two Adoption Modes (You Choose When to Restart)
&lt;/h2&gt;

&lt;p&gt;Inside the interactive adoption modal, you can review or tweak the generated YAML (for example, adding &lt;code&gt;depends_on&lt;/code&gt; or &lt;strong&gt;Load Balancing&lt;/strong&gt; ingress labels) and choose how to adopt:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Adopt (Zero-Downtime):&lt;/strong&gt; saves the &lt;code&gt;Stack&lt;/code&gt;, &lt;code&gt;RawComposeFile&lt;/code&gt;, &lt;code&gt;Services&lt;/code&gt;, and &lt;code&gt;Tasks&lt;/code&gt; into Gubernator's SQLite state, binding them directly to the live running containers. &lt;strong&gt;Zero restarts, zero downtime.&lt;/strong&gt; The stack immediately appears in &lt;strong&gt;Managed Stacks&lt;/strong&gt; under full Gubernator lifecycle control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adopt &amp;amp; Redeploy:&lt;/strong&gt; registers the stack and immediately triggers a managed Gubernator Redeploy to recreate it with CoreDNS records, Load Balancing routes, or updated configuration.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🧪 Live Test: Adopting a 3-Container App (&lt;code&gt;web + api + cache&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;On a 2-node cluster (&lt;code&gt;gbnt-manager&lt;/code&gt; + &lt;code&gt;gbnt-worker1&lt;/code&gt;), we spun up a standalone 3-tier &lt;code&gt;docker compose&lt;/code&gt; application completely outside Gubernator:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;legacy-demo-web&lt;/code&gt; (&lt;code&gt;nginx:alpine&lt;/code&gt;, port &lt;code&gt;8095:80&lt;/code&gt;, read-only &lt;code&gt;nginx.conf&lt;/code&gt; bind mount)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;legacy-demo-api&lt;/code&gt; (&lt;code&gt;hashicorp/http-echo:latest&lt;/code&gt;, connected over private network &lt;code&gt;legacy-net&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;legacy-demo-cache&lt;/code&gt; (&lt;code&gt;redis:7-alpine&lt;/code&gt;, named volume &lt;code&gt;legacy_redis_data&lt;/code&gt; + &lt;code&gt;healthcheck&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Opening &lt;strong&gt;Cluster → Legions [Stacks] → Unmanaged / Discovered&lt;/strong&gt; hits &lt;code&gt;GET /api/unmanaged&lt;/code&gt; and immediately detects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"total_containers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"total_groups"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"groups"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"group_key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"node-local-manager::legacy-demo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"group_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"legacy-demo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"node_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"node-local-manager"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"source_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"compose"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"compose_config_files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"/home/ubuntu/legacy-demo/docker-compose.yml"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"running_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"total_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With one click on &lt;strong&gt;Adopt Project as Stack → Adopt (Zero-Downtime)&lt;/strong&gt;, all three interconnected containers become a versioned, editable Gubernator Stack—&lt;strong&gt;without dropping a single request&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ REST API Endpoints
&lt;/h2&gt;

&lt;p&gt;For automation and CI/CD pipelines, the entire workflow is exposed behind Gubernator's RBAC layer:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/api/unmanaged&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;GET&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Scans Manager and Workers for external containers, grouped by Compose project or standalone.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/api/unmanaged/generate-compose&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reconstructs &lt;code&gt;docker-compose.yml&lt;/code&gt; from &lt;code&gt;docker inspect&lt;/code&gt; (or loads the original host Compose file).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/api/unmanaged/adopt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Registers the Stack, Services, and Tasks with &lt;strong&gt;Zero-Downtime&lt;/strong&gt; without restarting live containers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/api/unmanaged/action&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Day-1 lifecycle actions (&lt;code&gt;start&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;, &lt;code&gt;restart&lt;/code&gt;, &lt;code&gt;rm&lt;/code&gt;) on unmanaged containers.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🚀 Wrapping Up
&lt;/h2&gt;

&lt;p&gt;With unmanaged discovery and zero-downtime adoption, installing &lt;strong&gt;&lt;a href="https://github.com/gubernator-org/gubernator" rel="noopener noreferrer"&gt;Gubernator&lt;/a&gt;&lt;/strong&gt; on existing Docker servers stops being a risky migration and becomes a smooth, incremental transition:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install Gubernator&lt;/strong&gt; without touching running workloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discover&lt;/strong&gt; every Compose project and &lt;code&gt;docker run&lt;/code&gt; container across your nodes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reconstruct &amp;amp; review&lt;/strong&gt; clean &lt;code&gt;docker-compose.yml&lt;/code&gt; manifests automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adopt&lt;/strong&gt; services into managed stacks with zero downtime.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Have you ever had to reconstruct a lost &lt;code&gt;docker-compose.yml&lt;/code&gt; in production from raw &lt;code&gt;docker inspect&lt;/code&gt; output? Drop your war stories in the comments!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>opensource</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>RackDoc Now Includes a 100% Local AI Agent to Audit Your Infrastructure</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Tue, 17 Nov 2026 14:02:44 +0000</pubDate>
      <link>https://dev.to/gde/rackdoc-now-includes-a-100-local-ai-agent-to-audit-your-infrastructure-1gg8</link>
      <guid>https://dev.to/gde/rackdoc-now-includes-a-100-local-ai-agent-to-audit-your-infrastructure-1gg8</guid>
      <description>&lt;p&gt;If you manage inf&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxm47g4dk3393hp4xdesd.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxm47g4dk3393hp4xdesd.webp" alt=" " width="800" height="447"&gt;&lt;/a&gt;rastructure, you already know two things: documentation is always one step behind reality, and &lt;strong&gt;uploading your network topology, VLANs, and internal IPs to a cloud AI is simply not an option&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s why I’ve integrated a &lt;strong&gt;Local AI Agent&lt;/strong&gt; directly into &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/rackdoc" rel="noopener noreferrer"&gt;RackDoc&lt;/a&gt;&lt;/strong&gt;, my open-source, local-first tool for documenting servers, racks, and technical dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  No Cloud, No Telemetry, and Air-Gapped Ready
&lt;/h2&gt;

&lt;p&gt;The agent runs entirely on your own infrastructure, connecting directly to your local instance's inventory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total Privacy:&lt;/strong&gt; Your IP ranges, hostnames, and network diagrams never leave your machine or data center.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Available When Everything Else Is Down:&lt;/strong&gt; Because it doesn't rely on external APIs, it works in isolated networks or during connectivity outages—precisely when you need to check your inventory the most.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Proprietary Dependencies:&lt;/strong&gt; No token fees, rate limits, or SaaS subscriptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Day-to-Day Use Cases
&lt;/h2&gt;

&lt;p&gt;Instead of wasting time cross-referencing port tables or scattered files during maintenance or an outage, you can now query your documentation directly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dependencies &amp;amp; Single Points of Failure:&lt;/strong&gt; &lt;em&gt;"Which services and VLANs depend on Switch 02 in Rack B?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Physical &amp;amp; Network Capacity:&lt;/strong&gt; &lt;em&gt;"How many free U slots and open ports are left in the main cabinet?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick Audits:&lt;/strong&gt; Spot duplicate IPs, undocumented hosts, or inventory mismatches in seconds.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Code &amp;amp; Deployment
&lt;/h2&gt;

&lt;p&gt;RackDoc remains lightweight, self-hosted, and straight to the point. The source code is live on GitHub if you want to spin it up in your homelab or internal environment and take the agent for a spin:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/rackdoc" rel="noopener noreferrer"&gt;github.com/mario-ezquerro/rackdoc&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If there’s a specific query or integration you’d find useful in your day-to-day sysadmin workflow, feel free to open an issue or drop a comment below.&lt;/p&gt;

</description>
      <category>sysadmin</category>
      <category>devops</category>
      <category>opensource</category>
      <category>localai</category>
    </item>
    <item>
      <title>RackDoc DCIM v1.1: Background Multi-Protocol Heartbeat, 48-Port CAD Geometry, NOC Kiosk Mode &amp; Decoupled Remote Connect</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Sun, 01 Nov 2026 19:57:46 +0000</pubDate>
      <link>https://dev.to/gde/rackdoc-dcim-v11-background-multi-protocol-heartbeat-48-port-cad-geometry-noc-kiosk-mode--2j7k</link>
      <guid>https://dev.to/gde/rackdoc-dcim-v11-background-multi-protocol-heartbeat-48-port-cad-geometry-noc-kiosk-mode--2j7k</guid>
      <description>&lt;p&gt;&lt;a href="///Users/mario/.gemini/antigravity/brain/864b1863-7f73-45e7-905d-c6bebb564392/rackdoc_v1_1_screenshot.png"&gt;RackDoc DCIM v1.1 — 42U Front &amp;amp; Back Rack Editor, Structured Cabling, Heartbeat &amp;amp; Remote Connect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since launching &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/rackdoc" rel="noopener noreferrer"&gt;RackDoc DCIM&lt;/a&gt;&lt;/strong&gt;—our open-source visual Datacenter, Rack &amp;amp; Sensor Management platform built with &lt;strong&gt;FastAPI&lt;/strong&gt; and &lt;strong&gt;Flutter Web&lt;/strong&gt;—real-world usage in complex server rooms pushed us to rethink several core workflows.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;RackDoc DCIM v1.1&lt;/strong&gt;, we focused on &lt;strong&gt;operational clarity, high-density hardware ergonomics, and NOC wallboard readiness&lt;/strong&gt;. Here is a complete tour of everything new in this release and how we engineered it.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. 🫀 Background Multi-Protocol Heartbeat Engine &amp;amp; 4-Color Status Model
&lt;/h2&gt;

&lt;p&gt;In a real datacenter, not every piece of mounted equipment has an IP stack (think passive patch panels, brush cable managers, or basic PDUs), and many critical appliances expose multiple health surfaces at once (e.g., an ICMP management IP, an SSH daemon, an HTTPS API, and an SNMP agent).&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;v1.1&lt;/strong&gt;, we redesigned monitoring around four core principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Disabled by Default &amp;amp; Clean Collapsed UI&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Every rack device and floor sensor starts with Heartbeat &lt;strong&gt;OFF&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When disabled, the right-hand properties panel shows &lt;strong&gt;only the toggle switch&lt;/strong&gt; (&lt;code&gt;Heartbeat: DESACTIVADO (Gris)&lt;/code&gt;), keeping the UI clean and uncluttered.&lt;/li&gt;
&lt;li&gt;Turning the switch &lt;strong&gt;ON&lt;/strong&gt; expands the multi-protocol selector (&lt;code&gt;ICMP Ping&lt;/code&gt;, &lt;code&gt;SSH&lt;/code&gt;, &lt;code&gt;HTTP / HTTPS&lt;/code&gt;, &lt;code&gt;TCP&lt;/code&gt;, &lt;code&gt;UDP&lt;/code&gt;, &lt;code&gt;SNMP&lt;/code&gt;), per-protocol target/port/status configuration cards, and an on-demand &lt;strong&gt;“Probar ahora” (Test Now)&lt;/strong&gt; button.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always Executed in the Background (Backend Worker)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Health checks never block or depend on the browser tab. An asynchronous background loop in FastAPI (&lt;code&gt;_background_heartbeat_loop&lt;/code&gt;) periodically probes all enabled rack devices and floor sensors, while the Flutter frontend polls lightweight status summaries.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configurable Check Frequency&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;From &lt;strong&gt;&lt;code&gt;5. Configuración&lt;/code&gt;&lt;/strong&gt;, administrators can adjust the global Heartbeat interval on the fly (&lt;strong&gt;5 minutes by default&lt;/strong&gt;, with 1-click presets for &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt;, &lt;code&gt;5&lt;/code&gt;, &lt;code&gt;10&lt;/code&gt;, &lt;code&gt;15&lt;/code&gt;, &lt;code&gt;30&lt;/code&gt;, &lt;code&gt;60 min&lt;/code&gt; or custom minutes) or trigger a global check across the entire datacenter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4-Color Status Semantics (⚪ Grey / 🟢 Green / 🟠 Orange / 🔴 Red)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚪ Grey (&lt;code&gt;unmonitored&lt;/code&gt;)&lt;/strong&gt;: Equipment with Heartbeat disabled. Counted explicitly in every Location, Floor, Rack, and Dashboard badge so you always know how many elements are passive/unmonitored vs. actively watched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🟢 Green (&lt;code&gt;online&lt;/code&gt;)&lt;/strong&gt;: Heartbeat enabled and &lt;strong&gt;all&lt;/strong&gt; configured protocol checks succeed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🟠 Orange (&lt;code&gt;warning&lt;/code&gt; — Partial Failure)&lt;/strong&gt;: Heartbeat enabled with &lt;strong&gt;2 or more checks&lt;/strong&gt; configured where &lt;strong&gt;at least one fails and at least one succeeds&lt;/strong&gt; (for example, &lt;code&gt;ICMP Ping&lt;/code&gt; responds, but the &lt;code&gt;HTTPS :8443&lt;/code&gt; web console or &lt;code&gt;SNMP :161&lt;/code&gt; agent is down).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔴 Red (&lt;code&gt;offline&lt;/code&gt;)&lt;/strong&gt;: Heartbeat enabled and &lt;strong&gt;all&lt;/strong&gt; configured checks fail.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;stateDiagram-v2
    [*] --&amp;gt; Grey_Unmonitored: Default (Switch OFF)
    Grey_Unmonitored --&amp;gt; Probing: Enable Heartbeat Switch
    Probing --&amp;gt; Green_Online: All configured checks PASS (100%)
    Probing --&amp;gt; Orange_Warning: 2+ checks configured &amp;amp; partial failure (1+ PASS, 1+ FAIL)
    Probing --&amp;gt; Red_Offline: All configured checks FAIL (0% PASS)
    Green_Online --&amp;gt; Grey_Unmonitored: Disable Heartbeat Switch
    Orange_Warning --&amp;gt; Grey_Unmonitored: Disable Heartbeat Switch
    Red_Offline --&amp;gt; Grey_Unmonitored: Disable Heartbeat Switch&lt;/code&gt;&lt;/pre&gt;






&lt;h2&gt;
  
  
  2. 🔗 Decoupled Frontend “Conectar” Panel (SSH / HTTP / HTTPS)
&lt;/h2&gt;

&lt;p&gt;A common pitfall in DCIM tools is assuming that the &lt;strong&gt;monitoring target&lt;/strong&gt; is identical to the &lt;strong&gt;management connection endpoint&lt;/strong&gt;. In practice, you might ping a switch on its VLAN IP (&lt;code&gt;10.20.0.2&lt;/code&gt;), but connect to its web UI via an internal reverse proxy URL (&lt;code&gt;https://sw-core01.noc.corp:8443&lt;/code&gt;) or jump host SSH port.&lt;/p&gt;

&lt;p&gt;RackDoc v1.1 separates &lt;strong&gt;Heartbeat&lt;/strong&gt; (Backend) from &lt;strong&gt;Conectar&lt;/strong&gt; (Frontend):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every rack device and floor device/sensor has an independent &lt;strong&gt;&lt;code&gt;Conectar&lt;/code&gt;&lt;/strong&gt; card right below &lt;code&gt;Heartbeat&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When &lt;strong&gt;OFF&lt;/strong&gt; (default), it collapses to a single toggle row (&lt;code&gt;Conectar: DESACTIVADO&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;When &lt;strong&gt;ON&lt;/strong&gt;, you can enable &lt;strong&gt;SSH&lt;/strong&gt;, &lt;strong&gt;HTTP&lt;/strong&gt;, and/or &lt;strong&gt;HTTPS&lt;/strong&gt;, each with &lt;strong&gt;its own independent Host/IP, Port, Username, or URL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Clicking &lt;strong&gt;&lt;code&gt;Conectar por SSH&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;Conectar por HTTP&lt;/code&gt;&lt;/strong&gt;, or &lt;strong&gt;&lt;code&gt;Conectar por HTTPS&lt;/code&gt;&lt;/strong&gt; executes directly in the &lt;strong&gt;Frontend browser/OS&lt;/strong&gt; (&lt;code&gt;ssh://user@host:port&lt;/code&gt; + automatic clipboard copy of &lt;code&gt;ssh -p &amp;lt;port&amp;gt; user@host&lt;/code&gt;, or opening the target Web UI in a new browser tab).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. 🔌 High-Density 48-Port Switch CAD Geometry &amp;amp; Hover Ergonomics
&lt;/h2&gt;

&lt;p&gt;As shown in the screenshot above (&lt;code&gt;M_Rack001&lt;/code&gt;), modeling high-density 1U/2U switches (such as &lt;strong&gt;48× RJ45 + 4× SFP+ Catalyst / FortiSwitch&lt;/strong&gt; chassis) and &lt;strong&gt;PATCHBOX Plus+ 24p&lt;/strong&gt; cassettes required sub-pixel precision so that port numbers and patch cords remain legible even when dozens of cables cross the rack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;24+24 Dual-Row Matrix + Right-Hand SFP+ Uplink Block&lt;/strong&gt;: 48-port switches automatically arrange odd ports (&lt;code&gt;1, 3, ... 47&lt;/code&gt;) on the upper row and even ports (&lt;code&gt;2, 4, ... 48&lt;/code&gt;) on the lower row, with dedicated uplink spacing on the right (&lt;code&gt;49..52 SFP+&lt;/code&gt;), preventing port labels from colliding with horizontal chassis dividers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-Occluding Floating Action Toolbar&lt;/strong&gt;: Hovering or selecting a mounted device now places the quick-action pill (&lt;code&gt;Mover U&lt;/code&gt;, &lt;code&gt;Bandeja&lt;/code&gt;, &lt;code&gt;Borrar&lt;/code&gt;) &lt;strong&gt;above the top edge of the chassis&lt;/strong&gt; (&lt;code&gt;top: -22px&lt;/code&gt;) instead of overlapping ports &lt;code&gt;1..23&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Hover Shading (&lt;code&gt;▶ Uxx&lt;/code&gt;)&lt;/strong&gt;: Moving the cursor over any rack unit highlights the entire chassis in a crisp technical blue tint (&lt;code&gt;#DBEAFE&lt;/code&gt;) with a &lt;code&gt;▶ Uxx&lt;/code&gt; indicator on the left rail, making it unmistakable which device you are about to inspect or patch.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. 🧰 Rack Trays (&lt;code&gt;Bandejas U&lt;/code&gt;), Inter-Rack Overhead Trays &amp;amp; Floor Patching
&lt;/h2&gt;

&lt;p&gt;Real racks don't just hold standard 19" rackmount servers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Editable Rack Trays (&lt;code&gt;Bandejas U&lt;/code&gt;)&lt;/strong&gt;: Mount a 1U/2U shelf and place multiple &lt;strong&gt;mini-appliances&lt;/strong&gt; side by side on the same tray—such as &lt;strong&gt;Raspberry Pi&lt;/strong&gt;, &lt;strong&gt;Intel NUC&lt;/strong&gt;, &lt;strong&gt;Apple Mac mini&lt;/strong&gt;, &lt;strong&gt;MikroTik Mini-Routers&lt;/strong&gt;, &lt;strong&gt;ISP Fiber ONTs&lt;/strong&gt;, or &lt;strong&gt;IP KVMs&lt;/strong&gt;—each with its own IP, ports, and patch cords.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overhead Inter-Rack Cable Tray (&lt;code&gt;Bandeja Aérea Inter-Rack&lt;/code&gt;)&lt;/strong&gt;: Route UTP, Fiber, or DAC trunks cleanly between different racks in the room (&lt;code&gt;RK001_M ↔ RK003_B&lt;/code&gt;) through the top overhead raceway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External Floor &amp;amp; Power Terminations (&lt;code&gt;PLANTA-DC&lt;/code&gt;, &lt;code&gt;TOMA-A&lt;/code&gt;, &lt;code&gt;TOMA-B&lt;/code&gt;, &lt;code&gt;FIBRA-EXT&lt;/code&gt;)&lt;/strong&gt;: Link structured cabling from the 2D Datacenter Floor Plan (temperature/humidity sensors, CCTV cameras, biometric readers, wall outlets) and room Schuko/IEC power feeds directly into rack patch panels and PDUs.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. 📺 NOC Kiosk Mode (&lt;code&gt;Modo Kiosco&lt;/code&gt;) for Wallboards &amp;amp; Videowalls
&lt;/h2&gt;

&lt;p&gt;Need to display your global datacenter map, 2D floor plan, 42U rack elevation, or live Heartbeat dashboard on a NOC TV monitor?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1-Click Kiosk Mode&lt;/strong&gt;: Available from the left sidebar and top toolbars across &lt;strong&gt;&lt;code&gt;1. Locations&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;2. Datacenter&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;3. Rack Editor&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;4. Dashboard&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Clutter Fullscreen Canvas&lt;/strong&gt;: Automatically hides sidebars, library drawers, and editing chrome, starting a silent auto-refresh loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discreet Translucent Exit &amp;amp; View Switcher&lt;/strong&gt;: A tiny, nearly transparent pill (&lt;code&gt;opacity: 0.22&lt;/code&gt;) rests in the bottom-right corner so it never distracts on a wall monitor. Hovering over it illuminates quick-jump chips (&lt;code&gt;1. Mapa&lt;/code&gt;, &lt;code&gt;2. Planta&lt;/code&gt;, &lt;code&gt;3. Rack&lt;/code&gt;, &lt;code&gt;4. Dashboard&lt;/code&gt;) and the &lt;strong&gt;&lt;code&gt;Salir Kiosco (ESC)&lt;/code&gt;&lt;/strong&gt; button.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. 🔐 4-Tier RBAC + Multi-Active Directory &amp;amp; 100× Faster Startup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4 Role-Based Access Control Tiers&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;admin&lt;/code&gt;: Full control over users, Active Directory servers, settings, and hardware.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;editor&lt;/code&gt;: Create/edit locations, floors, racks, cables, and sensors + launch remote connections.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;operator&lt;/code&gt;: Read-only on physical rack geometry, &lt;strong&gt;with permission to test Heartbeats and launch SSH/HTTP/HTTPS connections&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;viewer&lt;/code&gt;: Strict read-only auditing mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Active Directory (LDAP / LDAPS) + Local Users&lt;/strong&gt;: Connect multiple AD domains with automatic &lt;code&gt;Group DN → Role&lt;/code&gt; mapping alongside local database accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Second Startup Optimization&lt;/strong&gt;: By deferring heavy base64 floorplan blobs on the initial &lt;code&gt;/api/locations&lt;/code&gt; tree query (&lt;code&gt;defer(UploadAsset.data_url)&lt;/code&gt;) and enabling FastAPI &lt;code&gt;GZipMiddleware&lt;/code&gt;, initial load time dropped from puluhan megabytes to &lt;strong&gt;~4.5 KB in &amp;lt;15 ms&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐳 Run RackDoc DCIM v1.1 in 30 Seconds from Docker Hub
&lt;/h2&gt;

&lt;p&gt;Pre-built multi-arch images are published directly on Docker Hub under &lt;a href="https://hub.docker.com/r/cloudresources/rackdoc-backend" rel="noopener noreferrer"&gt;&lt;code&gt;cloudresources/rackdoc-backend&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://hub.docker.com/r/cloudresources/rackdoc-frontend" rel="noopener noreferrer"&gt;&lt;code&gt;cloudresources/rackdoc-frontend&lt;/code&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Create the Docker network&lt;/span&gt;
docker network create rackdoc-net &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;

&lt;span class="c"&gt;# 2. Launch the FastAPI Backend (with persistent SQLite + settings volume)&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; rackdoc-backend &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; rackdoc-net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--restart&lt;/span&gt; unless-stopped &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 8180:8000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;/data:/app/data &lt;span class="se"&gt;\&lt;/span&gt;
  cloudresources/rackdoc-backend:1.1.0

&lt;span class="c"&gt;# 3. Launch the Flutter Web Frontend&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; rackdoc-frontend &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; rackdoc-net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--restart&lt;/span&gt; unless-stopped &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 8181:80 &lt;span class="se"&gt;\&lt;/span&gt;
  cloudresources/rackdoc-frontend:1.1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;strong&gt;&lt;code&gt;http://localhost:8181&lt;/code&gt;&lt;/strong&gt; (default credentials: &lt;code&gt;admin&lt;/code&gt; / &lt;code&gt;admin&lt;/code&gt;) and explore the interactive 42U Rack Editor, 2D Floor Plan, and Background Heartbeat engine!&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Links &amp;amp; Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/mario-ezquerro/rackdoc" rel="noopener noreferrer"&gt;https://github.com/mario-ezquerro/rackdoc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Hub Organization&lt;/strong&gt;: &lt;a href="https://hub.docker.com/orgs/cloudresources/repositories" rel="noopener noreferrer"&gt;https://hub.docker.com/orgs/cloudresources/repositories&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What protocols or hardware templates would you like to see next in RackDoc DCIM? Let me know in the comments!&lt;/p&gt;

</description>
      <category>dcim</category>
      <category>flutter</category>
      <category>fastapi</category>
      <category>docker</category>
    </item>
    <item>
      <title>RackDoc DCIM: Building a Visual Datacenter, Rack &amp; Sensor Management Platform with Argon</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Fri, 30 Oct 2026 08:34:57 +0000</pubDate>
      <link>https://dev.to/gde/rackdoc-dcim-building-a-visual-datacenter-rack-sensor-management-platform-with-argon-5j5</link>
      <guid>https://dev.to/gde/rackdoc-dcim-building-a-visual-datacenter-rack-sensor-management-platform-with-argon-5j5</guid>
      <description>&lt;p&gt;&lt;a href="/Users/mario/.gemini/antigravity/brain/864b1863-7f73-45e7-905d-c6bebb564392/rackdoc_devto_cover.jpg" class="article-body-image-wrapper"&gt;&lt;img src="/Users/mario/.gemini/antigravity/brain/864b1863-7f73-45e7-905d-c6bebb564392/rackdoc_devto_cover.jpg" alt="RackDoc DCIM — Built with Argon"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Managing physical datacenter infrastructure often falls into one of two extremes: &lt;strong&gt;fragile spreadsheets and static Visio diagrams&lt;/strong&gt; that go out of date the moment someone moves a patch cord, or &lt;strong&gt;bloated enterprise DCIM suites&lt;/strong&gt; that take months to configure.&lt;/p&gt;

&lt;p&gt;To bridge that gap, I built &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/rackdoc" rel="noopener noreferrer"&gt;RackDoc DCIM&lt;/a&gt;&lt;/strong&gt; — an open-source, visual &lt;strong&gt;Datacenter Infrastructure Management (DCIM)&lt;/strong&gt; platform designed for sysadmins, network engineers, and infrastructure teams who want an interactive, CAD-like view of their datacenters, racks, structured cabling, and environmental sensors.&lt;/p&gt;

&lt;p&gt;Even more exciting: &lt;strong&gt;RackDoc DCIM was built end-to-end with &lt;a href="https://deepmind.google/" rel="noopener noreferrer"&gt;Argon&lt;/a&gt;&lt;/strong&gt;, using an agentic AI pair-programming workflow to architect, iterate, containerize, and refine both the FastAPI backend and the interactive Flutter Web canvas in record time.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ What is RackDoc DCIM?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RackDoc DCIM&lt;/strong&gt; is a containerized full-stack web application that models your entire physical and logical infrastructure from top to bottom:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Locations (Sites) → Floors (2D Blueprints) → Rooms → Racks (42U–48U) → Hardware Chassis (Front/Back) → RJ45 / SFP+ / Power Ports → Patch Cords &amp;amp; Cross-Connects&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Alongside rack elevation diagrams, it includes an interactive &lt;strong&gt;2D Datacenter Floor Plan&lt;/strong&gt; where you can drag and drop racks, telecom wall outlets (&lt;code&gt;Bi01&lt;/code&gt;, &lt;code&gt;Bi02...&lt;/code&gt;), IP CCTV cameras, biometric access controls, Wi-Fi 6E access points, workstations, and &lt;strong&gt;environmental/electrical sensors&lt;/strong&gt; (Temperature, Humidity, kW/A Power Load, VESDA Smoke, Water Leak), automatically rendering the structured cabling paths back to each rack.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤖 Built with Argon: Agentic AI Pair Programming in Action
&lt;/h2&gt;

&lt;p&gt;Building a visual DCIM tool involves tricky geometric rendering, state synchronization, and relational modeling. Working with &lt;strong&gt;Argon&lt;/strong&gt; transformed how quickly complex engineering requirements turned into production code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Full-Stack Architecture&lt;/strong&gt;: Argon scaffolded the complete &lt;strong&gt;FastAPI + SQLAlchemy 2.0&lt;/strong&gt; backend alongside a &lt;strong&gt;Flutter Web (Material 3 + CustomPainter)&lt;/strong&gt; frontend, complete with automatic schema migrations, realistic seed data, and Docker containers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Canvas &amp;amp; Custom Painters&lt;/strong&gt;: Together with Argon, we implemented custom 2D rendering engines in Flutter:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Catmull-Rom / Cubic Bezier Patch Cables&lt;/strong&gt; in the Rack Editor that drape naturally with gravity and color-code by link type (&lt;code&gt;UTP Cat6&lt;/code&gt;, &lt;code&gt;Single-Mode Fiber&lt;/code&gt;, &lt;code&gt;Multi-Mode OM3/OM4&lt;/code&gt;, &lt;code&gt;DAC&lt;/code&gt;, &lt;code&gt;230V Power&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Connect Lateral Flags&lt;/strong&gt; (&lt;code&gt;RK002_M ➔&lt;/code&gt;, &lt;code&gt;⬅ RK001_M&lt;/code&gt;) that visually represent inter-rack patch cords without cluttering the rack elevation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured Cabling Floor Overlay&lt;/strong&gt; combining dashed orange backbone runs (Rack ↔ Telecom Outlet / Sensor) and solid blue drop cables (Telecom Outlet ↔ Workstation / VoIP / Printer).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterative Feature Refinement from Visual Prompts&lt;/strong&gt;: Whenever a workflow needed refinement—such as allowing &lt;strong&gt;RJ45, SFP+, and Power ports on both the Front and Back faces&lt;/strong&gt; of custom hardware templates, adding a &lt;strong&gt;cascading Group → Category → Device picker&lt;/strong&gt; on empty &lt;code&gt;U&lt;/code&gt; slots, or building an extensible &lt;strong&gt;Custom Sensor &amp;amp; Device Type Creator&lt;/strong&gt;—Argon analyzed both backend models and UI state, verified with &lt;code&gt;flutter analyze&lt;/code&gt;, rebuilt the Docker images, and deployed seamlessly.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛠️ Key Features at a Glance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Interactive 2D Datacenter Floor Plan &amp;amp; Structured Cabling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Upload custom architectural blueprints (&lt;code&gt;JPG&lt;/code&gt;, &lt;code&gt;PNG&lt;/code&gt;, &lt;code&gt;GIF&lt;/code&gt;) for any building floor or use the built-in technical blueprint grid.&lt;/li&gt;
&lt;li&gt;Drag &amp;amp; drop &lt;strong&gt;Racks&lt;/strong&gt; (&lt;code&gt;600×1000 mm&lt;/code&gt;, &lt;code&gt;600×1200 mm&lt;/code&gt;, &lt;code&gt;800×1000 mm&lt;/code&gt;, &lt;code&gt;800×1200 mm&lt;/code&gt;) and rotate them (&lt;code&gt;0°&lt;/code&gt;, &lt;code&gt;90°&lt;/code&gt;, &lt;code&gt;180°&lt;/code&gt;, &lt;code&gt;270°&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5 Collapsible Device &amp;amp; Sensor Families&lt;/strong&gt; in the &lt;code&gt;DEVICES LIBRARY&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sensors &amp;amp; Climate / Power&lt;/strong&gt;: Temperature (&lt;code&gt;TMP&lt;/code&gt;), Relative Humidity (&lt;code&gt;HUM&lt;/code&gt;), Dual Temp+Humidity (&lt;code&gt;THM&lt;/code&gt;), Electrical Load kW/A (&lt;code&gt;PWR&lt;/code&gt;), Smoke/Fire (&lt;code&gt;SMK&lt;/code&gt;), Water Leak (&lt;code&gt;WTR&lt;/code&gt;), Airflow/Pressure (&lt;code&gt;AIR&lt;/code&gt;), Door Contact (&lt;code&gt;DOR&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security &amp;amp; Access Control&lt;/strong&gt;: IP CCTV Cameras (&lt;code&gt;CAM&lt;/code&gt;), Biometric/RFID Access Control (&lt;code&gt;AC&lt;/code&gt;), PIR Intrusion (&lt;code&gt;PIR&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network, Wi-Fi &amp;amp; Outlets&lt;/strong&gt;: Wi-Fi 6E Access Points (&lt;code&gt;AP&lt;/code&gt;), Wall Telecom Outlets (&lt;code&gt;Bi&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workstations &amp;amp; AV&lt;/strong&gt;: Desktops/Workstations (&lt;code&gt;DP&lt;/code&gt;), VoIP Phones (&lt;code&gt;PH&lt;/code&gt;), Network Printers (&lt;code&gt;PR&lt;/code&gt;), NOC Displays (&lt;code&gt;TV&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Industrial / Custom (&lt;code&gt;+ Nuevo Tipo a Medida&lt;/code&gt;)&lt;/strong&gt;: Define your own custom device or sensor types with a custom family, ID prefix, icon, and pin color.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rack Connection Selector on Drop&lt;/strong&gt;: Dropping any sensor or device onto the floor plan immediately lets you bind it to its target &lt;strong&gt;Rack&lt;/strong&gt; and &lt;strong&gt;Rack Port / Sensor Channel&lt;/strong&gt; (e.g., &lt;code&gt;ENV-MON01:Temp-1 (20.8 °C)&lt;/code&gt; or &lt;code&gt;PDU-A+B:Meter-1 (5.4 kW)&lt;/code&gt;), drawing the live connection line on the map.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Visual Rack Editor (Front &amp;amp; Back 42U Elevation)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Synchronized Front &amp;amp; Rear Views&lt;/strong&gt;: Inspect front network/server bezels and rear power supplies, IPMI/iDRAC ports, and 0U vertical PDUs (&lt;code&gt;PDU-A&lt;/code&gt; / &lt;code&gt;PDU-B&lt;/code&gt;) simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Realistic Hardware Faceplates (&lt;code&gt;📷 Photo Overlay&lt;/code&gt;)&lt;/strong&gt;: Toggle realistic SVG/image hardware faceplates for firewalls, core switches, patch panels, Dell/HPE servers, NAS enclosures, and UPS units, with an integrated backend proxy (&lt;code&gt;/api/templates/photo-proxy&lt;/code&gt;) for custom equipment photos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Port-to-Port Patching&lt;/strong&gt;: Click any port (&lt;code&gt;RJ45&lt;/code&gt;, &lt;code&gt;SFP+&lt;/code&gt;, &lt;code&gt;C13/C14 Power&lt;/code&gt;) on the Front or Back face to trace or create patch cords—including &lt;strong&gt;Cross-Rack Connections&lt;/strong&gt; across different racks in the room.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick &lt;code&gt;+&lt;/code&gt; Slot Installer&lt;/strong&gt;: Click the &lt;code&gt;+&lt;/code&gt; button on any empty rack unit (&lt;code&gt;U&lt;/code&gt;) to launch a cascading &lt;strong&gt;Group → Subcategory → Hardware Model&lt;/strong&gt; installer with instant &lt;code&gt;U&lt;/code&gt; collision validation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Hardware Catalog &amp;amp; Custom Equipment Designer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Pre-loaded with &lt;strong&gt;30+ enterprise templates&lt;/strong&gt; (Fortinet, Cisco Catalyst, Ubiquiti, Dell PowerEdge, HPE ProLiant, Synology, APC Smart-UPS, 0U PDUs, Patch Panels).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Front &amp;amp; Back Port Distribution&lt;/strong&gt;: Define exact counts of &lt;code&gt;RJ45&lt;/code&gt;, &lt;code&gt;SFP/SFP+&lt;/code&gt;, and &lt;code&gt;Power&lt;/code&gt; ports split independently between the &lt;strong&gt;Front&lt;/strong&gt; and &lt;strong&gt;Back&lt;/strong&gt; faces of any custom template.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Automated Network Discovery, Live Ping &amp;amp; Cable Audit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subnet Auto-Discovery (&lt;code&gt;/24&lt;/code&gt;)&lt;/strong&gt;: Scan management networks via concurrent ICMP + TCP probes (&lt;code&gt;22&lt;/code&gt;, &lt;code&gt;80&lt;/code&gt;, &lt;code&gt;443&lt;/code&gt;, &lt;code&gt;161&lt;/code&gt;, &lt;code&gt;8006&lt;/code&gt;, &lt;code&gt;3389&lt;/code&gt;) to discover live hosts and match them against mounted rack hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Monitoring &amp;amp; Threshold Alerts&lt;/strong&gt;: Live latency/packet-loss monitoring (&lt;code&gt;Online&lt;/code&gt;, &lt;code&gt;Degraded&lt;/code&gt;, &lt;code&gt;Offline&lt;/code&gt;) and rack power/thermal capacity bars.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Tab Excel Inventory Export (&lt;code&gt;.xlsx&lt;/code&gt;)&lt;/strong&gt;: One-click export via &lt;code&gt;openpyxl&lt;/code&gt; generating formatted sheets for Racks, Mounted Devices, Port-to-Port Patching, Floor Devices/Sensors, and Power/U Utilization.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏗️ Architecture &amp;amp; Tech Stack
&lt;/h2&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart LR
    subgraph Client["Frontend — Flutter Web (Nginx :8181)"]
        FP["2D Floor Plan &amp;amp; Sensor Map"]
        RE["42U Rack Editor (Front/Back + Bezier Cables)"]
        CAT["Hardware &amp;amp; Custom Sensor Catalog"]
        MON["Live Ping &amp;amp; Subnet Discovery UI"]
    end

    subgraph Server["Backend — FastAPI + Python 3.12 (:8180)"]
        API["REST API (/api/*)"]
        SCAN["Async ICMP/TCP Scanner"]
        XLSX["OpenPyXL Multi-Sheet Exporter"]
        PROXY["Hardware Photo Proxy"]
    end

    subgraph Storage["Persistence (/app/data)"]
        DB[("SQLite / PostgreSQL (SQLAlchemy 2.0)")]
        UPL["Floor Blueprints (/uploads)"]
    end

    Client &amp;lt;--&amp;gt;|"JSON / REST"| API
    API --&amp;gt; SCAN
    API --&amp;gt; XLSX
    API --&amp;gt; PROXY
    API --&amp;gt; DB
    API --&amp;gt; UPL&lt;/code&gt;&lt;/pre&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI Engineering Partner&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Argon&lt;/strong&gt; (Agentic Full-Stack Architecture, UI/UX Canvas &amp;amp; Iterative Debugging)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Frontend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Flutter Web (Dart 3)&lt;/strong&gt;, Material 3 Dark Engineering Theme, &lt;code&gt;CustomPainter&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Python 3.12&lt;/strong&gt;, &lt;strong&gt;FastAPI&lt;/strong&gt;, &lt;strong&gt;SQLAlchemy 2.0&lt;/strong&gt;, &lt;strong&gt;Pydantic v2&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;SQLite&lt;/strong&gt; (zero-config persistent volume) or &lt;strong&gt;PostgreSQL&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Export &amp;amp; Reporting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;OpenPyXL&lt;/strong&gt; (&lt;code&gt;.xlsx&lt;/code&gt;), Printable Technical Elevation Sheets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Docker&lt;/strong&gt; (&lt;code&gt;rackdoc-backend&lt;/code&gt; &amp;amp; &lt;code&gt;rackdoc-frontend&lt;/code&gt; on &lt;code&gt;rackdoc-net&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🚀 Quick Start with Docker
&lt;/h2&gt;

&lt;p&gt;You can spin up the entire platform locally in under a minute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/mario-ezquerro/rackdoc.git
&lt;span class="nb"&gt;cd &lt;/span&gt;rackdoc

&lt;span class="c"&gt;# 2. Build and run the containers&lt;/span&gt;
docker network create rackdoc-net &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true

&lt;/span&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; rackdoc-backend:latest ./backend
docker build &lt;span class="nt"&gt;-t&lt;/span&gt; rackdoc-frontend:latest ./frontend

docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; rackdoc-backend &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; rackdoc-net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;/data:/app/data &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 8180:8000 &lt;span class="se"&gt;\&lt;/span&gt;
  rackdoc-backend:latest

docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; rackdoc-frontend &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--network&lt;/span&gt; rackdoc-net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 8181:80 &lt;span class="se"&gt;\&lt;/span&gt;
  rackdoc-frontend:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;strong&gt;&lt;code&gt;http://localhost:8181&lt;/code&gt;&lt;/strong&gt; in your browser (API docs available at &lt;strong&gt;&lt;code&gt;http://localhost:8180/docs&lt;/code&gt;&lt;/strong&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Repository &amp;amp; Feedback
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/mario-ezquerro/rackdoc" rel="noopener noreferrer"&gt;https://github.com/mario-ezquerro/rackdoc&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you tried building complex visual tools or infrastructure dashboards with &lt;strong&gt;Argon&lt;/strong&gt;? Drop your thoughts, feature ideas, or questions in the comments below!&lt;/p&gt;

</description>
      <category>argon</category>
      <category>dcim</category>
      <category>flutter</category>
      <category>fastapi</category>
    </item>
    <item>
      <title>Building ora-tui with Google Antigravity &amp; Gemini 4 Argon: An MS-DOS Retro TUI &amp; OpenTelemetry Exporter for Oracle RAC, DB &amp; SAN Multipath</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Fri, 16 Oct 2026 05:36:01 +0000</pubDate>
      <link>https://dev.to/gde/building-ora-tui-with-google-antigravity-gemini-4-argon-an-ms-dos-retro-tui-opentelemetry-4d02</link>
      <guid>https://dev.to/gde/building-ora-tui-with-google-antigravity-gemini-4-argon-an-ms-dos-retro-tui-opentelemetry-4d02</guid>
      <description>&lt;p&gt;Managing enterprise &lt;strong&gt;Oracle RAC&lt;/strong&gt;, &lt;strong&gt;Oracle Restart&lt;/strong&gt;, and &lt;strong&gt;Single Instance&lt;/strong&gt; databases over SSH often feels like juggling a dozen terminal tabs at 3:00 AM. You have &lt;code&gt;sqlplus&lt;/code&gt; open in one window, &lt;code&gt;crsctl status resource -t&lt;/code&gt; in another, &lt;code&gt;lsnrctl status&lt;/code&gt; in a third, &lt;code&gt;rman&lt;/code&gt; in a fourth, and &lt;code&gt;multipath -ll&lt;/code&gt; or &lt;code&gt;df -i&lt;/code&gt; in a fifth to figure out why a LUN path dropped or why &lt;code&gt;ORA-09925: Unable to create audit trail file&lt;/code&gt; just locked out connections.&lt;/p&gt;

&lt;p&gt;What if you had a &lt;strong&gt;single, zero-dependency binary&lt;/strong&gt; that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Gives you a &lt;strong&gt;Norton Commander / Borland Turbo C++ / IBM Green Phosphor CRT&lt;/strong&gt; interactive Terminal UI (&lt;code&gt;TUI&lt;/code&gt;) with full mouse support over SSH?&lt;/li&gt;
&lt;li&gt;Audits not only Oracle Clusterware, PDBs, Tablespaces (&lt;code&gt;AUTOEXTEND&lt;/code&gt;), Blocking Locks, ASM, RMAN, and Alert Logs, but also &lt;strong&gt;Linux Kernel parameters, HugePages, Filesystem Inodes, Fibre Channel HBAs, and SAN Multipath (&lt;code&gt;multipath -ll&lt;/code&gt;)&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;Doubles as a headless &lt;strong&gt;OpenTelemetry (&lt;code&gt;OTLP JSON&lt;/code&gt;) &amp;amp; Prometheus (&lt;code&gt;/metrics&lt;/code&gt;) Exporter&lt;/strong&gt; on port &lt;code&gt;9161&lt;/code&gt;, complete with a 1-command &lt;strong&gt;Docker POC (&lt;code&gt;Prometheus + 15 Alert Rules + 26-Panel Grafana Dashboard&lt;/code&gt;)&lt;/strong&gt;?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Meet &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/oratui" rel="noopener noreferrer"&gt;&lt;code&gt;ora-tui&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; — and in this post, I’ll share how I built and evolved it from scratch to &lt;code&gt;v1.6.0&lt;/code&gt; using &lt;strong&gt;Google Antigravity&lt;/strong&gt; powered by &lt;strong&gt;Gemini 4 Argon&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤖 Built with Google Antigravity &amp;amp; Gemini 4 Argon
&lt;/h2&gt;

&lt;p&gt;The entire lifecycle of &lt;code&gt;ora-tui&lt;/code&gt;—from low-level Linux &lt;code&gt;/proc&lt;/code&gt; and &lt;code&gt;/sys/class/fc_host&lt;/code&gt; parsers to SQL*Plus pipe-delimited collectors, authentic 1990s VGA palettes, an embedded OpenTelemetry server, and automated RPM/DEB packaging—was built in &lt;strong&gt;Google Antigravity&lt;/strong&gt; using &lt;strong&gt;Gemini 4 Argon&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What made the &lt;strong&gt;Antigravity + Gemini 4 Argon&lt;/strong&gt; workflow stand out during this project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deep Domain Reasoning Across Oracle &amp;amp; Linux Internals&lt;/strong&gt;: Gemini 4 Argon didn't just write boilerplate Go code. When we noticed tablespaces with &lt;code&gt;AUTOEXTEND ON&lt;/code&gt; were showing misleading percentages, it immediately rewrote the SQL collector to compute real capacity against &lt;code&gt;MAXBYTES&lt;/code&gt;. When we tested against a real RHEL 8 Oracle 19c server, it distinguished dynamic &lt;code&gt;READY&lt;/code&gt; listener services (registered via PMON/LREG) from static &lt;code&gt;UNKNOWN&lt;/code&gt; entries in &lt;code&gt;listener.ora&lt;/code&gt;, and tightened the Alert Log parser to match strict &lt;code&gt;^ORA-&lt;/code&gt; lines while ignoring false positives from OPatch metadata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Precision from Reference Screenshots&lt;/strong&gt;: When I shared classic screenshots of &lt;strong&gt;Borland Turbo C++ 3.0&lt;/strong&gt; and &lt;strong&gt;Norton Commander 5.0&lt;/strong&gt;, Gemini 4 Argon inspected the exact VGA hex colors (&lt;code&gt;#0000AF&lt;/code&gt; Royal Blue, &lt;code&gt;#00AFAF&lt;/code&gt; Teal, &lt;code&gt;#5FFFFF&lt;/code&gt; Bright Cyan, &lt;code&gt;#FFFF5F&lt;/code&gt; Bright Yellow, &lt;code&gt;#A8A8A8&lt;/code&gt; Silver menu bar) and recreated the exact look and feel—including a &lt;strong&gt;1980s IBM 5151 Green Phosphor CRT&lt;/strong&gt; theme with 100% full-width hardware inverse-video selection bars.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End-to-End Agentic Execution&lt;/strong&gt;: Inside Antigravity, Gemini 4 Argon compiled cross-platform static binaries (&lt;code&gt;GOOS=linux GOARCH=amd64 CGO_ENABLED=0&lt;/code&gt;), ran unit tests on real SQL*Plus and &lt;code&gt;multipath -ll&lt;/code&gt; outputs, packaged &lt;code&gt;.rpm&lt;/code&gt; and &lt;code&gt;.deb&lt;/code&gt; installers via &lt;code&gt;nfpm&lt;/code&gt;, and built a complete auto-provisioned Prometheus + Grafana Docker POC.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🖥️ Preview: Retro MS-DOS Aesthetics Meet Oracle DBA Power
&lt;/h2&gt;

&lt;p&gt;Here is what &lt;code&gt;ora-tui&lt;/code&gt; looks like right in your terminal (&lt;code&gt;ora-tui --preview&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                    ══ NORTON COMMANDER ORA-TUI v1.6.0 :: ORACLE CLUSTER, DB &amp;amp; SERVER MANAGER ══                      ║
╠══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║ Modo: [ORACLE RAC] │ Host: ora-rac01.corp.local │ Cluster: crs-prod-cluster │ Ver: 19.24.0.0.0 │ Tema: NORTON        ║
║ HOME: /u01/app/oracle/product/19.0.0/dbhome_1 (oracle) │ 2 Inst OPEN │ 4 PDBs │ 4 Sesiones (1 Locks) │ 1 Errores ORA-║
╠═════════════════════════════╦════════════════════════════════════════════════════════════════════════════════════════╣
║ MENU [Flechas ↑↓ + Enter]   ║ PANTALLA ACTIVA: VISTA INTEGRAL + VENTANA EMERGENTE (Borde Simple ┌─┐ y Doble ╔═╗)     ║
╠═════════════════════════════╬════════════════════════════════════════════════════════════════════════════════════════╣
║ ▸ 1. Cluster &amp;amp; DB Estado    ║ ┌─ NODOS DEL CLUSTER &amp;amp; INSTANCIAS (ORACLE RAC / SINGLE) ─────────────────────────────┐ ║
║   2. Usuarios Conectados    ║ │ NODO       ESTADO   CRS     CSSD    ASM            INST      MODO        FRA_USO   │ ║
║   3. Tablespaces &amp;amp; Files    ║ │ ora-rac01  ONLINE   ONLINE  ONLINE  ONLINE(+ASM1)  PRODCDB1  READ WRITE  [████░░░░]│ ║
║   4. Tablas &amp;amp; Objetos       ║ │ ora-rac02  ONLINE   ONLINE  ONLINE  ONLINE(+ASM2)  PRODCDB2  READ WRITE  [████░░░░]│ ║
║   5. ASM &amp;amp; Red Listeners    ║ └────────────────────────────────────────────────────────────────────────────────────┘ ║
║   6. RMAN, Flashback &amp;amp; DG   ║ ┌─ USUARIOS CONECTADOS (gv$session) ───────────┬─ TABLESPACES &amp;amp; SAN MULTIPATH ───────┐ ║
║   7. Alert Log &amp;amp; Errores    ║ │ SID,SER#  USUARIO    ESTADO   EVENTO / LOCK  │ RECURSO       ESTADO / USO %        │ ║
║   8. Servidor, Discos &amp;amp; SAN ║ │ 142,48219 ERP_APP    ACTIVE   db file seq rd │ ERP_DATA_TBS  [█████████░] 93.0% !! │ ║
║   9. Centro Mantenimiento   ║ │ 289,11042 CRM_BATCH  ACTIVE   enq: TX lock   │ mpatha (ASM)  4/4 PATHS ACTIVE (OK) │ ║
║   c. Cambiar Tema Color     ║ │ 512,9931  CRM_ADMIN  INACT    BLOCKER (289)  │ mpathc (FRA)  3/4 DEGRADED (FAULTY) │ ║
║   b. Cambiar Marcos ┌─┐/╔═╗ ║ │ 604,33105 BI_REPORT  ACTIVE   ON CPU (512MB) │ /u01 Inodos   14.2% (Libre ORA-9925)│ ║
║   F1/h. Mostrar/Ocultar Ayu ║ └──────────────────────────────────────────────┴─────────────────────────────────────┘ ║
║   t. Cambiar Topologia      ║                                                                                        ║
║   q. Salir (Quit)           ║      ╔══════════════════════════════════════════════════════════════════════════╗      ║
║                             ║      ║      ══ VENTANA DE MANTENIMIENTO [Seleccione con Flechas ↑↓ + Enter] ══  ║      ║
║                             ║      ╠══════════════════════════════════════════════════════════════════════════╣      ║
║                             ║      ║ ▸ [1] Drenar / Aislar Nodo Cluster (Relocate Services + Stop CRS)        ║      ║
║                             ║      ║   [2] Parar / Arrancar Instancia o Base de Datos (srvctl / sqlplus)      ║      ║
║                             ║      ║   [3] Ampliar Tablespace Crítico (+Datafile 32G a ERP_DATA_TBS 93%)      ║      ║
║                             ║      ║   [4] Matar Sesión Bloqueante (KILL SESSION '512,9931,@2' IMMEDIATE)     ║      ║
║                             ║      ║   [5] Auditoría Completa SAN Multipath (multipath -ll) &amp;amp; HBA FC          ║      ║
║                             ║      ║   [Esc] Cancelar / Cerrar Ventana                                        ║      ║
║                             ║      ╚══════════════════════════════════════════════════════════════════════════╝      ║
╠═════════════════════════════╩════════════════════════════════════════════════════════════════════════════════════════╣
║ ┌─ C:\ORACLE&amp;gt; CONSOLA MS-DOS &amp;amp; AUDITORIA EN VIVO ──────────────────────────────────────────────────────────────────┐ ║
║ │ C:\&amp;gt; [08:05:01] Auto-Discovery: Modo=ORACLE RAC │ Cluster=crs-prod-cluster │ Release=19.24.0.0.0                 │ ║
║ │ C:\&amp;gt; [08:05:02] ALERTA SAN: mpathc presenta 1 camino caído (3/4 DEGRADED) │ Tablespace ERP_DATA_TBS al 93.0%     │ ║
║ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ║
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4 Live-Switchable Retro Color Themes (&lt;code&gt;c&lt;/code&gt; key)
&lt;/h3&gt;

&lt;p&gt;Pressing &lt;strong&gt;&lt;code&gt;c&lt;/code&gt;&lt;/strong&gt; at any time cycles through four themes on the fly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Norton Commander 5.0&lt;/strong&gt;: Classic &lt;code&gt;#0000AF&lt;/code&gt; Royal Blue panels, &lt;code&gt;#5FFFFF&lt;/code&gt; Bright Cyan borders, &lt;code&gt;#FFFF5F&lt;/code&gt; Bright Yellow column headers, &lt;code&gt;#00AFAF&lt;/code&gt; Teal cursor bar, and a black MS-DOS &lt;code&gt;C:\ORACLE&amp;gt;&lt;/code&gt; bottom console.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Borland Turbo C++ 3.0&lt;/strong&gt;: Silver (&lt;code&gt;#A8A8A8&lt;/code&gt;) top menu bar with the red &lt;code&gt;[≡]&lt;/code&gt; system icon, Royal Blue editor window with double white frames, green active selection bar, and the classic Teal (&lt;code&gt;#00AFAF&lt;/code&gt;) &lt;code&gt;Project:&lt;/code&gt; bottom window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IBM 5151 Green Phosphor CRT&lt;/strong&gt;: Deep &lt;code&gt;#001000&lt;/code&gt; phosphor background with glowing &lt;code&gt;#00FF5F&lt;/code&gt; text and 100% full-row hardware inverse video on selected items.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Dark Terminal&lt;/strong&gt;: High-contrast dark theme.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ⚙️ Zero-Config Architecture &amp;amp; &lt;code&gt;CGO_ENABLED=0&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;One of the biggest pain points of deploying Go tools on Oracle Linux / RHEL database servers is C library dependencies (&lt;code&gt;glibc&lt;/code&gt; mismatches or missing &lt;code&gt;libclntsh.so&lt;/code&gt; Instant Client libraries).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ora-tui&lt;/code&gt; is compiled with &lt;strong&gt;&lt;code&gt;CGO_ENABLED=0&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Topology Discovery&lt;/strong&gt;: On startup, it inspects &lt;code&gt;/etc/oracle/ocr.loc&lt;/code&gt;, &lt;code&gt;/etc/oracle/olr.loc&lt;/code&gt;, &lt;code&gt;/etc/oratab&lt;/code&gt;, &lt;code&gt;inventory.xml&lt;/code&gt;, and &lt;code&gt;/proc/[0-9]*/cmdline&lt;/code&gt; (&lt;code&gt;ora_pmon_*&lt;/code&gt;, &lt;code&gt;db_pmon_*&lt;/code&gt;, &lt;code&gt;asm_pmon_*&lt;/code&gt;) to detect whether the host is &lt;strong&gt;Oracle RAC&lt;/strong&gt;, &lt;strong&gt;Oracle Restart&lt;/strong&gt;, or &lt;strong&gt;Single Instance&lt;/strong&gt; (from 11gR2 up to 23ai).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic UNIX Privilege Switching&lt;/strong&gt;: In production, Grid Infrastructure belongs to &lt;code&gt;grid&lt;/code&gt;, RDBMS binaries belong to &lt;code&gt;oracle&lt;/code&gt;, and clusterware stack commands require &lt;code&gt;root&lt;/code&gt;. &lt;code&gt;ora-tui&lt;/code&gt; inspects directory ownership via &lt;code&gt;os.Stat&lt;/code&gt; and dynamically switches UID/GID (&lt;code&gt;syscall.Credential&lt;/code&gt; / &lt;code&gt;sudo -n -u&lt;/code&gt;) for &lt;code&gt;sqlplus&lt;/code&gt;, &lt;code&gt;srvctl&lt;/code&gt;, &lt;code&gt;lsnrctl&lt;/code&gt;, &lt;code&gt;rman&lt;/code&gt;, and &lt;code&gt;adrci&lt;/code&gt;, reserving &lt;code&gt;root&lt;/code&gt; strictly for &lt;code&gt;crsctl&lt;/code&gt; or SCSI bus rescans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scrollable Popup Operation Output Window&lt;/strong&gt;: Every diagnostic or maintenance action opens a centered, scrollable popup window (&lt;code&gt;↑&lt;/code&gt;/&lt;code&gt;↓&lt;/code&gt;/&lt;code&gt;PgUp&lt;/code&gt;/&lt;code&gt;PgDn&lt;/code&gt;) displaying the complete multi-line command output in real time.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔍 The 9 Interactive Modules (Including Linux &amp;amp; SAN Multipath Auditing)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cluster &amp;amp; DB Status&lt;/strong&gt;: Nodes (&lt;code&gt;olsnodes&lt;/code&gt;), Daemons (&lt;code&gt;CRS&lt;/code&gt;, &lt;code&gt;CSSD&lt;/code&gt;, &lt;code&gt;EVMD&lt;/code&gt;, &lt;code&gt;ASM&lt;/code&gt;), Instances (&lt;code&gt;gv$instance&lt;/code&gt;), PDBs (&lt;code&gt;gv$pdbs&lt;/code&gt;), RAC Services, and a 4-step &lt;strong&gt;Graceful Node Drain&lt;/strong&gt; wizard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connected Users (&lt;code&gt;gv$session&lt;/code&gt;)&lt;/strong&gt;: Active/inactive sessions, wait events, &lt;code&gt;SQL_ID&lt;/code&gt;, PGA memory usage, TX/TM blocking lock chains, &lt;code&gt;KILL SESSION IMMEDIATE&lt;/code&gt;, and live &lt;code&gt;DBMS_XPLAN&lt;/code&gt; execution plans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tablespaces &amp;amp; Datafiles&lt;/strong&gt;: Real usage percentages accounting for &lt;code&gt;AUTOEXTEND MAXBYTES&lt;/code&gt;, visual progress bars, and 1-click datafile addition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Table Segments &amp;amp; Invalid Objects&lt;/strong&gt;: Top segments by size/rows, &lt;code&gt;FRESH&lt;/code&gt;/&lt;code&gt;STALE&lt;/code&gt; optimizer statistics, online table shrink (&lt;code&gt;SHRINK SPACE CASCADE&lt;/code&gt;), index rebuilds, and &lt;code&gt;UTL_RECOMP&lt;/code&gt; invalid object compilation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ASM &amp;amp; Network Listeners&lt;/strong&gt;: ASM diskgroups (&lt;code&gt;USABLE_FILE_MB&lt;/code&gt;, &lt;code&gt;OFFLINE_DISKS&lt;/code&gt;) and local/SCAN listeners distinguishing &lt;code&gt;READY&lt;/code&gt; (dynamic PMON/LREG) from &lt;code&gt;UNKNOWN&lt;/code&gt; (&lt;code&gt;listener.ora&lt;/code&gt; static) handlers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RMAN, Flashback &amp;amp; Data Guard&lt;/strong&gt;: RMAN backup job history, Guaranteed Restore Points (GRP), and Data Guard Standby &lt;code&gt;MRP0&lt;/code&gt; + Transport/Apply Lag monitoring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert Log &amp;amp; Strict &lt;code&gt;ORA-&lt;/code&gt; Errors&lt;/strong&gt;: Real-time &lt;code&gt;alert_&amp;lt;SID&amp;gt;.log&lt;/code&gt; parser and ADRCI trace purge workflows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux Server, Disks &amp;amp; SAN Multipath (&lt;code&gt;Module 8&lt;/code&gt;)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CPU, Memory &amp;amp; Kernel&lt;/strong&gt;: Load Average (&lt;code&gt;1m/5m/15m&lt;/code&gt;) vs CPU cores, Physical RAM, Swap &amp;amp; &lt;code&gt;vm.swappiness&lt;/code&gt;, Static &lt;code&gt;HugePages (2MB)&lt;/code&gt;, verification that &lt;strong&gt;&lt;code&gt;Transparent HugePages = [never]&lt;/code&gt;&lt;/strong&gt;, Kernel Async I/O slots (&lt;code&gt;fs.aio-nr&lt;/code&gt; / &lt;code&gt;fs.aio-max-nr&lt;/code&gt;), and File Descriptors (&lt;code&gt;fs.file-nr&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filesystems &amp;amp; Inodes (&lt;code&gt;df -PTm&lt;/code&gt; &amp;amp; &lt;code&gt;df -Pi&lt;/code&gt;)&lt;/strong&gt;: Space and &lt;strong&gt;Inode usage %&lt;/strong&gt; across &lt;code&gt;/u01&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, &lt;code&gt;/var&lt;/code&gt;, &lt;code&gt;/tmp&lt;/code&gt; to prevent dreaded &lt;code&gt;ORA-09925&lt;/code&gt; lockouts caused by millions of &lt;code&gt;.aud&lt;/code&gt;/&lt;code&gt;.trc&lt;/code&gt; files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SAN Multipath (&lt;code&gt;multipath -ll&lt;/code&gt;) &amp;amp; Fibre Channel HBAs&lt;/strong&gt;: Verifies that &lt;strong&gt;all physical SAN paths for every LUN are active (&lt;code&gt;4/4 ACTIVE&lt;/code&gt;)&lt;/strong&gt; and immediately flags degraded LUNs (&lt;code&gt;3/4 DEGRADED - FAULTY&lt;/code&gt;), checks &lt;code&gt;/sys/class/fc_host/host*&lt;/code&gt; HBA speed/state (&lt;code&gt;16G&lt;/code&gt;/&lt;code&gt;32G&lt;/code&gt; Online), and provides live SCSI/Multipath rescanning.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintenance Center&lt;/strong&gt;: Guided step-by-step DBA and sysadmin wizards.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📈 Embedded OpenTelemetry &amp;amp; Prometheus Exporter (&lt;code&gt;--opentelemetry&lt;/code&gt;) + 1-Command Docker POC
&lt;/h2&gt;

&lt;p&gt;Want 24/7 historical graphs and alerting without installing heavy Java agents? Start &lt;code&gt;ora-tui&lt;/code&gt; with &lt;code&gt;--opentelemetry&lt;/code&gt; (or run it as a background &lt;code&gt;systemd&lt;/code&gt; service via &lt;code&gt;ora-tui-otel.service&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Run in headless daemon mode on port 9161 (conflict-free with Oracle ports):&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ora-tui &lt;span class="nt"&gt;--opentelemetry&lt;/span&gt; &lt;span class="nt"&gt;--daemon&lt;/span&gt; &lt;span class="nt"&gt;--otel-port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;9161

&lt;span class="c"&gt;# Or enable the bundled systemd service:&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; ora-tui-otel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It exposes &lt;strong&gt;52 metrics&lt;/strong&gt; across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;http://&amp;lt;oracle-host&amp;gt;:9161/metrics&lt;/code&gt; — &lt;strong&gt;Prometheus / OpenMetrics format&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;http://&amp;lt;oracle-host&amp;gt;:9161/otel/v1/metrics&lt;/code&gt; — &lt;strong&gt;OpenTelemetry OTLP/HTTP JSON (&lt;code&gt;resourceMetrics&lt;/code&gt;)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;http://&amp;lt;oracle-host&amp;gt;:9161/api/v1/state&lt;/code&gt; — &lt;strong&gt;Full JSON State Snapshot&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Spinning up the Ready-to-Run &lt;code&gt;POC/&lt;/code&gt; Folder on Any Docker Host
&lt;/h3&gt;

&lt;p&gt;Inside the repository (and packaged under &lt;code&gt;/usr/share/ora-tui/POC/&lt;/code&gt;), we included a self-contained &lt;strong&gt;&lt;code&gt;POC/&lt;/code&gt;&lt;/strong&gt; folder with an interactive setup script (&lt;code&gt;./configure-poc.sh&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Every time you run &lt;code&gt;./configure-poc.sh&lt;/code&gt; on your Docker server, it prompts for the Oracle hostname or IP you want to monitor, configures Prometheus with &lt;strong&gt;15 Oracle &amp;amp; SAN alert rules&lt;/strong&gt;, checks connectivity, and launches &lt;strong&gt;Grafana with a 26-panel Full Observability Dashboard automatically loaded as the Home screen&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/mario-ezquerro/oratui.git
&lt;span class="nb"&gt;cd &lt;/span&gt;oratui/POC
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x configure-poc.sh
./configure-poc.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;==========================================================================
  CONFIGURACIÓN DE LA POC ORA-TUI (PROMETHEUS + GRAFANA)
==========================================================================

👉 Introduce el nombre o IP del host Oracle a monitorizar [servidor-oracle.local]: 192.168.1.50
👉 Introduce el puerto OpenTelemetry de ora-tui [9161]: 9161

&amp;gt;&amp;gt;&amp;gt; Generando configuración de Prometheus para monitorizar: 192.168.1.50:9161 ...
&amp;gt;&amp;gt;&amp;gt; Verificando conexión con http://192.168.1.50:9161/healthz ...
    [OK] Conexión exitosa con ora-tui en 192.168.1.50:9161.
&amp;gt;&amp;gt;&amp;gt; Levantando / recargando contenedores Docker (Prometheus + Grafana)...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://&amp;lt;docker-host&amp;gt;:3000&lt;/code&gt; (&lt;code&gt;admin&lt;/code&gt; / &lt;code&gt;admin&lt;/code&gt;) and all 26 panels—covering Clusterware, Instances, FRA %, PDBs, Tablespaces, ASM Diskgroups, Active/Blocking Sessions, PGA Memory, RMAN Backups, Data Guard Lag, &lt;code&gt;ORA-&lt;/code&gt; Alert Log errors, Linux Load/RAM/HugePages, Filesystem Inodes, and SAN Multipath health—are live out of the box!&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Try It Yourself (&lt;code&gt;dnf&lt;/code&gt;, &lt;code&gt;rpm&lt;/code&gt;, &lt;code&gt;apt-get&lt;/code&gt;, or &lt;code&gt;--mock&lt;/code&gt; Mode)
&lt;/h2&gt;

&lt;p&gt;You can install the prebuilt &lt;code&gt;.rpm&lt;/code&gt; or &lt;code&gt;.deb&lt;/code&gt; directly from GitHub, or test it on macOS/Linux without an Oracle database using &lt;code&gt;--mock&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# RHEL / Oracle Linux 8 &amp;amp; 9:&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; https://github.com/mario-ezquerro/oratui/raw/main/dist/ora-tui-1.6.0-1.x86_64.rpm

&lt;span class="c"&gt;# Debian / Ubuntu:&lt;/span&gt;
curl &lt;span class="nt"&gt;-fL&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /tmp/ora-tui.deb https://github.com/mario-ezquerro/oratui/raw/main/dist/ora-tui_1.6.0-1_amd64.deb
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; /tmp/ora-tui.deb

&lt;span class="c"&gt;# Or run the interactive simulator anywhere from source:&lt;/span&gt;
git clone https://github.com/mario-ezquerro/oratui.git
&lt;span class="nb"&gt;cd &lt;/span&gt;oratui
make mock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/mario-ezquerro/oratui" rel="noopener noreferrer"&gt;https://github.com/mario-ezquerro/oratui&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have questions or ideas for new Oracle / SAN checks? Drop a comment below or open an issue on GitHub!&lt;/p&gt;

</description>
      <category>oracle</category>
      <category>go</category>
      <category>opentelemetry</category>
      <category>ai</category>
    </item>
    <item>
      <title>Cómo construí ora-tui: Un gestor en consola (TUI) en Go sin dependencias para Oracle RAC y Single Instance</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Thu, 15 Oct 2026 07:21:10 +0000</pubDate>
      <link>https://dev.to/gde/como-construi-ora-tui-un-gestor-en-consola-tui-en-go-sin-dependencias-para-oracle-rac-y-single-1gc5</link>
      <guid>https://dev.to/gde/como-construi-ora-tui-un-gestor-en-consola-tui-en-go-sin-dependencias-para-oracle-rac-y-single-1gc5</guid>
      <description>&lt;p&gt;Son las 3:15 AM de una guardia de producción. Te conectas por SSH a un nodo de &lt;strong&gt;Oracle RAC&lt;/strong&gt; en Oracle Linux porque ha saltado una alerta crítica. En cuestión de segundos tienes que:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Comprobar si los demonios del cluster (&lt;code&gt;CRS&lt;/code&gt;, &lt;code&gt;CSSD&lt;/code&gt;, &lt;code&gt;EVMD&lt;/code&gt;, &lt;code&gt;ASM&lt;/code&gt;) están &lt;code&gt;ONLINE&lt;/code&gt; en todos los nodos (&lt;code&gt;crsctl check cluster -all&lt;/code&gt; y &lt;code&gt;crsctl status resource -t&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Cambiar del usuario &lt;code&gt;grid&lt;/code&gt; al usuario &lt;code&gt;oracle&lt;/code&gt; para abrir &lt;code&gt;sqlplus / as sysdba&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Averiguar qué sesión está bloqueando una tabla crítica en &lt;code&gt;gv$session&lt;/code&gt; (&lt;code&gt;enq: TX - row lock contention&lt;/code&gt;) o qué tablespace acaba de lanzar un &lt;code&gt;ORA-01654&lt;/code&gt; porque llegó al 93% sin &lt;code&gt;AUTOEXTEND&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Si toca mantenimiento de sistema operativo en un nodo, reubicar todos los servicios RAC (&lt;code&gt;srvctl relocate service&lt;/code&gt;), parar la instancia local y detener la pila CRS sin provocar ni un segundo de caída en las aplicaciones.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Después de repetir este ritual cientos de veces, decidí construir &lt;strong&gt;&lt;code&gt;ora-tui&lt;/code&gt;&lt;/strong&gt;: una herramienta interactiva de terminal (&lt;strong&gt;TUI&lt;/strong&gt;) escrita en &lt;strong&gt;Go&lt;/strong&gt;, empaquetada como un único binario estático (&lt;code&gt;CGO_ENABLED=0&lt;/code&gt;) e instalable vía &lt;code&gt;dnf install ora-tui&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;En este artículo te cuento cómo funciona por dentro, cómo resolví los retos de arquitectura en servidores Oracle y cómo puedes probar su modo simulador (&lt;code&gt;--mock&lt;/code&gt;) en tu propio portátil.&lt;/p&gt;




&lt;h2&gt;
  
  
  🖥️ El Diseño: Marcos Unicode (&lt;code&gt;┌─┐&lt;/code&gt; y &lt;code&gt;╔═╗&lt;/code&gt;) y Navegación con Flechas
&lt;/h2&gt;

&lt;p&gt;Uno de los objetivos principales era que la herramienta se sintiera rápida y clara sobre cualquier sesión SSH, utilizando una jerarquía visual de &lt;strong&gt;marcos Unicode&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Borde Simple (&lt;code&gt;┌ ─ ┐ │ └ ┘&lt;/code&gt;)&lt;/strong&gt; para los paneles secundarios y tablas de datos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Borde Doble (&lt;code&gt;╔ ═ ╗ ║ ╚ ╝&lt;/code&gt;)&lt;/strong&gt; para la cabecera principal, el panel que tiene el foco activo, las &lt;strong&gt;ventanas emergentes de mantenimiento&lt;/strong&gt; y los diálogos de confirmación.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Barras de progreso por bloques (&lt;code&gt;[█████████░] 93.0%&lt;/code&gt;)&lt;/strong&gt; coloreadas según criticidad (verde $&amp;lt;80\%$, amarillo $80\text{–}90\%$, rojo $&amp;gt;90\%$).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Así se ve &lt;code&gt;ora-tui&lt;/code&gt; en una sesión de terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                              ══ ORA-TUI :: ORACLE CLUSTER &amp;amp; DATABASE MANAGER ══                                      ║
╠══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║ Modo: [ORACLE RAC] [MOCK DESIGN] │ Host: ora-rac01.corp.local │ Cluster: crs-prod-cluster   │ Ver: 19.24.0.0.0       ║
║ ORACLE_HOME: /u01/app/oracle/product/19.0.0/dbhome_1  │ GRID_HOME: /u01/app/19.0.0/grid                              ║
║ Estado: 2 Inst OPEN │ 4 PDBs │ 3 Sesiones (1 Lock TX) │ 1 Tablespace &amp;gt;90% │ 3 Inválidos │ 1 Alerta Crítica ORA-01654 ║
╠═════════════════════════════╦════════════════════════════════════════════════════════════════════════════════════════╣
║ MENU [Flechas ↑↓ + Enter]   ║ PANTALLA ACTIVA: VISTA INTEGRAL + VENTANA EMERGENTE (Borde Simple ┌─┐ y Doble ╔═╗)     ║
╠═════════════════════════════╬════════════════════════════════════════════════════════════════════════════════════════╣
║ ▸ 1. Cluster &amp;amp; DB Estado    ║ ┌─ NODOS DEL CLUSTER &amp;amp; INSTANCIAS (ORACLE RAC / SINGLE) ─────────────────────────────┐ ║
║   2. Usuarios Conectados    ║ │ NODO       ESTADO   CRS     CSSD    ASM            INST      MODO        FRA_USO   │ ║
║   3. Tablespaces &amp;amp; Files    ║ │ ora-rac01  ONLINE   ONLINE  ONLINE  ONLINE(+ASM1)  PRODCDB1  READ WRITE  [████░░░░]│ ║
║   4. Tablas &amp;amp; Objetos       ║ │ ora-rac02  ONLINE   ONLINE  ONLINE  ONLINE(+ASM2)  PRODCDB2  READ WRITE  [████░░░░]│ ║
║   5. ASM &amp;amp; Red Listeners    ║ └────────────────────────────────────────────────────────────────────────────────────┘ ║
║   6. RMAN, Flashback &amp;amp; DG   ║ ┌─ USUARIOS CONECTADOS (gv$session) ───────────┬─ TABLESPACES &amp;amp; BACKUPS RMAN ────────┐ ║
║   7. Alert Log &amp;amp; Errores    ║ │ SID,SER#  USUARIO    ESTADO   EVENTO / LOCK  │ RECURSO       ESTADO / USO %        │ ║
║   8. Centro Mantenimiento   ║ │ 142,48219 ERP_APP    ACTIVE   db file seq rd │ ERP_DATA_TBS  [█████████░] 93.0% !! │ ║
║   b. Cambiar Marcos ┌─┐/╔═╗ ║ │ 289,11042 CRM_BATCH  ACTIVE   enq: TX lock   │ SYSAUX        [████████░░] 84.4%    │ ║
║   t. Cambiar Topologia      ║ │ 512,9931  CRM_ADMIN  INACT    BLOCKER (289)  │ RMAN INCR L0  COMPLETED (498.4 GB)  │ ║
║   q. Salir (Quit)           ║ │ 604,33105 BI_REPORT  ACTIVE   ON CPU (512MB) │ GRP_RELEASE   GUARANTEED (18.4 GB)  │ ║
║                             ║ └──────────────────────────────────────────────┴─────────────────────────────────────┘ ║
║                             ║                                                                                        ║
║                             ║      ╔══════════════════════════════════════════════════════════════════════════╗      ║
║                             ║      ║      ══ VENTANA DE MANTENIMIENTO [Seleccione con Flechas ↑↓ + Enter] ══  ║      ║
║                             ║      ╠══════════════════════════════════════════════════════════════════════════╣      ║
║                             ║      ║ ▸ [1] Drenar / Aislar Nodo Cluster (Relocate Services + Stop CRS)        ║      ║
║                             ║      ║   [2] Parar / Arrancar Instancia o Base de Datos (srvctl / sqlplus)      ║      ║
║                             ║      ║   [3] Ampliar Tablespace Crítico (+Datafile 32G a ERP_DATA_TBS 93%)      ║      ║
║                             ║      ║   [4] Matar Sesión Bloqueante (KILL SESSION '512,9931,@2' IMMEDIATE)     ║      ║
║                             ║      ║   [5] Actualizar Estadísticas (DBMS_STATS) &amp;amp; Shrink Tablas Online        ║      ║
║                             ║      ║   [6] Recompilar Objetos Inválidos (UTL_RECOMP / COMPILE_SCHEMA)         ║      ║
║                             ║      ║   [7] Backup RMAN Archivelog + Crear Punto Restauración Garantizado      ║      ║
║                             ║      ║   [8] Analizar Errores ORA- en Alert Log &amp;amp; Purgar Trazas ADRCI           ║      ║
║                             ║      ║   [Esc] Cancelar / Cerrar Ventana                                        ║      ║
║                             ║      ╚══════════════════════════════════════════════════════════════════════════╝      ║
╠═════════════════════════════╩════════════════════════════════════════════════════════════════════════════════════════╣
║ ┌─ CONSOLA DE EJECUCION &amp;amp; AUDITORIA EN VIVO ───────────────────────────────────────────────────────────────────────┐ ║
║ │ [08:05:01] Auto-Discovery: Modo=ORACLE RAC │ Cluster=crs-prod-cluster │ Release=19.24.0.0.0                      │ ║
║ │ [08:05:02] ALERTA ORA-01654: Tablespace ERP_DATA_TBS al 93.0% │ Bloqueo TX detectado en SID 512 -&amp;gt; SID 289       │ ║
║ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ║
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚙️ Decisiones Clave de Arquitectura
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. ¿Por qué &lt;code&gt;CGO_ENABLED=0&lt;/code&gt; y cero librerías de cliente C?
&lt;/h3&gt;

&lt;p&gt;La mayoría de los drivers de Oracle requieren &lt;code&gt;CGO&lt;/code&gt; y enlazar dinámicamente contra &lt;code&gt;libclntsh.so&lt;/code&gt; (Oracle Instant Client). En entornos empresariales con RHEL / Oracle Linux 7, 8 y 9 y distintas versiones de &lt;code&gt;glibc&lt;/code&gt;, distribuir binarios con dependencias dinámicas es una fuente constante de problemas.&lt;/p&gt;

&lt;p&gt;En &lt;code&gt;ora-tui&lt;/code&gt;, el binario se compila 100% estático (&lt;code&gt;CGO_ENABLED=0 GOOS=linux GOARCH=amd64&lt;/code&gt;) y se comunica directamente con las herramientas nativas que ya residen en &lt;code&gt;$ORACLE_HOME/bin&lt;/code&gt; y &lt;code&gt;$GRID_HOME/bin&lt;/code&gt; (&lt;code&gt;sqlplus -s / as sysdba&lt;/code&gt;, &lt;code&gt;srvctl&lt;/code&gt;, &lt;code&gt;crsctl&lt;/code&gt;, &lt;code&gt;olsnodes&lt;/code&gt;, &lt;code&gt;lsnrctl&lt;/code&gt;, &lt;code&gt;rman&lt;/code&gt;, &lt;code&gt;adrci&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Auto-Descubrimiento sin Archivos de Configuración
&lt;/h3&gt;

&lt;p&gt;Nada más ejecutarse, &lt;code&gt;ora-tui&lt;/code&gt; descubre qué tipo de instalación Oracle tiene delante sin pedir un solo archivo &lt;code&gt;.yaml&lt;/code&gt; o &lt;code&gt;.env&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Topología del Servidor:&lt;/strong&gt;
Lee &lt;code&gt;/etc/oracle/ocr.loc&lt;/code&gt; y &lt;code&gt;/etc/oracle/olr.loc&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;local_only=false&lt;/code&gt; $\rightarrow$ &lt;strong&gt;ORACLE RAC&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;local_only=true&lt;/code&gt; $\rightarrow$ &lt;strong&gt;ORACLE RESTART (Standalone Grid)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;No existe $\rightarrow$ &lt;strong&gt;SINGLE INSTANCE&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Homes e Instancias Vivas en &lt;code&gt;/proc&lt;/code&gt;:&lt;/strong&gt;
Además de leer &lt;code&gt;/etc/oratab&lt;/code&gt; e &lt;code&gt;inventory.xml&lt;/code&gt;, escanea &lt;code&gt;/proc/[0-9]*/cmdline&lt;/code&gt; para localizar procesos &lt;code&gt;ora_pmon_&amp;lt;SID&amp;gt;&lt;/code&gt;, &lt;code&gt;db_pmon_&amp;lt;SID&amp;gt;&lt;/code&gt; (Oracle 21c/23ai) y &lt;code&gt;asm_pmon_+ASM*&lt;/code&gt;. Así detecta bases de datos levantadas aunque nadie las haya registrado en &lt;code&gt;/etc/oratab&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;ExtractSIDFromPMON&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmdline&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sid&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;isASM&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fields&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fields&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmdline&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;proc&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;filepath&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Base&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HasPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"ora_pmon_"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TrimPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"ora_pmon_"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HasPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"db_pmon_"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TrimPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"db_pmon_"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HasPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"asm_pmon_"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;strings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TrimPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"asm_pmon_"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Cambio Dinámico de Usuario UNIX (&lt;code&gt;root&lt;/code&gt; $\rightarrow$ &lt;code&gt;oracle&lt;/code&gt; / &lt;code&gt;grid&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;En un cluster RAC con separación de roles, &lt;code&gt;grid&lt;/code&gt; es dueño de &lt;code&gt;$GRID_HOME&lt;/code&gt; y &lt;code&gt;oracle&lt;/code&gt; es dueño de &lt;code&gt;$ORACLE_HOME&lt;/code&gt;. Ejecutar &lt;code&gt;sqlplus&lt;/code&gt; o &lt;code&gt;srvctl&lt;/code&gt; como &lt;code&gt;root&lt;/code&gt; falla o ensucia permisos.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ora-tui&lt;/code&gt; lee el &lt;code&gt;uid&lt;/code&gt; y &lt;code&gt;gid&lt;/code&gt; propietarios de cada directorio con &lt;code&gt;os.Stat&lt;/code&gt; y lanza cada subproceso con las credenciales exactas de ese usuario mediante &lt;code&gt;syscall.Credential&lt;/code&gt;, reservando &lt;code&gt;root&lt;/code&gt; &lt;strong&gt;únicamente&lt;/strong&gt; para &lt;code&gt;crsctl start/stop crs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;asRoot&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;targetOwner&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;targetOwner&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UID&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;currentUID&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SysProcAttr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;syscall&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SysProcAttr&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Credential&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;syscall&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Credential&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;Uid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;targetOwner&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;Gid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;targetOwner&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Marcos Simples (&lt;code&gt;┌─┐&lt;/code&gt;) y Dobles (&lt;code&gt;╔═╗&lt;/code&gt;) en &lt;code&gt;tview&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;La librería &lt;a href="https://github.com/rivo/tview" rel="noopener noreferrer"&gt;&lt;code&gt;rivo/tview&lt;/code&gt;&lt;/a&gt; permite definir globalmente los runas de dibujo de cajas, distinguiendo entre ventanas normales y ventanas con foco activo. Configurando &lt;code&gt;tview.Borders&lt;/code&gt;, conseguimos que cualquier tabla o menú emergente resalte automáticamente con borde doble cuando el usuario lo selecciona con las flechas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Borde simple (┌ ─ ┐ │ └ ┘) para contenedores y tablas estándar&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Horizontal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'─'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Vertical&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'│'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TopLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'┌'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TopRight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'┐'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BottomLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'└'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BottomRight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'┘'&lt;/span&gt;

&lt;span class="c"&gt;// Borde doble (╔ ═ ╗ ║ ╚ ╝) para la ventana con foco y modales emergentes&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HorizontalFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'═'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;VerticalFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'║'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TopLeftFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'╔'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TopRightFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'╗'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BottomLeftFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'╚'&lt;/span&gt;
&lt;span class="n"&gt;tview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Borders&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BottomRightFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'╝'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Además, pulsando la tecla &lt;strong&gt;&lt;code&gt;b&lt;/code&gt;&lt;/strong&gt; en cualquier momento, puedes alternar en caliente entre el modo mixto (&lt;code&gt;┌─┐&lt;/code&gt; + &lt;code&gt;╔═╗&lt;/code&gt;), todo borde doble (&lt;code&gt;╔═╗&lt;/code&gt;), todo borde simple (&lt;code&gt;┌─┐&lt;/code&gt;) o ASCII clásico de 7 bits (&lt;code&gt;+ - = |&lt;/code&gt;) si entras desde una consola serie antigua.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Los 8 Módulos de Diagnóstico y Mantenimiento Guiado
&lt;/h2&gt;

&lt;p&gt;En lugar de memorizar comandos, te mueves con las &lt;strong&gt;flechas del teclado (&lt;code&gt;↑&lt;/code&gt;/&lt;code&gt;↓&lt;/code&gt;)&lt;/strong&gt; por las 8 vistas y pulsas &lt;strong&gt;&lt;code&gt;Enter&lt;/code&gt;&lt;/strong&gt; sobre cualquier fila para abrir su menú contextual de mantenimiento:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cluster &amp;amp; DB Estado:&lt;/strong&gt; Salud de demonios (&lt;code&gt;CRS&lt;/code&gt;, &lt;code&gt;CSSD&lt;/code&gt;, &lt;code&gt;EVMD&lt;/code&gt;, &lt;code&gt;ASM&lt;/code&gt;), VIPs, instancias, PDBs y &lt;strong&gt;Drenado Seguro de Nodo (Graceful Node Drain)&lt;/strong&gt; en 4 pasos:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Paso 1:&lt;/em&gt; Pre-chequeo de nodos failover &lt;code&gt;ONLINE&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Paso 2:&lt;/em&gt; Reubicación en caliente de servicios (&lt;code&gt;srvctl relocate service&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Paso 3:&lt;/em&gt; Parada limpia de la instancia local (&lt;code&gt;srvctl stop instance -stopoption IMMEDIATE&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Paso 4:&lt;/em&gt; Parada opcional de la pila de clusterware (&lt;code&gt;crsctl stop crs&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usuarios Conectados (&lt;code&gt;gv$session&lt;/code&gt;):&lt;/strong&gt; Detección instantánea de bloqueos &lt;code&gt;TX/TM&lt;/code&gt;, &lt;code&gt;SQL_ID&lt;/code&gt;, evento de espera y texto SQL actual, con opción para ejecutar &lt;code&gt;KILL SESSION IMMEDIATE&lt;/code&gt; o &lt;code&gt;DISCONNECT SESSION POST_TRANSACTION&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tablespaces &amp;amp; Datafiles:&lt;/strong&gt; Barras visuales de llenado y asistente para añadir datafiles en ASM (&lt;code&gt;+DATA&lt;/code&gt;), activar &lt;code&gt;AUTOEXTEND ON&lt;/code&gt; o hacer &lt;code&gt;COALESCE&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tablas, Segmentos &amp;amp; Objetos Inválidos:&lt;/strong&gt; Identificación de tablas con estadísticas &lt;code&gt;STALE&lt;/code&gt; o alta fragmentación para lanzar &lt;code&gt;DBMS_STATS.GATHER_TABLE_STATS&lt;/code&gt;, &lt;code&gt;SHRINK SPACE CASCADE&lt;/code&gt;, &lt;code&gt;REBUILD ONLINE&lt;/code&gt; de índices o recompilar objetos inválidos con &lt;code&gt;UTL_RECOMP&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ASM &amp;amp; Red Listeners:&lt;/strong&gt; Monitorización de diskgroups (&lt;code&gt;v$asm_diskgroup&lt;/code&gt;) y control de listeners locales y SCAN (&lt;code&gt;lsnrctl start/stop/reload&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RMAN, Flashback &amp;amp; Data Guard:&lt;/strong&gt; Estado de backups RMAN, creación de &lt;em&gt;Guaranteed Restore Points (GRP)&lt;/em&gt; antes de un cambio crítico y verificación de lag en réplicas &lt;em&gt;Data Guard Standby&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert Log &amp;amp; Errores &lt;code&gt;ORA-&lt;/code&gt;:&lt;/strong&gt; Lectura directa sobre &lt;code&gt;v$diag_alert_ext&lt;/code&gt; con salto automático al módulo que resuelve el error y purgado de trazas con &lt;code&gt;adrci&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Centro de Mantenimiento:&lt;/strong&gt; Catálogo guiado de operaciones DBA con confirmación de seguridad y consola de auditoría en tiempo real.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚀 Pruébalo en 30 Segundos (Modo Simulación &lt;code&gt;--mock&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;No necesitas tener un cluster Oracle RAC instalado en tu máquina para probar la interfaz. &lt;code&gt;ora-tui&lt;/code&gt; incluye un modo simulador (&lt;code&gt;--mock&lt;/code&gt;) con datos realistas de un cluster RAC en producción (incluyendo sesiones bloqueadas, un tablespace al 93% y alertas &lt;code&gt;ORA-01654&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/mario/ora-tui.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ora-tui

&lt;span class="c"&gt;# Compilar y lanzar el simulador interactivo en modo Oracle RAC:&lt;/span&gt;
make mock

&lt;span class="c"&gt;# O ver la captura estática directamente en tu terminal:&lt;/span&gt;
make preview
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;¿Qué otra tarea repetitiva de administración Oracle te gustaría automatizar desde un menú de consola? ¡Te leo en los comentarios!&lt;/p&gt;

</description>
      <category>go</category>
      <category>oracle</category>
      <category>linux</category>
      <category>database</category>
    </item>
    <item>
      <title>Building Sarrera: Self-Hosted Enterprise AI Inference Gateway with RBAC, Token Quotas &amp; Telemetry</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Fri, 02 Oct 2026 12:19:36 +0000</pubDate>
      <link>https://dev.to/gde/building-sarrera-self-hosted-enterprise-ai-inference-gateway-with-rbac-token-quotas-telemetry-316o</link>
      <guid>https://dev.to/gde/building-sarrera-self-hosted-enterprise-ai-inference-gateway-with-rbac-token-quotas-telemetry-316o</guid>
      <description>&lt;p&gt;Engineering teams worldwide face a common dilemma when adopting generative AI:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cloud AI privacy &amp;amp; security risks&lt;/strong&gt;: Sending proprietary source code to third-party APIs (OpenAI, Anthropic) triggers compliance alarms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uncontrolled cloud billing&lt;/strong&gt;: A handful of developers running autonomous agents (Cline, Roo Code, Cursor) can easily run up thousands of dollars in surprise monthly token bills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware fragmentation&lt;/strong&gt;: On-premise clusters often consist of heterogeneous hardware—a few servers with NVIDIA A100/RTX 4090s, some mid-range workstation GPUs (RTX 3060/4060), and fallback CPU clusters. Without smart routing, high-end GPUs saturate while other machines sit idle.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve this, we built and open-sourced &lt;strong&gt;&lt;a href="https://github.com/Sarrera/sarrera" rel="noopener noreferrer"&gt;Sarrera&lt;/a&gt;&lt;/strong&gt; (&lt;em&gt;"Entryway / Portal"&lt;/em&gt; in Basque) — an enterprise local AI inference gateway, access control (RBAC), and observability platform packaged into a single Docker Compose deployment.&lt;/p&gt;

&lt;p&gt;In this article, I will walk you through the architecture, multi-tier subscription quotas, dynamic node management, and how you can deploy your own private AI hub in under 5 minutes.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ High-Level Architecture
&lt;/h2&gt;

&lt;p&gt;Sarrera decouples client IDEs from physical compute hardware, shielding your internal network behind a single perimeter reverse proxy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                                [ Internet / Corporate LAN ]
                                              │
                                              ▼ (Ports 80 / 443 Only)
                             ┌───────────────────────────────────┐
                             │       ai-caddy (Caddy v2)         │
                             │  - Central TLS Termination        │
                             │  - Sarrera Service Hub &amp;amp; Portal   │
                             │  - Security Headers (HSTS)        │
                             └─────────────────┬─────────────────┘
                                               │
         ┌────────────────────────┬────────────┴────────────┬────────────────────────┐
         ▼                        ▼                         ▼                        ▼
┌──────────────────┐    ┌──────────────────┐      ┌──────────────────┐     ┌──────────────────┐
│  Open WebUI      │    │  LiteLLM Proxy   │      │  Langfuse v2     │     │  MinIO Console   │
│  (Chat Portal)   │    │  (Gateway/Admin) │      │  (Observability) │     │  (Trace Storage) │
│  Internal :8080  │    │  Internal :4000  │      │  Internal :3000  │     │  Internal :9001  │
└──────────────────┘    └─────────┬────────┘      └──────────────────┘     └──────────────────┘
                                  │
                 ┌────────────────┼────────────────┐
                 ▼ (least-busy)   ▼                ▼
          [GPU Premium]    [GPU Standard]    [CPU Cluster]
         (A100 / RTX 4090) (RTX 3060/4060)  (AVX-512 CPU)
           :11434           :11434            :11434
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The 7 Core Building Blocks
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Edge Reverse Proxy (&lt;code&gt;Caddy v2&lt;/code&gt;)&lt;/strong&gt;: Serves as the single exposed internet entrypoint on ports 80/443. Manages automated TLS certificate lifecycles (Let's Encrypt / ZeroSSL / Internal CA), and serves the integrated Sarrera Service Hub.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Gateway &amp;amp; Router (&lt;code&gt;LiteLLM Proxy&lt;/code&gt;)&lt;/strong&gt;: Standard &lt;code&gt;/v1/chat/completions&lt;/code&gt; OpenAI-compatible API gateway. Enforces subscription Tiers, virtual API keys, and weighted &lt;code&gt;least-busy&lt;/code&gt; load balancing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability &amp;amp; Auditing (&lt;code&gt;Langfuse v2&lt;/code&gt;)&lt;/strong&gt;: Asynchronous, non-blocking telemetry engine recording every prompt, completion, Time-To-First-Token (TTFT), token sum, and department cost attribution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chat &amp;amp; Prompt Portal (&lt;code&gt;Open WebUI&lt;/code&gt;)&lt;/strong&gt;: Interactive chat interface for non-developer staff, document RAG, and Active Directory / LDAP authentication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relational State (&lt;code&gt;PostgreSQL 16&lt;/code&gt;)&lt;/strong&gt;: Dedicated persistent databases for LiteLLM keys/budgets and Langfuse trace metadata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Object Storage (&lt;code&gt;MinIO S3&lt;/code&gt;)&lt;/strong&gt;: High-performance S3 storage bucket retaining large trace payloads and prompt attachments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Stand-in Engine (&lt;code&gt;Ollama&lt;/code&gt;)&lt;/strong&gt;: Local container with network aliases (&lt;code&gt;gpu-entry-node&lt;/code&gt;, &lt;code&gt;cpu-cluster-node&lt;/code&gt;, &lt;code&gt;gpu-premium-node&lt;/code&gt;) for instant testing without external GPU dependencies.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛡️ 3-Tier Subscription &amp;amp; Token Quota Governance
&lt;/h2&gt;

&lt;p&gt;To avoid budget blowouts, Sarrera maps developer virtual API keys to &lt;strong&gt;LiteLLM Teams&lt;/strong&gt; representing corporate subscription tiers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌───────────────────────────────────────────────────────────────────────────────┐
│                           SARRERA SUBSCRIPTION TIERS                          │
├───────────────────────┬───────────────────────────────┬───────────────────────┤
│      tier-basic       │         tier-standard         │     tier-premium      │
│   (Junior / Entry)    │        (Pro / Standard)       │     (Lead / Expert)   │
├───────────────────────┼───────────────────────────────┼───────────────────────┤
│ • basic-coder (7B)    │ • basic-coder (7B)            │ • basic-coder (7B)    │
│                       │ • premium-coder (32B)         │ • premium-coder (32B) │
│                       │                               │ • premium-reasoning   │
│                       │                               │   (DeepSeek-R1)       │
├───────────────────────┼───────────────────────────────┼───────────────────────┤
│ Budget: 15 EUR/month  │ Budget: 50 EUR/month          │ Budget: 100 EUR/month │
│ 60 RPM · 30k TPM      │ 120 RPM · 60k TPM             │ 180 RPM · 120k TPM    │
└───────────────────────┴───────────────────────────────┴───────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Sub-Millisecond Enforcement
&lt;/h3&gt;

&lt;p&gt;When a developer in VS Code triggers autocomplete:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;LiteLLM checks if the requested model is whitelisted for their tier.&lt;/li&gt;
&lt;li&gt;If a junior developer with &lt;code&gt;tier-basic&lt;/code&gt; requests &lt;code&gt;premium-reasoning&lt;/code&gt; (DeepSeek-R1), the gateway immediately returns &lt;strong&gt;&lt;code&gt;HTTP 403 Forbidden&lt;/code&gt;&lt;/strong&gt; in &lt;strong&gt;10 milliseconds&lt;/strong&gt; without touching the GPU cluster.&lt;/li&gt;
&lt;li&gt;If accumulated monthly spend exceeds the team's cap, it returns &lt;code&gt;HTTP 400 Budget Exceeded&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If rate limits are exceeded, it returns &lt;code&gt;HTTP 429 Too Many Requests&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ⚡ Heterogeneous Load Balancing: Do You Need HAProxy?
&lt;/h2&gt;

&lt;p&gt;A frequent question from infrastructure engineers is: &lt;em&gt;"Do we need HAProxy or Nginx to balance traffic across our inference servers?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The short answer is NO.&lt;/strong&gt; Traditional Layer 4 / Layer 7 proxies like HAProxy only see HTTP byte streams and status codes. They do not understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VRAM memory footprints per request.&lt;/li&gt;
&lt;li&gt;The difference between a 20-token autocomplete versus a 4,000-token multi-file refactoring.&lt;/li&gt;
&lt;li&gt;Token streaming (&lt;code&gt;text/event-stream&lt;/code&gt;), TTFT latencies, or Out-Of-Memory (OOM) GPU states.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LiteLLM is an &lt;strong&gt;LLM-aware Application Router&lt;/strong&gt;. In &lt;a href="https://github.com/Sarrera/sarrera/blob/main/config/litellm-config.yaml" rel="noopener noreferrer"&gt;&lt;code&gt;config/litellm-config.yaml&lt;/code&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;model_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# Route 1: Mid-range dedicated GPU (RTX 4060)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;model_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;basic-coder&lt;/span&gt;
    &lt;span class="na"&gt;litellm_params&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ollama/qwen2.5-coder:7b&lt;/span&gt;
      &lt;span class="na"&gt;api_base&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://192.168.1.50:11434&lt;/span&gt;
      &lt;span class="na"&gt;weight&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8&lt;/span&gt;
      &lt;span class="na"&gt;rpm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60&lt;/span&gt;

  &lt;span class="c1"&gt;# Route 2: Fallback CPU cluster&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;model_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;basic-coder&lt;/span&gt;
    &lt;span class="na"&gt;litellm_params&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ollama/qwen2.5-coder:7b&lt;/span&gt;
      &lt;span class="na"&gt;api_base&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://192.168.1.51:11434&lt;/span&gt;
      &lt;span class="na"&gt;weight&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
      &lt;span class="na"&gt;rpm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;

&lt;span class="na"&gt;router_settings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;routing_strategy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;least-busy"&lt;/span&gt;
  &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45&lt;/span&gt;
  &lt;span class="na"&gt;num_retries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;least-busy&lt;/code&gt; routing&lt;/strong&gt;: Dynamically tracks active requests in flight and routes the next query to the least saturated host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failover &amp;amp; Retries (&lt;code&gt;num_retries: 2&lt;/code&gt;)&lt;/strong&gt;: If a GPU server crashes or encounters a kernel stall, LiteLLM transparently retries the query against the alternate node before returning an error to the developer.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🖥️ Live Dynamic Node Administration (Zero-Downtime)
&lt;/h2&gt;

&lt;p&gt;Editing configuration files and restarting containers during office hours is impractical. &lt;/p&gt;

&lt;p&gt;We built an &lt;strong&gt;Authenticated Admin Control Center&lt;/strong&gt; directly into the Caddy web interface (&lt;code&gt;https://localhost/&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;&lt;code&gt;🔐 Admin Control Panel&lt;/code&gt;&lt;/strong&gt; in the top navigation.&lt;/li&gt;
&lt;li&gt;Sign in with the credentials defined in &lt;code&gt;.env&lt;/code&gt; (&lt;code&gt;ADMIN_USERNAME&lt;/code&gt; and &lt;code&gt;ADMIN_PASSWORD&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;You can:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Register new GPU/CPU nodes on the fly&lt;/strong&gt;: Provide the node IP (&lt;code&gt;api_base&lt;/code&gt;), backend model, engine (Ollama, vLLM, TGI), weight, and RPM limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ping &amp;amp; test latency&lt;/strong&gt;: Verify network connectivity before saving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persist in PostgreSQL&lt;/strong&gt;: Saves the node directly into LiteLLM without touching YAML files or restarting Docker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issue scoped developer keys&lt;/strong&gt;: Create keys for &lt;code&gt;tier-basic&lt;/code&gt;, &lt;code&gt;tier-standard&lt;/code&gt;, or &lt;code&gt;tier-premium&lt;/code&gt; with one click.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  💻 Developer Client Integration (VS Code Continue)
&lt;/h2&gt;

&lt;p&gt;Developers consume the platform just like OpenAI:&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;~/.continue/config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"models"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Sarrera (tier-standard)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"premium-coder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"apiKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sk-your-virtual-key-here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"apiBase"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://ai.company.local/v1"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tabAutocompleteModel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Sarrera Autocomplete"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openai"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"basic-coder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"apiKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sk-your-virtual-key-here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"apiBase"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://ai.company.local/v1"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every autocomplete and chat interaction appears in &lt;strong&gt;Langfuse&lt;/strong&gt; in real time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exact prompt and generated code snippet.&lt;/li&gt;
&lt;li&gt;Exact tokens consumed (&lt;code&gt;prompt_tokens&lt;/code&gt;, &lt;code&gt;completion_tokens&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Time-To-First-Token (TTFT) and total latency.&lt;/li&gt;
&lt;li&gt;Tagged with the developer's username and department for monthly chargeback.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Quickstart: Deploy in 5 Minutes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Clone &amp;amp; Configure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Sarrera/sarrera.git
&lt;span class="nb"&gt;cd &lt;/span&gt;sarrera
&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Launch the Stack
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Bootstrap the 3 Subscription Tiers
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./scripts/bootstrap-tiers.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Issue a Virtual API Key
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./scripts/issue-key.sh alex tier-standard 90d &lt;span class="s2"&gt;"Core-Engineering"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Run the End-to-End Validation Suite
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./scripts/smoke-test.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;strong&gt;&lt;a href="https://localhost/" rel="noopener noreferrer"&gt;https://localhost/&lt;/a&gt;&lt;/strong&gt; in your browser to access the Sarrera Central Portal!&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 What's Next &amp;amp; Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/Sarrera/sarrera" rel="noopener noreferrer"&gt;https://github.com/Sarrera/sarrera&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation Portal&lt;/strong&gt;: Hosted on GitHub Pages inside the repository (&lt;code&gt;/docs&lt;/code&gt;), featuring complete runbooks for Jekyll, Docsify, and MkDocs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your organization is exploring private, compliant local AI inference, check out the repository, give it a star ⭐, and let me know your thoughts in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>docker</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Stop Running 15 Commands Over SSH: Meet Dockeretior, the Proactive Docker TUI &amp; AutoDoctor #builtwithantigravity</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Thu, 01 Oct 2026 12:54:32 +0000</pubDate>
      <link>https://dev.to/gde/stop-running-15-commands-over-ssh-meet-dockeretior-the-proactive-docker-tui-autodoctor-419f</link>
      <guid>https://dev.to/gde/stop-running-15-commands-over-ssh-meet-dockeretior-the-proactive-docker-tui-autodoctor-419f</guid>
      <description>&lt;h2&gt;
  
  
  😫 The 2:00 AM SSH Nightmare
&lt;/h2&gt;

&lt;p&gt;Every sysadmin, DevOps engineer, and backend developer knows this drill by heart:&lt;/p&gt;

&lt;p&gt;Your monitoring ping rings. A production or staging server is sluggish. You SSH into the remote machine, open your shell, and start typing the ritual sequence of 15 commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker ps &lt;span class="nt"&gt;-a&lt;/span&gt;
docker stats &lt;span class="nt"&gt;--no-stream&lt;/span&gt;
docker inspect &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'{{.State.ExitCode}}'&lt;/span&gt; &amp;lt;container&amp;gt;
docker logs &lt;span class="nt"&gt;--tail&lt;/span&gt; 50 &amp;lt;container&amp;gt;
docker system &lt;span class="nb"&gt;df
df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt;
free &lt;span class="nt"&gt;-m&lt;/span&gt;
&lt;span class="nb"&gt;uptime
cat &lt;/span&gt;docker-compose.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You cross-reference logs, parse memory cgroups, try to decipher whether an &lt;strong&gt;Exit Code 137&lt;/strong&gt; was an actual Linux OOM Killer invocation or a manual SIGKILL, and hunt down why your &lt;code&gt;/var/lib/docker&lt;/code&gt; partition climbed from 55% to 89% in two weeks.&lt;/p&gt;

&lt;p&gt;Web dashboards like Portainer exist, but they are heavy web apps that require exposing extra ports, configuring web servers, and opening remote ports. CLI tools like LazyDocker are great, but they are mostly passive viewers—they display tables, but don’t tell you:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"I detected 6 issues on this host: here are the 3 you must fix right now, why they happened, and how to fix them in one click."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is why I created &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/dockeretior" rel="noopener noreferrer"&gt;Dockeretior&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚓ What is Dockeretior?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dockeretior&lt;/strong&gt; is an interactive, zero-overhead Terminal UI (TUI) and latent pseudo-terminal (PTY) supervisor written in Go. &lt;/p&gt;

&lt;p&gt;It runs directly in your terminal over SSH or local bash, featuring:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Split-Screen Dashboard:&lt;/strong&gt; A live container list on the left alongside 4 real-time ASCII metric gauges on the right (CPU load &amp;amp; sparkline trends, RAM vs host cgroups, Network RX/TX throughput, Block I/O, PIDs, and uptime).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🩺 AutoDoctor (Intelligent Root-Cause Diagnostics):&lt;/strong&gt; A health diagnostic engine that correlates Exit Codes, OOM Killer cgroups, binary entrypoint failures (126/127), restart loops, and security exposures into a &lt;strong&gt;Server Health Score (0 - 100)&lt;/strong&gt; and a prioritized &lt;strong&gt;Top 3 Remediation Plan&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐙 Visual Docker Compose Topology:&lt;/strong&gt; Automatically parses multi-service Compose files and draws an ASCII dependency tree mapping services, &lt;code&gt;depends_on&lt;/code&gt; directed graphs, volumes, and networks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;💡 1-Click Storage Reclaim:&lt;/strong&gt; Identifies dangling images, orphaned volumes, and build cache (often 30+ GB of hidden reclaimable disk), letting you free it with a single keystroke (c).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🚨 Alert Dispatcher &amp;amp; Drift Tracking:&lt;/strong&gt; Sends structured alerts to &lt;strong&gt;Slack&lt;/strong&gt;, &lt;strong&gt;Discord&lt;/strong&gt;, or &lt;strong&gt;Telegram&lt;/strong&gt;, and tracks historical memory and disk creep across snapshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚡ Latent PTY Supervisor (Hot-Toggle):&lt;/strong&gt; Can run completely invisible in the background of your SSH shell, toggled into view in milliseconds using &lt;code&gt;Ctrl + \&lt;/code&gt; or &lt;code&gt;Cmd + Option + Space&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🩺 The Heart of Dockeretior: AutoDoctor
&lt;/h2&gt;

&lt;p&gt;Instead of drowning the user in data, Dockeretior prioritizes actionable intelligence.&lt;/p&gt;

&lt;p&gt;When you run &lt;code&gt;./bin/dockeretior --doctor&lt;/code&gt; or press a inside the TUI, AutoDoctor inspects your host in sub-second time and outputs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;================================================================================
🩺 AUTODOCTOR - SERVER HEALTH REPORT
================================================================================
Health Score : 58/100 🔴 Critical
Containers   : 3 running, 1 stopped (4 total)
Generated    : 2026-10-01 14:17:01
--------------------------------------------------------------------------------
SUBSYSTEMS STATUS:
  🟢 Docker Engine   : Docker v29.8.1, 16 CPUs, 31.3 GB RAM.
  🟢 Containers      : 3 active, 1 stopped.
  🔴 Storage         : 29.88 GB reclaimable in cache and unused images.
  🟡 Security        : 3 security alerts identified.
--------------------------------------------------------------------------------
TOP 3 PRIORITIZED ACTIONS:
  1. [🔴 CRITICAL] Significant Reclaimable Storage in Docker (29.88 GB) (Docker Storage)
     ↳ Root Cause: Accumulation of 14 dangling images, 11 orphaned volumes, and build cache.
     ↳ Solution  : Press 'c' inside AutoDoctor to reclaim disk space immediately.
     ↳ Command   : docker system prune -a --volumes

  2. [🔴 CRITICAL] Container 'buildkit_builder' running in privileged mode (--privileged)
     ↳ Root Cause: Privileged mode enabled, bypassing standard Docker container isolation.
     ↳ Solution  : Remove 'privileged: true' and grant only required Linux capabilities ('cap_add').

  3. [🟡 WARNING] PostgreSQL port exposed on 0.0.0.0 (5432:5432) on 'app-postgres'
     ↳ Root Cause: Public interface binding allows external connections from any IP.
     ↳ Solution  : Bind to '127.0.0.1:5432:5432' or rely on internal Docker bridge networks.
--------------------------------------------------------------------------------
💡 RECLAIMABLE DISK: 29.88 GB accumulated in unused images and build cache.
   To free space: launch dockeretior (press 'a' then 'c') or run docker system prune -a --volumes.
================================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Automatic Correlation of Crash Loops
&lt;/h3&gt;

&lt;p&gt;When a container dies or starts restarting, AutoDoctor doesn't just show a red icon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exit Code 137:&lt;/strong&gt; Correlates whether the kernel invoked the OOM Killer and compares current RAM usage against the container's hard cgroup limit (e.g. &lt;code&gt;508 MB / 512 MB limit&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exit Code 126 / 127:&lt;/strong&gt; Flags missing binaries or entrypoint script permission issues (&lt;code&gt;chmod +x&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crash Loops:&lt;/strong&gt; Tracks restart frequency and isolates the exact stderr cause from the last seconds of the lifecycle.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🐙 Visual Docker Compose Dependency Tree
&lt;/h2&gt;

&lt;p&gt;Have you ever opened a directory with a 400-line &lt;code&gt;docker-compose.yml&lt;/code&gt; and wished you could just &lt;em&gt;see&lt;/em&gt; the topology?&lt;/p&gt;

&lt;p&gt;Pressing c in Dockeretior (or running &lt;code&gt;dockeretior --compose&lt;/code&gt;) scans local Compose files, analyzes the Directed Acyclic Graph (DAG) of &lt;code&gt;depends_on&lt;/code&gt;, and renders an ASCII architectural diagram:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 📦 STACK: docker-compose.yml (4 services, 2 networks, 1 volume)

 ── Level 1: Ingress / Frontend / Entrypoint ──
  ┌──────────────────────────────┐  ┌──────────────────────────────┐
  │ 🚀 api                       │  │ 🌐 traefik                  │
  │ img: mycompany/api:v1.0      │  │ img: traefik:v2.10          │
  │ ports: 8080:8080             │  │ ports: 80:80,443:443        │
  └──────────────────────────────┘  └──────────────────────────────┘
            │
            ▼ (depends_on)
 ── Level 3: Databases / Cache / Storage ──
  ┌──────────────────────────────┐  ┌──────────────────────────────┐
  │ 🗄️  postgres                │  │ ⚡ redis                     │
  │ img: postgres:16-alpine      │  │ img: redis:7-alpine         │
  │ vols: 1 mounted              │  │ net: internal               │
  └──────────────────────────────┘  └──────────────────────────────┘

 ── Dependency &amp;amp; Link Matrix ────────────────────────
  • api              ──depends_on──▶ [postgres, redis]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🤖 #BuiltWithAntigravity: How It Came to Life
&lt;/h2&gt;

&lt;p&gt;Building high-performance terminal software in Go is notoriously tricky:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have to handle &lt;strong&gt;strict ANSI escape sequences&lt;/strong&gt; and raw terminal modes (&lt;code&gt;MakeRaw&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Terminal resize events (&lt;code&gt;SIGWINCH&lt;/code&gt;) must be handled without tearing or buffer scrollbars.&lt;/li&gt;
&lt;li&gt;Go's build system has strict OS rules (e.g., naming a file &lt;code&gt;*_windows.go&lt;/code&gt; excludes it from Linux/macOS builds).&lt;/li&gt;
&lt;li&gt;Concurrency between Docker event streams, PTY forwarders, and UI event loops must be rock-solid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This entire project was engineered pair-programming with &lt;strong&gt;Google Antigravity&lt;/strong&gt; using the &lt;strong&gt;#builtwithantigravity&lt;/strong&gt; agentic workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Google Antigravity enabled:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Mathematical Layout Budgeting:&lt;/strong&gt; We ensured that every line rendered in the split-screen view calculates exact cell widths with &lt;code&gt;go-runewidth&lt;/code&gt;, guaranteeing &lt;strong&gt;zero terminal line-wrapping or viewport scroll jumps&lt;/strong&gt; across any window size (from compact 80x24 laptops to 4K ultrawide monitors).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Docker SDK Integration:&lt;/strong&gt; Implementing custom socket discovery (standard Unix socket, Docker Desktop macOS, Colima, OrbStack, and Linux rootless sockets).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;From Idea to Published Release:&lt;/strong&gt; In just a single continuous session, Antigravity helped:

&lt;ul&gt;
&lt;li&gt;Structure the comprehensive 11-phase architecture roadmap.&lt;/li&gt;
&lt;li&gt;Implement the root-cause analysis rules engine.&lt;/li&gt;
&lt;li&gt;Build the Compose DAG parser and ASCII box drawer.&lt;/li&gt;
&lt;li&gt;Write comprehensive unit tests for every package (&lt;code&gt;go test -v ./...&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Package CLI commands (&lt;code&gt;--doctor&lt;/code&gt;, &lt;code&gt;--compose&lt;/code&gt;, &lt;code&gt;--test-alert&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tag and publish release versions (&lt;code&gt;v1.1.0&lt;/code&gt; through &lt;code&gt;v1.3.0&lt;/code&gt;) directly to GitHub.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Pairing with an AI agent that understands deep systems-level programming, TTY intricacies, and Unix semantics was a game-changer for shipping this tool so quickly and robustly.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Quickstart: Try It in 30 Seconds
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Option 1: Build from Source (Go 1.22+)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/mario-ezquerro/dockeretior.git
&lt;span class="nb"&gt;cd &lt;/span&gt;dockeretior

&lt;span class="c"&gt;# 2. Build the binary&lt;/span&gt;
make build

&lt;span class="c"&gt;# 3. Test instant diagnostics&lt;/span&gt;
./bin/dockeretior &lt;span class="nt"&gt;--doctor&lt;/span&gt;

&lt;span class="c"&gt;# 4. Launch the full interactive TUI&lt;/span&gt;
./bin/dockeretior
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Option 2: Install via &lt;code&gt;go install&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/mario-ezquerro/dockeretior/cmd/dockeretior@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⌨️ Essential Keyboard Shortcuts
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shortcut&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
F1 / ?
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Help Modal:&lt;/strong&gt; Instant list of all keys and shortcuts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F2 / f
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Filter:&lt;/strong&gt; Toggle between &lt;em&gt;Running only&lt;/em&gt; and &lt;em&gt;All containers&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F3 / l
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Live Logs:&lt;/strong&gt; Real-time container log streaming&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F4 / e
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Exec Shell:&lt;/strong&gt; Drop into an interactive container shell (&lt;code&gt;bash&lt;/code&gt;/&lt;code&gt;sh&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F5 / r
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Restart:&lt;/strong&gt; Restart the selected container&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F6 / s
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Stop / Start:&lt;/strong&gt; Gracefully toggle container power state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F7 / p
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Pause / Unpause:&lt;/strong&gt; Freeze or unfreeze container processes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F8 / x
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Delete:&lt;/strong&gt; Delete container (with confirmation dialog or &lt;code&gt;f&lt;/code&gt; to force)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F9 / i
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Inspect:&lt;/strong&gt; View formatted container JSON configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
F10 / q
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Quit:&lt;/strong&gt; Cleanly exit and restore terminal state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;a&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;AutoDoctor:&lt;/strong&gt; Open server health score &amp;amp; root-cause report&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;c&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Compose / Prune:&lt;/strong&gt; Open Compose topology or assisted 1-click disk cleanup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;t&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Topology Toggle:&lt;/strong&gt; Switch between visual DAG tree and directory explorer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  💡 What's Coming Next?
&lt;/h2&gt;

&lt;p&gt;The roadmap for Dockeretior includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ephemeral Test-Restore Backups:&lt;/strong&gt; Automated database dumps (PostgreSQL, MySQL) tested in ephemeral scratch containers to verify that your backup can &lt;em&gt;actually&lt;/em&gt; be restored before disaster strikes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explain My Server:&lt;/strong&gt; Natural language host inspection based on real diagnostic data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Fleet Manager:&lt;/strong&gt; Managing multiple remote Docker hosts from a single central terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the code, star the project, and give it a spin:&lt;/p&gt;

&lt;p&gt;⭐ &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/mario-ezquerro/dockeretior" rel="noopener noreferrer"&gt;https://github.com/mario-ezquerro/dockeretior&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's the most frustrating Docker issue you run into when administering remote servers? Let me know in the comments below!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>go</category>
      <category>builtwithantigravity</category>
    </item>
    <item>
      <title>Building File4Base: The Modern, Open-Source Alternative to old file bases (Powered by Antigravity)</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Thu, 24 Sep 2026 22:07:55 +0000</pubDate>
      <link>https://dev.to/gde/building-file4base-the-modern-open-source-alternative-to-file4base-powered-by-antigravity-47g7</link>
      <guid>https://dev.to/gde/building-file4base-the-modern-open-source-alternative-to-file4base-powered-by-antigravity-47g7</guid>
      <description>&lt;p&gt;For decades, platforms like Claris FileMaker, Microsoft Access, and 4D enabled businesses to build tailored database applications rapidly without needing dedicated enterprise engineering teams.&lt;/p&gt;

&lt;p&gt;However, the legacy RAD (Rapid Application Development) ecosystem comes with well-known bottlenecks: proprietary runtimes, opaque file formats, steep licensing costs, and vendor lock-in.&lt;/p&gt;

&lt;p&gt;Today, I’m excited to share &lt;strong&gt;&lt;a href="https://github.com/file4base/file4base-app" rel="noopener noreferrer"&gt;File4Base&lt;/a&gt;&lt;/strong&gt;: an open-source, modern alternative designed to bring back the speed and visual intuition of FileMaker, powered by clean architecture, open databases, and native cross-platform performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 The Vision: What is File4Base?
&lt;/h2&gt;

&lt;p&gt;File4Base aims to bridge the gap between relational databases and business users by providing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A Visual Canvas Layout Engine&lt;/strong&gt;: Design forms, lists, reports, and search queries dynamically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;First-Class Relational Schemas&lt;/strong&gt;: Real PostgreSQL tables and columns under the hood—no black-box database engines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Scripting Workspace&lt;/strong&gt;: Step-based automation (similar to FileMaker’s Script Workspace), serialized in structured JSON and executed deterministically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-Hostable &amp;amp; Zero Lock-in&lt;/strong&gt;: Fully dockerized backend with standard SQL data access.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🏗️ The Modern Stack
&lt;/h2&gt;

&lt;p&gt;Instead of building a monolith, File4Base separates the presentation layer from the database engine using modern industry standards:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client (Desktop &amp;amp; Tablet)&lt;/strong&gt;: &lt;strong&gt;Flutter&lt;/strong&gt; (macOS, Windows, Linux). Native rendering, fast UI redraws, and cross-platform consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend Core&lt;/strong&gt;: &lt;strong&gt;Go (Golang)&lt;/strong&gt;. A lightweight, memory-efficient service managing metadata catalogs, generic dynamic CRUD operations, and permission enforcement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database&lt;/strong&gt;: &lt;strong&gt;PostgreSQL 16&lt;/strong&gt;. Rock-solid reliability with JSONB metadata support, native migrations, and real-time triggers via &lt;code&gt;LISTEN/NOTIFY&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Single command via &lt;code&gt;docker compose up -d&lt;/code&gt; for the server infrastructure.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────────────────────────┐
│        Flutter Desktop Client (Native)       │
│  [Layout Designer]  [Browse]  [Scripts]      │
└──────────────────────┬───────────────────────┘
                       │ REST / WebSockets
┌──────────────────────▼───────────────────────┐
│              Go Backend Engine               │
│   (Schema Manager, CEL Evaluator, Auth)      │
└──────────────────────┬───────────────────────┘
                       │ pgx / SQL
┌──────────────────────▼───────────────────────┐
│                PostgreSQL 16                 │
│      (Dynamic Schemas + System Catalogs)     │
└──────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🤖 Built with Google Antigravity: Spec-Driven Development
&lt;/h2&gt;

&lt;p&gt;A unique aspect of how File4Base is coming to life is the engineering workflow. We are orchestrating development through &lt;strong&gt;Google Antigravity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of writing repetitive boilerplate manually:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We write rigorous architectural blueprints, JSON schemas, and roadmap documents (&lt;code&gt;.antigravity/rules.md&lt;/code&gt;, &lt;code&gt;docs/specs/*&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Antigravity takes these specifications and iteratively develops tested modules in Go and Flutter.&lt;/li&gt;
&lt;li&gt;The codebase stays decoupled, clean, and strictly aligned with documented architectural standards.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚀 What's in Progress?
&lt;/h2&gt;

&lt;p&gt;We've already mapped out the foundational layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[x] Monorepo architecture &amp;amp; Dockerized development environment.&lt;/li&gt;
&lt;li&gt;[x] Complete FileMaker Menu &amp;amp; Feature functional reference guide.&lt;/li&gt;
&lt;li&gt;[x] Script Workspace UI specification and mockups (3-panel workflow).&lt;/li&gt;
&lt;li&gt;[ ] Backend metadata catalog (&lt;code&gt;sys_tables&lt;/code&gt;, &lt;code&gt;sys_columns&lt;/code&gt;, &lt;code&gt;sys_layouts&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;[ ] Dynamic JSON layout renderer in Flutter.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🤝 Join the Project!
&lt;/h2&gt;

&lt;p&gt;File4Base is 100% open-source, and we are building it in public from day one.&lt;/p&gt;

&lt;p&gt;If you have experience with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flutter / Dart&lt;/strong&gt; (Desktop layouts, state management, drag-and-drop engines)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go / Golang&lt;/strong&gt; (Dynamic SQL builders, AST parsers, real-time WebSockets)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FileMaker / Low-Code architecture&lt;/strong&gt; (Feature parity, ergonomic UX workflows)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We would love your feedback, stars, and contributions!&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/file4base/file4base-app" rel="noopener noreferrer"&gt;https://github.com/file4base/file4base-app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let us know in the comments: what is the single most critical feature you miss from classic desktop database builders?&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>flutter</category>
      <category>go</category>
      <category>postgres</category>
    </item>
    <item>
      <title>The Only Container Orchestrator with Built-In Compliance: How Gubernator Enforces ENS, NIS 2, DORA, CIS Benchmark, and ISO 27001</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Thu, 17 Sep 2026 09:57:31 +0000</pubDate>
      <link>https://dev.to/gde/the-only-container-orchestrator-with-built-in-compliance-how-gubernator-enforces-ens-nis-2-cis-mbf</link>
      <guid>https://dev.to/gde/the-only-container-orchestrator-with-built-in-compliance-how-gubernator-enforces-ens-nis-2-cis-mbf</guid>
      <description>&lt;h1&gt;
  
  
  🛡️ The Only Container Orchestrator with Built-In Compliance: How Gubernator Enforces ENS, NIS 2, DORA, CIS Benchmark, and ISO 27001
&lt;/h1&gt;

&lt;p&gt;Over the past decade, container orchestration has been polarized into two stark extremes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Kubernetes (K8s) Overengineering:&lt;/strong&gt; An extraordinarily capable blank canvas, yet born &lt;strong&gt;naked of security and regulatory compliance&lt;/strong&gt;. To bring a Kubernetes cluster into compliance with standards like Spain's &lt;em&gt;Esquema Nacional de Seguridad&lt;/em&gt; (ENS) or the European &lt;em&gt;NIS 2 Directive&lt;/em&gt;, SecOps teams must assemble, configure, and maintain an intricate tapestry of 15+ third-party tools and operators: &lt;em&gt;Trivy, Falco, Kyverno or OPA Gatekeeper, Cosign, cert-manager, Keycloak, Fluentbit, Prometheus, Grafana, OpenTelemetry...&lt;/em&gt; The consequence is astronomical technical debt, operational fragility, and a voracious appetite for RAM and CPU just to run the control plane.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Bare Minimalism of Docker Swarm and HashiCorp Nomad:&lt;/strong&gt; Lightweight and elegant solutions for running containers, yet &lt;strong&gt;entirely devoid of forensic audit trails, admission control, cryptographic image signing, and regulatory compliance engines&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What happens when a public administration, healthcare provider, critical infrastructure operator, or financial institution needs to deploy containerized workloads meeting the strictest cybersecurity regulations without drowning in operational complexity and exorbitant infrastructure costs?&lt;/p&gt;

&lt;p&gt;The answer is &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/gubernator" rel="noopener noreferrer"&gt;Gubernator (&lt;code&gt;gbnt&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt;: the &lt;strong&gt;first and only container orchestrator designed from the ground up with native enterprise cybersecurity and regulatory compliance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this deep dive, we explore Gubernator’s built-in security architecture, the international compliance frameworks it continuously audits in real time, its degradation-detecting watchdog, and why it represents a paradigm shift in technological sovereignty.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8qey53nzjxg7hvwy26b3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8qey53nzjxg7hvwy26b3.jpg" alt="Gubernator Security &amp;amp; Compliance Suite" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ The Core Philosophy: "Secure &amp;amp; Compliant by Design"
&lt;/h2&gt;

&lt;p&gt;Unlike orchestrators where security is an afterthought retrofitted via third-party plugins, in &lt;strong&gt;Gubernator&lt;/strong&gt;, every Centurion (worker node) and Legion (Docker Compose stack) is governed by an unyielding security framework from the moment it boots:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │                           GUBERNATOR ENTERPRISE SECURITY &amp;amp; COMPLIANCE ENGINE                           │
 ├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │  🇪🇸 ENS RD 311/2022  │  🇪🇺 NIS 2 Directive  │  🏛️ DORA Reg. 2022   │  🔒 CIS Benchmark  │  🌐 ISO 27001:2022 │
 ├──────────────────────┼──────────────────────┼──────────────────────┼────────────────────┼────────────────────┤
 │  • op.acc.2 / op.mon │  • Art. 21 Risks     │  • 5 DORA Pillars    │  • Daemon &amp;amp; Host   │  • A.5 Controls    │
 │  • Basic/Medium/High │  • SIEM Syslog Live  │  • ICT Resilience    │  • Kernel Seccomp  │  • A.8 Controls    │
 │  • CCN Evidence      │  • Cyber Hygiene     │  • Third-Party Risk  │  • AppArmor/Caps   │  • Formal SoA Rep. │
 ├──────────────────────┴──────────────────────┴──────────────────────┴────────────────────┴────────────────────┤
 │                    🔄 CONTINUOUS COMPLIANCE WATCHDOG DAEMON (15m Interval)                             │
 │            - Instant reactive re-evaluation upon any security configuration mutation                   │
 │            - Automatic degradation detection (&amp;gt;1.0% drop) -&amp;gt; COMPLIANCE_DEGRADED event                 │
 │            - Native Prometheus gauges: gbnt_compliance_score{framework="..."}                          │
 ├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │                          🔐 IDENTITY, ACCESS &amp;amp; FORENSIC AUDITING                                       │
 │  • Active Directory / OpenLDAP (LDAPS:636)    • SSO / OIDC (Google, Okta, Keycloak)                   │
 │  • Granular RBAC (Admin, Operator, Auditor)   • MFA/TOTP with Offline Time Beacon                      │
 │  • Cryptographic SHA-256 Tamper-Evident Hash Chain Audit Ledger                                        │
 ├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │                    📦 SOFTWARE SUPPLY CHAIN SECURITY &amp;amp; ADMISSION                                       │
 │  • CVE Vulnerability Scanner with CVSS v3     • CycloneDX &amp;amp; SPDX JSON SBOMs                            │
 │  • In-Cluster Cosign ECDSA P-256 Signing      • Gatekeeper Admission Controller                        │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything runs natively from a &lt;strong&gt;single self-contained Go binary&lt;/strong&gt; with zero heavy external dependencies, managed through a modern, responsive &lt;strong&gt;Flutter Web Dashboard&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📋 1. Esquema Nacional de Seguridad (ENS - Royal Decree 311/2022)
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Esquema Nacional de Seguridad (ENS)&lt;/strong&gt; regulates the security conditions that Spanish Public Administrations and their technology partners must fulfill to safeguard information systems and services.&lt;/p&gt;

&lt;p&gt;Gubernator natively assesses the operational controls specified by Spain's &lt;strong&gt;CCN-STIC&lt;/strong&gt; standards:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;op.acc.2&lt;/code&gt; (Access Control &amp;amp; Credential Hardening):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Configurable minimum password length validation (default 12+ characters).&lt;/li&gt;
&lt;li&gt;Enforced complexity (uppercase, lowercase, digits, and special characters).&lt;/li&gt;
&lt;li&gt;Automatic account lockout after repeated failed login attempts.&lt;/li&gt;
&lt;li&gt;Idle session expiration and timeout enforcement.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;op.acc.6&lt;/code&gt; (Strengthened Authentication):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Mandatory Multi-Factor Authentication (MFA/TOTP RFC 6238) for administrative and operational roles.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;op.mon.1&lt;/code&gt; (System Monitoring &amp;amp; Logging):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Cryptographically signed audit trails and live security event streaming to enterprise SIEM platforms.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;op.exp.8&lt;/code&gt; (Integrity Protection &amp;amp; Cryptographic Chains):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Mathematical integrity verification across the action history via cryptographic hash chains.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gubernator automatically evaluates compliance across the three official ENS tiers (&lt;strong&gt;Basic, Medium, and High&lt;/strong&gt;) and produces a ready-to-present CCN evidence dossier in a single click.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇪🇺 2. European NIS 2 Directive (EU Directive 2022/2555)
&lt;/h2&gt;

&lt;p&gt;The European Union's &lt;strong&gt;NIS 2 Directive&lt;/strong&gt; establishes a harmonized cybersecurity baseline across essential and important entities, introducing strict penalties for non-compliance with risk management and incident reporting obligations.&lt;/p&gt;

&lt;p&gt;Gubernator directly addresses the requirements of &lt;strong&gt;Article 21 (Cybersecurity risk-management measures)&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Risk Analysis &amp;amp; Information System Security Policies:&lt;/strong&gt; Continuous monitoring of image admission modes and cluster security settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incident Handling &amp;amp; Real-Time SIEM Streaming:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Native RFC 5424 and RFC 3164 Syslog forwarder dispatching security events directly to Splunk, Elastic, Microsoft Sentinel, Wazuh, or QRadar.&lt;/li&gt;
&lt;li&gt;Automatic dispatch on policy violations, brute-force lockouts, and compliance degradation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business Continuity &amp;amp; Consistent Backups:&lt;/strong&gt; Integrated with Gubernator's &lt;em&gt;The Granaries&lt;/em&gt; subsystem, allowing operators to freeze containers (&lt;code&gt;docker pause&lt;/code&gt;), create encrypted &lt;code&gt;.tar.gz&lt;/code&gt; snapshots verified with SHA-256 digests, and manage automated retention schedules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supply Chain Security:&lt;/strong&gt; Image validation prior to task scheduling to thwart dependency injection attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptography &amp;amp; Encryption:&lt;/strong&gt; Enforced mTLS and X.509 certificate lifecycle management on the Ingress proxy with automated certificate renewal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The dashboard presents dedicated compliance gauges for both &lt;strong&gt;Essential Entities (EE)&lt;/strong&gt; and &lt;strong&gt;Important Entities (IE)&lt;/strong&gt; with live breakdowns of all 10 Article 21 requirements.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔒 3. CIS Docker Benchmark v1.6.0
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Center for Internet Security (CIS)&lt;/strong&gt; maintains the industry benchmark for hardening Docker hosts and container runtimes.&lt;/p&gt;

&lt;p&gt;Gubernator embeds an &lt;strong&gt;automated CIS evaluation engine&lt;/strong&gt; spanning all 6 core benchmark domains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Section 1 (Host Configuration):&lt;/strong&gt; Dedicated partition verification for &lt;code&gt;/var/lib/docker&lt;/code&gt;, &lt;code&gt;auditd&lt;/code&gt; system call tracking, and daemon isolation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Section 2 (Docker Daemon Configuration):&lt;/strong&gt; Inter-container communication restrictions on the default bridge (&lt;code&gt;icc=false&lt;/code&gt;), user namespace remapping (&lt;code&gt;userns-remap&lt;/code&gt;), log rotation policies (&lt;code&gt;max-size&lt;/code&gt;, &lt;code&gt;max-file&lt;/code&gt;), and deprecation of legacy registry support.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Section 3 (File Permissions and Ownership):&lt;/strong&gt; Strict permissions verification (&lt;code&gt;0644&lt;/code&gt;, &lt;code&gt;0600&lt;/code&gt;) and &lt;code&gt;root:root&lt;/code&gt; ownership on &lt;code&gt;/etc/docker/daemon.json&lt;/code&gt;, sockets, and TLS keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Section 4 (Images and Build Files):&lt;/strong&gt; Verification of non-root &lt;code&gt;USER&lt;/code&gt; execution, detection of embedded credentials, and prevention of compiler binaries inside runtime containers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Section 5 (Runtime Security):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Enforcement of default &lt;strong&gt;AppArmor&lt;/strong&gt; profiles and &lt;strong&gt;Seccomp&lt;/strong&gt; filters.&lt;/li&gt;
&lt;li&gt;Linux capability minimization (&lt;code&gt;--cap-drop=ALL&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Read-only root filesystems (&lt;code&gt;read_only: true&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Prevention of privilege escalation (&lt;code&gt;no-new-privileges: true&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Section 6 (Security Operations):&lt;/strong&gt; Housekeeping for orphaned volumes, zombie containers, and deprecated runtime parameters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each CIS check outputs its status (&lt;code&gt;PASS&lt;/code&gt;, &lt;code&gt;WARN&lt;/code&gt;, &lt;code&gt;FAIL&lt;/code&gt;, &lt;code&gt;INFO&lt;/code&gt;), alongside raw technical evidence and step-by-step remediation advice.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌐 4. ISO/IEC 27001:2022 (Annex A)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ISO/IEC 27001&lt;/strong&gt; is the global benchmark for Information Security Management Systems (ISMS).&lt;/p&gt;

&lt;p&gt;Gubernator evaluates the updated &lt;strong&gt;Annex A controls (2022 revision)&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Theme A.5 (Organizational Controls):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A.5.15 / A.5.18:&lt;/strong&gt; Role-based access control and segregation of privileged rights.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A.5.24 - A.5.28:&lt;/strong&gt; Incident management workflow and forensic evidence collection.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Theme A.8 (Technological Controls):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A.8.2:&lt;/strong&gt; Privileged access rights monitored and managed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A.8.8:&lt;/strong&gt; Technical vulnerability remediation across production stacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A.8.9:&lt;/strong&gt; Configuration management and cluster hardening.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A.8.15:&lt;/strong&gt; Tamper-resistant logging and event recording.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A.8.28:&lt;/strong&gt; Secure coding and declarative configuration validation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the web console, teams can export a formal &lt;strong&gt;Statement of Applicability (SoA)&lt;/strong&gt; with real-time audit statuses ready for external certification audits.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ 5. EU DORA (Regulation (EU) 2022/2554 on Digital Operational Resilience)
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Digital Operational Resilience Act (DORA)&lt;/strong&gt; is the landmark European Union regulation mandating financial entities—including banks, investment firms, insurance companies—and their &lt;strong&gt;critical cloud ICT third-party service providers&lt;/strong&gt; to establish a comprehensive digital operational resilience posture against severe cyber incidents and disruptions.&lt;/p&gt;

&lt;p&gt;Gubernator natively assesses the &lt;strong&gt;5 statutory pillars&lt;/strong&gt; of DORA:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pillar 1: ICT Risk Management Framework (Articles 5 to 16):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Identification of critical and essential functions with dependency mapping across containerized microservices.&lt;/li&gt;
&lt;li&gt;Microservice network segmentation, perimeter firewalling, and traffic isolation.&lt;/li&gt;
&lt;li&gt;Encryption of credentials, secrets, and volume backups using robust cryptographic algorithms.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pillar 2: ICT-Related Incident Management, Classification &amp;amp; Reporting (Articles 17 to 23):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Real-time detection of operational incidents with automated forwarding to enterprise SIEMs via Syslog RFC 5424.&lt;/li&gt;
&lt;li&gt;Tamper-evident SHA-256 cryptographic audit ledger maintaining forensic chain-of-custody for regulatory scrutiny.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pillar 3: Digital Operational Resilience Testing &amp;amp; Failover (Articles 24 to 27):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Backup restoration verification and consistency probing on persistent container data volumes.&lt;/li&gt;
&lt;li&gt;Continuous container health checking and automated rolling restarts to mitigate transient faults.&lt;/li&gt;
&lt;li&gt;Periodic multi-node failover testing across Centurion hosts to guarantee minimal RTO and RPO.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pillar 4: Managing ICT Third-Party Risk &amp;amp; Cloud Exit Strategy (Articles 28 to 44):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Deep software supply chain verification with automated CVE vulnerability scanning and CycloneDX/SPDX SBOM generation.&lt;/li&gt;
&lt;li&gt;Pre-deployment signature verification requiring Cosign ECDSA signatures before container execution.&lt;/li&gt;
&lt;li&gt;Cloud exit strategy and vendor lock-in prevention via shared root storage mobility (&lt;code&gt;/var/contenedores&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pillar 5: Information-Sharing Arrangements &amp;amp; Supervisory Oversight (Articles 45 to 56):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Instant export of technical resilience audit reports in Markdown and structured JSON ready for competent financial authorities and CSIRTs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Via the CLI (&lt;code&gt;gbnt dora&lt;/code&gt; and &lt;code&gt;gbnt dora --report&lt;/code&gt;) or the web dashboard, compliance officers and SRE teams can inspect measure details and trigger remediation fixes in a single click.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 6. Continuous Compliance Watchdog: Zero Blind Spots
&lt;/h2&gt;

&lt;p&gt;Traditional compliance auditing relies on periodic, point-in-time reviews: an external auditor visits today, and until the next quarter, nobody knows whether security configurations have quietly drifted out of compliance.&lt;/p&gt;

&lt;p&gt;In Gubernator, compliance is an &lt;strong&gt;active, continuous process&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; [ Security Configuration Mutation ] ──▶ Reactive Out-of-Band Trigger
 (e.g., MFA disabled,                    │
  password policy relaxed,               ▼
  SIEM endpoint altered)      ┌─────────────────────────┐
                              │   Compliance Watchdog   │◀── Background Cron (15m)
                              └────────────┬────────────┘
                                           │
                             Did score drop &amp;gt; 1.0%?
                              ├── YES ──▶ 🚨 Audit Log: COMPLIANCE_DEGRADED (WARNING)
                              └── NO  ──▶ ℹ️ Audit Log: COMPLIANCE_RESTORED (SUCCESS)
                                           │
                                           ▼
                              📊 Prometheus: gbnt_compliance_score
                              🖥️ Web UI: Executive Matrix Synchronized
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What happens if an admin relaxes security settings?
&lt;/h3&gt;

&lt;p&gt;If an operator disables MFA for a user or lowers the cluster password complexity threshold:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Instant Reactive Re-evaluation:&lt;/strong&gt; Rather than waiting for the 15-minute background interval, the API immediately fires &lt;code&gt;go security.TriggerComplianceAudit(...)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographic Drift &amp;amp; Degradation Alert:&lt;/strong&gt; The engine compares the previous score with the new evaluation. If it detects a drop greater than 1.0%, it registers a forensic warning:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"event"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"COMPLIANCE_DEGRADED"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"severity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"WARNING"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Compliance score degraded in Spanish ENS (RD 311/2022): dropped from 96.9% to 88.5% (trigger: MFA_DISABLED)"&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prometheus Metrics (&lt;code&gt;:4002/metrics&lt;/code&gt;):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   # HELP gbnt_compliance_score Current compliance score (0.0 to 100.0) evaluated by the continuous compliance audit engine.
   # TYPE gbnt_compliance_score gauge
   gbnt_compliance_score{framework="cis_docker"} 75.0
   gbnt_compliance_score{framework="dora"} 93.8
   gbnt_compliance_score{framework="ens"} 88.5
   gbnt_compliance_score{framework="iso27001"} 97.9
   gbnt_compliance_score{framework="nis2"} 91.7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Live Dashboard Executive Matrix:&lt;/strong&gt; The top header badge confirms &lt;code&gt;● WATCHDOG ACTIVE&lt;/code&gt; alongside the &lt;strong&gt;&lt;code&gt;[ 🛡️ Re-evaluate All Compliance ]&lt;/code&gt;&lt;/strong&gt; master button to trigger an on-demand audit cycle in one click.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔐 7. Tamper-Evident Forensic Audit Trail (SHA-256 Hash Chain)
&lt;/h2&gt;

&lt;p&gt;Advanced attackers who breach a system frequently attempt to wipe or modify audit logs to cover their tracks.&lt;/p&gt;

&lt;p&gt;To prevent log tampering, Gubernator implements an &lt;strong&gt;immutable forensic ledger&lt;/strong&gt;:&lt;br&gt;
Every log entry stored in SQLite contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;PreviousHash&lt;/code&gt;: The SHA-256 hash of the immediately preceding event.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EventHash&lt;/code&gt;: The cryptographic checksum computed over the event payload:
$$\text{Hash}&lt;em&gt;n = \text{SHA-256}(\text{Hash}&lt;/em&gt;{n-1} \parallel \text{Timestamp} \parallel \text{Actor} \parallel \text{IP} \parallel \text{Category} \parallel \text{Action} \parallel \text{Status} \parallel \text{Details})$$&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clicking &lt;strong&gt;"Verify Forensic Chain"&lt;/strong&gt; traverses the entire audit history, recalculating every cryptographic link. If an unauthorized actor modifies a row directly in the database, the hash chain breaks instantly, flagging the exact corrupted record.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 8. Supply Chain Security: SBOMs, CVE Scanning, and Cosign
&lt;/h2&gt;

&lt;p&gt;Software cannot be considered secure if you don't know what is running inside your containers.&lt;/p&gt;

&lt;p&gt;Gubernator delivers deep software supply chain inspection out of the box:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Software Bill of Materials (SBOM):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Instant export in standard &lt;strong&gt;CycloneDX JSON&lt;/strong&gt; and &lt;strong&gt;SPDX JSON&lt;/strong&gt; formats.&lt;/li&gt;
&lt;li&gt;Comprehensive inventory of OS packages, runtime language dependencies (Go, Python, Node.js, Rust, Java), and license compliance (GPL, Apache, MIT).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CVE Vulnerability Scanning:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Image analysis against official vulnerability feeds with &lt;strong&gt;CVSS v3&lt;/strong&gt; severity scoring and automated patch recommendations.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographic Signing via Cosign (Sigstore):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;In-cluster generation of &lt;strong&gt;ECDSA P-256&lt;/strong&gt; keypairs without external tooling.&lt;/li&gt;
&lt;li&gt;Cryptographic signing and digest verification directly integrated into deployment pipelines.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Gatekeeper (Admission Controller):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Declarative pre-deployment admission policies that &lt;strong&gt;block unsigned images&lt;/strong&gt; or containers containing unpatched critical vulnerabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔑 9. Enterprise Identity, RBAC, and Resilient MFA (Time Beacon)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Directory Integration (LDAP/LDAPS):&lt;/strong&gt; Direct connection to Microsoft Active Directory and OpenLDAP over LDAPS (port 636) and StartTLS, mapping external directory groups to Gubernator cluster roles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single Sign-On (SSO / OIDC):&lt;/strong&gt; Built-in authentication support for Google Workspace, Keycloak, Okta, Authentik, and Azure AD.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Role-Based Access Control (RBAC):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;👑 &lt;strong&gt;&lt;code&gt;admin&lt;/code&gt;:&lt;/strong&gt; Full administrative control over cluster nodes, signing keys, TLS certs, and security policies.&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;&lt;code&gt;operator&lt;/code&gt;:&lt;/strong&gt; Stack authoring, service scaling, container restarts, and terminal shell access.&lt;/li&gt;
&lt;li&gt;🔍 &lt;strong&gt;&lt;code&gt;auditor&lt;/code&gt;:&lt;/strong&gt; Forensic audit inspection for ENS, NIS 2, DORA, CIS, and ISO 27001 evidence without mutation privileges.&lt;/li&gt;
&lt;li&gt;👁️ &lt;strong&gt;&lt;code&gt;readonly&lt;/code&gt;:&lt;/strong&gt; Visual monitoring of dashboards and telemetry.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Laptop Clock-Drift Compensation (Time Beacon):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;A notorious issue with virtualized environments (Multipass, VMware, VirtualBox) is that closing a laptop lid suspends the host and causes VM clock desynchronization, immediately breaking TOTP MFA codes (RFC 6238).&lt;/li&gt;
&lt;li&gt;Gubernator features a &lt;strong&gt;Time Beacon&lt;/strong&gt; mechanism: the browser transmits a client-side timestamp reference during login. If clock drift is detected, Gubernator validates the token and &lt;strong&gt;hot-syncs the VM host kernel clock&lt;/strong&gt; on the fly—100% offline without needing internet access.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚔️ Comparison Matrix: Why Gubernator Stands Alone
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Security &amp;amp; Compliance Feature&lt;/th&gt;
&lt;th&gt;Kubernetes (K8s)&lt;/th&gt;
&lt;th&gt;Docker Swarm&lt;/th&gt;
&lt;th&gt;HashiCorp Nomad&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Gubernator (&lt;code&gt;gbnt&lt;/code&gt;)&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment Simplicity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Extreme Complexity&lt;/td&gt;
&lt;td&gt;✅ Very Simple&lt;/td&gt;
&lt;td&gt;⚠️ Moderate&lt;/td&gt;
&lt;td&gt;✅ &lt;strong&gt;Dead Simple (1 Binary)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Native Compose Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No (Requires Kompose/CRDs)&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;❌ No (Custom HCL)&lt;/td&gt;
&lt;td&gt;✅ &lt;strong&gt;Yes (Native)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Spanish ENS (RD 311/2022)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No (Requires bespoke audits)&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (Basic/Medium/High)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;EU NIS 2 Directive (Art. 21)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No native engine&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (EE &amp;amp; IE)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;EU DORA Regulation (5 Pillars)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (Digital Resilience)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Automated CIS Docker Benchmark&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚠️ Via plugins (Kube-bench)&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (6 CIS Domains)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ISO/IEC 27001 (Automated SoA)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (Annex A)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Continuous Compliance Watchdog&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (Cron + Triggers)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compliance Degradation Alerts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native (&amp;gt;1% Drop Alert)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SIEM Syslog Forwarder (RFC 5424)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚠️ Via heavy logging agents&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native in Core&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tamper-Evident SHA-256 Ledger&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native Hash Chain&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;In-Cluster Cosign ECDSA Signing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚠️ Via Kyverno/Cosign&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native Key Management&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CycloneDX / SPDX SBOM Generator&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚠️ Via external scanners&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;Native One-Click Export&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Idle Memory Consumption per Node&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~1.5 GB - 3 GB&lt;/td&gt;
&lt;td&gt;~100 MB&lt;/td&gt;
&lt;td&gt;~150 MB&lt;/td&gt;
&lt;td&gt;🟢 &lt;strong&gt;&amp;lt; 60 MB&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🚀 Conclusion: Sovereign, Simple, and Certified
&lt;/h2&gt;

&lt;p&gt;Gubernator proves that organizations do not have to accept either the runaway complexity of Kubernetes or the security void of minimalist orchestrators.&lt;/p&gt;

&lt;p&gt;By embedding the world's most rigorous compliance frameworks (&lt;strong&gt;Spanish ENS RD 311/2022, European NIS 2, EU DORA Reg. 2022/2554, CIS Docker Benchmark, and ISO/IEC 27001&lt;/strong&gt;) directly alongside a &lt;strong&gt;continuous compliance watchdog&lt;/strong&gt;, &lt;strong&gt;cryptographic Cosign signing&lt;/strong&gt;, &lt;strong&gt;standardized SBOM generation&lt;/strong&gt;, and a &lt;strong&gt;tamper-evident SHA-256 audit ledger&lt;/strong&gt;, Gubernator stands as the &lt;strong&gt;only container orchestrator on the market&lt;/strong&gt; that delivers radical simplicity and certified cybersecurity right out of the box.&lt;/p&gt;

&lt;p&gt;If you operate in regulated industries, government agencies, financial institutions, healthcare, defense, or simply believe your infrastructure security shouldn't rely on 20 fragile plugins stitched together with duct tape, give Gubernator a run:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Project Repository:&lt;/strong&gt; &lt;a href="https://github.com/mario-ezquerro/gubernator" rel="noopener noreferrer"&gt;https://github.com/mario-ezquerro/gubernator&lt;/a&gt;&lt;br&gt;&lt;br&gt;
⭐ If you find this project valuable, star the repo and join our journey towards sovereign cloud-native computing!&lt;/p&gt;

</description>
      <category>security</category>
      <category>devops</category>
      <category>docker</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Autoscaling Docker Containers Without Kubernetes: How Gubernator Scales CPU &amp; GPU Workloads Automatically</title>
      <dc:creator>Mario Ezquerro</dc:creator>
      <pubDate>Fri, 11 Sep 2026 06:58:39 +0000</pubDate>
      <link>https://dev.to/gde/autoscaling-docker-containers-without-kubernetes-how-gubernator-scales-cpu-gpu-workloads-1p0b</link>
      <guid>https://dev.to/gde/autoscaling-docker-containers-without-kubernetes-how-gubernator-scales-cpu-gpu-workloads-1p0b</guid>
      <description>&lt;p&gt;When running containerized workloads, every engineering team eventually faces the &lt;strong&gt;scaling dilemma&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla Docker / Docker Compose&lt;/strong&gt; is lightweight, fast, and wonderfully simple to maintain—but it has &lt;strong&gt;zero native autoscaling&lt;/strong&gt;. If your API traffic triples during a flash sale or your AI inference queue spikes, you must manually run &lt;code&gt;docker compose up --scale api=5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kubernetes (K8s)&lt;/strong&gt; provides Horizontal Pod Autoscaler (HPA)—but it introduces an overwhelming operational tax: &lt;code&gt;metrics-server&lt;/code&gt;, complex CRDs, etcd clusters, steep learning curves, and hundreds of megabytes of baseline overhead per node.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What if you could keep the pure simplicity of standard &lt;strong&gt;&lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;/strong&gt; files, but gain &lt;strong&gt;true horizontal autoscaling&lt;/strong&gt; across multi-node clusters based on real-time &lt;strong&gt;CPU and NVIDIA GPU utilization&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;That is exactly why we built &lt;strong&gt;&lt;a href="https://github.com/mario-ezquerro/gubernator" rel="noopener noreferrer"&gt;Gubernator (&lt;code&gt;gbnt&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt;—the "Goldilocks" container orchestrator that combines the dead-simple developer experience of Docker Swarm with the flexibility of Nomad and the enterprise governance of high-end platforms.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ The Architecture: How Gubernator Autoscaling Works
&lt;/h2&gt;

&lt;p&gt;In Gubernator, nodes are called &lt;strong&gt;Centurions&lt;/strong&gt; (Managers and Workers), and multi-container applications are deployed as &lt;strong&gt;Legions&lt;/strong&gt; (Docker Compose stacks).&lt;/p&gt;

&lt;p&gt;Under the hood, Gubernator's declarative autoscaling engine operates as an autonomous feedback loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  ┌────────────────────────────────────────┐
                  │       Prometheus Metrics Collector     │
                  │   (cAdvisor CPU % + NVIDIA DCGM GPU %) │
                  └───────────────────┬────────────────────┘
                                      │ Telemetry Polling (10s)
                                      ▼
                  ┌────────────────────────────────────────┐
                  │    Gubernator Autoscaler Engine Core   │
                  │  - Parses 'gbnt.autoscaling.*' labels  │
                  │  - Evaluates Target vs Current Metric  │
                  │  - Applies Cooldown &amp;amp; Damping Windows  │
                  └───────────────────┬────────────────────┘
                                      │ Desired Replicas (±Δ)
                                      ▼
                  ┌────────────────────────────────────────┐
                  │         Centurion Scheduler            │
                  │   (Spread across nodes / GPU Affinity) │
                  └───────────────────┬────────────────────┘
                                      │ Docker Engine API
                                      ▼
            ┌─────────────────────────────────────────────────────┐
            │  Centurion Host 01          Centurion Host 02 (GPU) │
            │  [api-task-1] [api-task-2]  [api-task-3] [llm-task] │
            └─────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every 10 to 15 seconds, the Gubernator Watchdog invokes &lt;code&gt;autoscaler.EvaluateAndAutoscale()&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Telemetry Ingestion:&lt;/strong&gt; Queries Prometheus / cAdvisor for real-time container CPU percentages and NVIDIA DCGM exporter for GPU compute load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluation:&lt;/strong&gt; Averages utilization across all healthy running task replicas for that service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threshold Calculation:&lt;/strong&gt;
$$\text{Desired Replicas} = \left\lceil \text{Current Replicas} \times \left( \frac{\text{Current Metric Value}}{\text{Target Threshold}} \right) \right\rceil$$&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guardrails &amp;amp; Cooldown:&lt;/strong&gt; Clamps desired replicas within &lt;code&gt;[min, max]&lt;/code&gt; boundaries and verifies that the &lt;code&gt;cooldown&lt;/code&gt; window (e.g. 60 seconds) has elapsed since the last scale event, preventing erratic flapping or thrashing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent Node Placement:&lt;/strong&gt; Uses Gubernator's hardware scheduler (&lt;code&gt;Spread&lt;/code&gt; or &lt;code&gt;Binpack&lt;/code&gt;) to assign new container instances to the least-loaded Centurion host—with automatic hardware affinity targeting nodes with physical NVIDIA GPUs when GPU metrics are configured.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ⚡ Declarative Autoscaling via Compose Labels
&lt;/h2&gt;

&lt;p&gt;You don't need proprietary manifests or extra YAML definitions. You declare autoscaling policies directly inside your standard &lt;code&gt;docker-compose.yml&lt;/code&gt; service definition using the &lt;code&gt;gbnt.autoscaling.*&lt;/code&gt; label prefix:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. High-Traffic Web Service (CPU-Based Scaling)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3.8"&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;api&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mycompany/fastapi-gateway:latest&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8000:8000"&lt;/span&gt;
    &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
      &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Enable horizontal autoscaling&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.enable=true"&lt;/span&gt;
        &lt;span class="c1"&gt;# Scale based on CPU utilization&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.metric=cpu"&lt;/span&gt;
        &lt;span class="c1"&gt;# Target: scale up when average CPU exceeds 70%&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.target=70"&lt;/span&gt;
        &lt;span class="c1"&gt;# Boundary constraints&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.min=2"&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.max=10"&lt;/span&gt;
        &lt;span class="c1"&gt;# 60-second cooldown between scale events&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.cooldown=60"&lt;/span&gt;
        &lt;span class="c1"&gt;# Spread tasks across all cluster Centurions&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.scope=cluster"&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.strategy=spread"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. AI Inference / LLM Service (NVIDIA GPU-Based Scaling)
&lt;/h3&gt;

&lt;p&gt;For heavy AI and machine learning workloads (e.g., vLLM, Ollama, Hugging Face TGI), CPU load is often misleading because the compute bottleneck lives inside the GPU VRAM and Tensor Cores. &lt;/p&gt;

&lt;p&gt;Gubernator natively tracks &lt;strong&gt;NVIDIA DCGM GPU utilization&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3.8"&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;vllm-inference&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vllm/vllm-openai:latest&lt;/span&gt;
    &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.enable=true"&lt;/span&gt;
        &lt;span class="c1"&gt;# Target GPU Tensor Core load&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.metric=gpu"&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.target=80"&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.min=1"&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.max=4"&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.cooldown=120"&lt;/span&gt;
        &lt;span class="c1"&gt;# Target only Centurion nodes with GPU hardware&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gbnt.autoscaling.scope=cluster"&lt;/span&gt;
      &lt;span class="na"&gt;placement&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;constraints&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;node.labels.gbnt.node.gpu&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;==&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;nvidia"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When load drops below the target threshold, Gubernator smoothly de-provisions excess containers in reverse order, ensuring zero data loss and respecting container graceful shutdown timeouts (&lt;code&gt;SIGTERM&lt;/code&gt; followed by grace period).&lt;/p&gt;




&lt;h2&gt;
  
  
  🖥️ Full UI Control: Interactive Flutter Web Dashboard
&lt;/h2&gt;

&lt;p&gt;Not a fan of editing raw YAML on the fly? Gubernator includes a full-screen &lt;strong&gt;Material Design 3 Dashboard&lt;/strong&gt; written in Flutter Web:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interactive &lt;code&gt;AUTOSCALE&lt;/code&gt; Badges:&lt;/strong&gt; In both the &lt;strong&gt;Legions (Stacks)&lt;/strong&gt; overview and the &lt;strong&gt;Containers (Tasks)&lt;/strong&gt; table, every service displays a live clickable chip:

&lt;ul&gt;
&lt;li&gt;⚡ &lt;strong&gt;&lt;code&gt;GPU • Cluster&lt;/code&gt;&lt;/strong&gt; (Glowing amber/purple)&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;&lt;code&gt;CPU • Cluster&lt;/code&gt;&lt;/strong&gt; (Electric cyan)&lt;/li&gt;
&lt;li&gt;💤 &lt;strong&gt;&lt;code&gt;Off&lt;/code&gt;&lt;/strong&gt; (Muted grey)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autoscale Control Dialog:&lt;/strong&gt; Clicking any chip opens a visual control modal where operators can:

&lt;ul&gt;
&lt;li&gt;Toggle autoscaling ON/OFF in 1 click&lt;/li&gt;
&lt;li&gt;Switch metrics between CPU and GPU&lt;/li&gt;
&lt;li&gt;Adjust the target percentage slider&lt;/li&gt;
&lt;li&gt;Set minimum and maximum replica limits&lt;/li&gt;
&lt;li&gt;Configure cooldown intervals&lt;/li&gt;
&lt;li&gt;Choose cluster-wide vs single-host pinning&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit Trail &amp;amp; SIEM:&lt;/strong&gt; Every automatic scaling event is cryptographically sealed into Gubernator's immutable &lt;strong&gt;Forensic Audit Log (ENS op.mon.1)&lt;/strong&gt; and forwarded to your enterprise SIEM (Splunk, Wazuh, Elastic) in CEF, RFC 5424 Syslog, or JSON.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚀 Quickstart: Try It Yourself in 60 Seconds
&lt;/h2&gt;

&lt;p&gt;Installing Gubernator takes a single binary or automated installer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Download the latest binary for your architecture (Linux AMD64/ARM64, macOS)&lt;/span&gt;
curl &lt;span class="nt"&gt;-sSL&lt;/span&gt; https://github.com/mario-ezquerro/gubernator/releases/latest/download/gbnt-linux-amd64 &lt;span class="nt"&gt;-o&lt;/span&gt; gbnt
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x gbnt
&lt;span class="nb"&gt;sudo mv &lt;/span&gt;gbnt /usr/local/bin/

&lt;span class="c"&gt;# Initialize the manager node and monitoring stack&lt;/span&gt;
gbnt legion init
gbnt monitor init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your browser at &lt;code&gt;http://localhost:4001&lt;/code&gt; (Dashboard) and &lt;code&gt;http://localhost:4002/swagger/index.html&lt;/code&gt; (REST API). Deploy your first compose stack and watch Gubernator seamlessly scale your tasks as traffic surges!&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Container orchestration doesn't have to be a choice between the primitive limitations of a single Docker daemon and the crushing complexity of Kubernetes. &lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Gubernator&lt;/strong&gt;, you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Native Docker Compose compatibility&lt;/li&gt;
&lt;li&gt;Real-time CPU &amp;amp; NVIDIA GPU Horizontal Autoscaling&lt;/li&gt;
&lt;li&gt;Zero-CGO, single-binary Go engine&lt;/li&gt;
&lt;li&gt;Built-in Caddy Ingress, CoreDNS, GlusterFS storage, and OpenTelemetry SRE stack&lt;/li&gt;
&lt;li&gt;Enterprise Active Directory/LDAP, RBAC, and Spanish ENS forensic security&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Give the project a star on GitHub and let us know your thoughts in the comments below!&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/mario-ezquerro/gubernator" rel="noopener noreferrer"&gt;https://github.com/mario-ezquerro/gubernator&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>go</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
