Back to Blogs
#oracle#go#opentelemetry#ai

Building ora-tui with Google Antigravity & Gemini 4 Argon: An MS-DOS Retro TUI & OpenTelemetry Exporter for Oracle RAC, DB & SAN Multipath

How I pair-programmed with Google Antigravity powered by Gemini 4 Argon to build a zero-dependency Go TUI and OpenTelemetry/Prometheus observability stack for Oracle Databases and Linux SAN storage.

Updated 7 min read
Cover for Building ora-tui with Google Antigravity & Gemini 4 Argon: An MS-DOS Retro TUI & OpenTelemetry Exporter for Oracle RAC, DB & SAN Multipath

Managing enterprise Oracle RAC, Oracle Restart, and Single Instance databases over SSH often feels like juggling a dozen terminal tabs at 3:00 AM. You have sqlplus open in one window, crsctl status resource -t in another, lsnrctl status in a third, rman in a fourth, and multipath -ll or df -i in a fifth to figure out why a LUN path dropped or why ORA-09925: Unable to create audit trail file just locked out connections.

What if you had a single, zero-dependency binary that:

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

Meet ora-tui β€” and in this post, I’ll share how I built and evolved it from scratch to v1.6.0 using Google Antigravity powered by Gemini 4 Argon.


πŸ€– Built with Google Antigravity & Gemini 4 Argon

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

What made the Antigravity + Gemini 4 Argon workflow stand out during this project:

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

πŸ–₯️ Preview: Retro MS-DOS Aesthetics Meet Oracle DBA Power

Here is what ora-tui looks like right in your terminal (ora-tui --preview):

╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
β•‘                    ══ NORTON COMMANDER ORA-TUI v1.6.0 :: ORACLE CLUSTER, DB & 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 & DB Estado    β•‘ β”Œβ”€ NODOS DEL CLUSTER & INSTANCIAS (ORACLE RAC / SINGLE) ─────────────────────────────┐ β•‘
β•‘   2. Usuarios Conectados    β•‘ β”‚ NODO       ESTADO   CRS     CSSD    ASM            INST      MODO        FRA_USO   β”‚ β•‘
β•‘   3. Tablespaces & Files    β•‘ β”‚ ora-rac01  ONLINE   ONLINE  ONLINE  ONLINE(+ASM1)  PRODCDB1  READ WRITE  [β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘]β”‚ β•‘
β•‘   4. Tablas & Objetos       β•‘ β”‚ ora-rac02  ONLINE   ONLINE  ONLINE  ONLINE(+ASM2)  PRODCDB2  READ WRITE  [β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘]β”‚ β•‘
β•‘   5. ASM & Red Listeners    β•‘ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β•‘
β•‘   6. RMAN, Flashback & DG   β•‘ β”Œβ”€ USUARIOS CONECTADOS (gv$session) ───────────┬─ TABLESPACES & SAN MULTIPATH ───────┐ β•‘
β•‘   7. Alert Log & Errores    β•‘ β”‚ SID,SER#  USUARIO    ESTADO   EVENTO / LOCK  β”‚ RECURSO       ESTADO / USO %        β”‚ β•‘
β•‘   8. Servidor, Discos & 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) & HBA FC          β•‘      β•‘
β•‘                             β•‘      β•‘   [Esc] Cancelar / Cerrar Ventana                                        β•‘      β•‘
β•‘                             β•‘      β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•      β•‘
╠═════════════════════════════╩════════════════════════════════════════════════════════════════════════════════════════╣
β•‘ β”Œβ”€ C:\ORACLE> CONSOLA MS-DOS & AUDITORIA EN VIVO ──────────────────────────────────────────────────────────────────┐ β•‘
β•‘ β”‚ C:\> [08:05:01] Auto-Discovery: Modo=ORACLE RAC β”‚ Cluster=crs-prod-cluster β”‚ Release=19.24.0.0.0                 β”‚ β•‘
β•‘ β”‚ C:\> [08:05:02] ALERTA SAN: mpathc presenta 1 camino caΓ­do (3/4 DEGRADED) β”‚ Tablespace ERP_DATA_TBS al 93.0%     β”‚ β•‘
β•‘ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
Enter fullscreen mode Exit fullscreen mode

4 Live-Switchable Retro Color Themes (c key)

Pressing c at any time cycles through four themes on the fly:

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

βš™οΈ Zero-Config Architecture & CGO_ENABLED=0

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

ora-tui is compiled with CGO_ENABLED=0:

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

