Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster Status Dashboard for MongoDB Clusters 🚀 #2489

Open
tnaum-ms opened this issue Dec 3, 2024 · 0 comments
Open

Cluster Status Dashboard for MongoDB Clusters 🚀 #2489

tnaum-ms opened this issue Dec 3, 2024 · 0 comments

Comments

@tnaum-ms
Copy link
Collaborator

tnaum-ms commented Dec 3, 2024

Cluster Status Dashboard for MongoDB Clusters: Feedback and Collaboration Welcome! 🚀

We’re excited to propose a Cluster Status Dashboard for MongoDB clusters, 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 love your input to refine it further.


Proposed Feature Overview

The Cluster Status Dashboard will consolidate key statistics and insights from MongoDB 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 MongoDB 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).
    • 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:
      • MongoDB version compatibility for databases.
      • WiredTiger or other storage engine details.
  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 MongoDB 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 powerful and user-friendly as possible. Let’s work together to build an indispensable tool for MongoDB cluster monitoring and optimization! 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant