CB-WhoIs is a minimalist, open-source command-line tool designed to instantly identify the topology, node roles, and cluster details of any Couchbase deployment using just an IP address or hostname. Managing enterprise database infrastructure often means dealing with complex network topologies, multi-cluster deployments, and dynamic cloud scaling. When an alert fires or a performance metric spikes, database administrators (DBAs) and site reliability engineers (SREs) need immediate context. Much like the classic networking whois command reveals ownership details for a domain, CB-WhoIs delivers an instant, comprehensive snapshot of a Couchbase node’s identity and its environment. The Problem: The Couchbase Metadata Blindspot
Navigating a multi-node Couchbase cluster usually requires logging into the web console or executing verbose REST API calls via curl. While effective, these methods present distinct operational hurdles:
Web UI Overhead: Navigating a browser UI during an active incident slows down root-cause analysis.
API Complexity: Remembering specific ports (like 8091 or 18091) and parsing massive, nested JSON payloads from endpoints like /pools/default takes time.
Security & Access: Engineers often need a quick health check without exposing full administrative credentials or opening heavy administrative UIs over restricted jump hosts.
When managing hundreds of nodes across dev, staging, and production environments, running a quick CLI command to verify which cluster a specific IP belongs to is a necessity. What is CB-WhoIs?
CB-WhoIs solves this friction by operating as a lightweight, zero-dependency utility. Built for speed and portability, it queries a target Couchbase node and prints a clean, human-readable summary of the node and cluster metadata directly to the terminal. Core Features
Zero Dependencies: Written to run standalone without requiring heavy SDKs or the full Couchbase server CLI suite installed locally.
Instant Topology Discovery: Displays the total node count, active services (Data, Query, Index, Search, Analytics, Eventing), and software versions.
Cluster Mapping: Instantly reveals the Cluster Name, UUID, and whether the targeted node is part of a multi-dimensional scaling (MDS) setup.
Security-First Architecture: Supports standard and TLS-encrypted ports, custom administrative credentials, and role-based access tokens.
Structured Output: Offers clean text formatting for humans and a –json flag for easy integration into custom Bash scripts or automated monitoring pipelines. How it Works
Under the hood, CB-WhoIs targets the Couchbase cluster management port. It safely executes a series of highly optimized, authenticated REST queries to fetch system state information.
Instead of dumping raw JSON data, the tool filters and correlates the data points that matter most during triage. $ cb-whois –host 10.0.1.45 –user admin –pass secret Use code with caution. Example Output Layout:
============================================================ COUCHBASE CLUSTER INFO ============================================================ Cluster Name : Production-US-East Cluster UUID : e3b0c44298fc1c149afbf4c8996fb92427ae41e464 Server Version: 7.2.0-Enterprise ============================================================ TARGET NODE DETAILS ============================================================ Hostname/IP : 10.0.1.45 Node Status : Healthy / Active Os Architecture: x86_64 Assigned MDS : Data, Index ============================================================ TOPOLOGY SNAPSHOT (3 Nodes Total) ============================================================ Node 1: 10.0.1.45 [Data, Index] - Healthy Node 2: 10.0.1.46 [Query, Search] - Healthy Node 3: 10.0.1.47 [Analytics, Eventing] - Healthy ============================================================ Use code with caution. Key Use Cases
Incident Response & Triage: When an infrastructure alert identifies a problematic IP address, running cb-whois tells you exactly what production services live on that node before you execute a restart or failover.
Post-Deployment Verification: Quickly confirm that newly provisioned nodes have adopted the correct Multi-Dimensional Scaling (MDS) service tags during cluster expansion.
Automated Auditing: Schedule a daily cron job using the –json flag to track cluster sizing, version drifting, or unauthorized configuration changes across global environments. Lightweight, Fast, and Critical
CB-WhoIs fills a crucial gap in the Couchbase ecosystem. It does not replace the robust Couchbase Web Console or enterprise monitoring frameworks. Instead, it provides engineers with a fast, tactical tool for day-to-day operations. By minimizing the time it takes to inspect a cluster, CB-WhoIs helps teams keep their distributed databases healthy, visible, and easy to manage.
If you would like to expand this article, let me know if you want to include:
Code snippets showing a basic implementation in Python or Go Step-by-step installation and setup instructions
A comparison table between CB-WhoIs and default Couchbase tools
Leave a Reply