πŸ” The 9 Interactive Modules (Including Linux & SAN Multipath Auditing)

  1. Cluster & DB Status: Nodes (olsnodes), Daemons (CRS, CSSD, EVMD, ASM), Instances (gv$instance), PDBs (gv$pdbs), RAC Services, and a 4-step Graceful Node Drain wizard.
  2. Connected Users (gv$session): Active/inactive sessions, wait events, SQL_ID, PGA memory usage, TX/TM blocking lock chains, KILL SESSION IMMEDIATE, and live DBMS_XPLAN execution plans.
  3. Tablespaces & Datafiles: Real usage percentages accounting for AUTOEXTEND MAXBYTES, visual progress bars, and 1-click datafile addition.
  4. Table Segments & Invalid Objects: Top segments by size/rows, FRESH/STALE optimizer statistics, online table shrink (SHRINK SPACE CASCADE), index rebuilds, and UTL_RECOMP invalid object compilation.
  5. ASM & Network Listeners: ASM diskgroups (USABLE_FILE_MB, OFFLINE_DISKS) and local/SCAN listeners distinguishing READY (dynamic PMON/LREG) from UNKNOWN (listener.ora static) handlers.
  6. RMAN, Flashback & Data Guard: RMAN backup job history, Guaranteed Restore Points (GRP), and Data Guard Standby MRP0 + Transport/Apply Lag monitoring.
  7. Alert Log & Strict ORA- Errors: Real-time alert_<SID>.log parser and ADRCI trace purge workflows.
  8. Linux Server, Disks & SAN Multipath (Module 8):
    • CPU, Memory & Kernel: Load Average (1m/5m/15m) vs CPU cores, Physical RAM, Swap & vm.swappiness, Static HugePages (2MB), verification that Transparent HugePages = [never], Kernel Async I/O slots (fs.aio-nr / fs.aio-max-nr), and File Descriptors (fs.file-nr).
    • Filesystems & Inodes (df -PTm & df -Pi): Space and Inode usage % across /u01, /, /var, /tmp to prevent dreaded ORA-09925 lockouts caused by millions of .aud/.trc files.
    • SAN Multipath (multipath -ll) & Fibre Channel HBAs: Verifies that all physical SAN paths for every LUN are active (4/4 ACTIVE) and immediately flags degraded LUNs (3/4 DEGRADED - FAULTY), checks /sys/class/fc_host/host* HBA speed/state (16G/32G Online), and provides live SCSI/Multipath rescanning.
  9. Maintenance Center: Guided step-by-step DBA and sysadmin wizards.

πŸ“ˆ Embedded OpenTelemetry & Prometheus Exporter (--opentelemetry) + 1-Command Docker POC

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

# Run in headless daemon mode on port 9161 (conflict-free with Oracle ports):
sudo ora-tui --opentelemetry --daemon --otel-port=9161

# Or enable the bundled systemd service:
sudo systemctl enable --now ora-tui-otel
Enter fullscreen mode Exit fullscreen mode

It exposes 52 metrics across:

  • http://<oracle-host>:9161/metrics β€” Prometheus / OpenMetrics format
  • http://<oracle-host>:9161/otel/v1/metrics β€” OpenTelemetry OTLP/HTTP JSON (resourceMetrics)
  • http://<oracle-host>:9161/api/v1/state β€” Full JSON State Snapshot

Spinning up the Ready-to-Run POC/ Folder on Any Docker Host

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

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

git clone https://github.com/mario-ezquerro/oratui.git
cd oratui/POC
chmod +x configure-poc.sh
./configure-poc.sh
Enter fullscreen mode Exit fullscreen mode
==========================================================================
  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

>>> Generando configuraciΓ³n de Prometheus para monitorizar: 192.168.1.50:9161 ...
>>> Verificando conexiΓ³n con http://192.168.1.50:9161/healthz ...
    [OK] ConexiΓ³n exitosa con ora-tui en 192.168.1.50:9161.
>>> Levantando / recargando contenedores Docker (Prometheus + Grafana)...
Enter fullscreen mode Exit fullscreen mode

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


πŸš€ Try It Yourself (dnf, rpm, apt-get, or --mock Mode)

You can install the prebuilt .rpm or .deb directly from GitHub, or test it on macOS/Linux without an Oracle database using --mock:

# RHEL / Oracle Linux 8 & 9:
sudo dnf install -y https://github.com/mario-ezquerro/oratui/raw/main/dist/ora-tui-1.6.0-1.x86_64.rpm

# Debian / Ubuntu:
curl -fL -o /tmp/ora-tui.deb https://github.com/mario-ezquerro/oratui/raw/main/dist/ora-tui_1.6.0-1_amd64.deb
sudo apt-get install -y /tmp/ora-tui.deb

# Or run the interactive simulator anywhere from source:
git clone https://github.com/mario-ezquerro/oratui.git
cd oratui
make mock
Enter fullscreen mode Exit fullscreen mode

πŸ”— GitHub Repository: https://github.com/mario-ezquerro/oratui

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