microsoft / microsoft/vscode-documentdb

Cluster Status Dashboard 🚀

Open
#61 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback wanted
Dominant language
TypeScript
Stars
31
Forks
22
Avg merge
2d 20h
Merged PRs (30d)
21

Description

Cluster Status Dashboard: Feedback and Collaboration Welcome! 🚀

We propose a Cluster Status Dashboard for DocumentDB and MongoDB databases, a centralized stats view providing users with key metrics and insights about their entire cluster, databases, collections, and indexes. This interactive dashboard will help users monitor the health, performance, and activity of their cluster with detailed and actionable data. Here’s our concept, and we’d appreciate your input to refine it further.


Proposed Feature Overview

The Cluster Status Dashboard will consolidate key statistics and insights from DocumentDB and MongoDB database clusters into a single view. It will display information at various levels (cluster, database, collection, and index) to help users monitor activity, identify potential bottlenecks, and plan optimizations. The dashboard will offer flexibility in how data is updated and stored, ensuring a balance between usability and performance.

Core Features
  1. Cluster-Level Metrics

    • General Cluster Information:
      • Cluster name, connection string, and database version.
      • Status of nodes (e.g., primary, secondary, replica set health).
    • Activity and Operations:
      • Number of active connections.
      • Number of running operations and queued requests.
      • Oplog size and activity (for replica sets, if applicable).
    • Storage Information:
      • Total cluster storage used and available.
  2. Database-Level Metrics

    • List of databases with:
      • Total size and storage utilization.
      • Number of collections per database.
      • Total documents stored.
    • Version Information:
      • Database version compatibility details.
      • Storage engine details (e.g., WiredTiger, if applicable).
  3. Collection-Level Metrics

    • Key Stats for Collections:
      • Total size, document count, and index size.
      • Average document size.
      • Number of indexes per collection.
    • Activity Stats:
      • Number of read and write operations per collection.
      • Locking and contention stats.
  4. Index-Level Metrics

    • Information About Indexes:
      • Index names, types, and fields covered.
      • Index size and usage stats (if available).
      • Index creation or modification timestamps.
  5. Interactive Dashboard Layout

    • Overview Panel: High-level summary of cluster health and activity.
    • Expandable Sections: Allow users to drill down into databases, collections, and indexes.
    • Graphical Visualizations: Use charts and graphs to display:
      • Storage utilization trends.
      • Operations over time (e.g., read/write intensity).
      • Index usage distribution.
  6. Data Update and Persistence

    • Live Updates: Explore whether the dashboard can be live for real-time updates.
    • Manual Refresh: For expensive stats, provide a refresh button with the latest update timestamp displayed.
    • Local Storage for Expensive Stats: Save older stats locally to ensure the dashboard doesn’t show up empty when reopened. Grayed-out older data encourages users to perform a manual refresh.

We Need Your Feedback!

Discussion Areas
  1. Stats of Interest

    • What specific stats would you find most useful at the cluster, database, collection, or index level?
    • Are there additional metrics (e.g., query performance trends, hardware utilization) that would be valuable?
  2. Live vs. Manual Updates

    • Should the dashboard provide live updates for frequently used stats?
    • For more expensive operations, would users prefer manual refresh options or scheduled updates?
  3. Historical Data and Trends

    • How important is access to historical data (e.g., query trends, storage utilization over time)?
    • Would users prefer trends to be visualized directly in the dashboard or exported for external analysis?
  4. Performance Trade-offs

    • Should we prioritize speed and responsiveness for smaller stats, even if it means limiting detail?
    • How should the dashboard handle larger clusters with many databases and collections?

How It Will Work

  1. Data Collection

    • Query the database cluster to retrieve:
      • Cluster-level stats (serverStatus, replSetGetStatus, dbStats).
      • Database-level stats (listDatabases, dbStats).
      • Collection-level stats (collStats).
      • Index-level stats (listIndexes, $indexStats for usage data).
  2. Dashboard Design

    • Overview Panel:
      • Summarize cluster-wide metrics like total storage, active connections, and operations.
    • Database and Collection Panels:
      • Show expandable lists of databases and collections with detailed stats.
    • Index Panel:
      • Display index information and usage data in a compact table or list.
  3. Update and Persistence

    • Provide live updates for frequently queried stats.
    • Offer manual refresh for expensive operations, displaying the last updated timestamp.
    • Cache older stats locally for offline access, graying out data to indicate potential staleness.
  4. Error Handling and Limits

    • Gracefully handle errors or timeouts when querying large clusters.
    • Provide user notifications for long-running queries or stats retrievals.
  5. Visualizations

    • Use charts and graphs for trends and summaries:
      • Line charts for storage growth or operation trends.
      • Pie charts for index usage distribution.

Draft Development Plan

  1. Stats Retrieval and Backend Logic

    • Implement API integrations to fetch cluster, database, collection, and index stats.
    • Develop efficient mechanisms to handle large-scale clusters.
  2. Dashboard UI Design

    • Build an interactive React-based dashboard with expandable sections and charts.
    • Include options for refreshing stats and displaying update timestamps.
  3. Data Storage and Persistence

    • Implement local storage for older stats, ensuring continuity across sessions.
    • Highlight staleness of older data to encourage manual refresh.
  4. Testing and Validation

    • Test with clusters of varying sizes and configurations.
    • Validate stats accuracy and responsiveness.
  5. Documentation and User Guide

    • Provide clear instructions for using the dashboard and understanding metrics.
    • Include examples of common use cases and troubleshooting tips.

What’s Next?

This is the initial concept for the Cluster Status Dashboard. With your feedback, we’ll refine and enhance this feature to make it as practical and user-friendly as possible. Let’s work together to build an indispensable tool for monitoring and optimization of DocumentDB and MongoDB database clusters! 🌟

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the proposal. Start by defining the dashboard scope, supported metrics, update strategy, and UI boundaries before locating the relevant extension code; done would require an agreed design and implementation plan for retrieval, visualization, persistence, error handling, and validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, react, typescript
Domain
database, frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.