db_health
DB Health
Monitor your Drupal database size and table growth over time, with interactive visualizations and automated logging.
The db_health module provides site administrators with a clear and actionable overview of their Drupal database. It monitors the total size of the database and each individual table, as well as the number of rows per table. This information is displayed in an easy-to-use interactive graph, helping site maintainers identify tables that are growing unexpectedly and take corrective action before performance issues arise.
Key features
- ✅ Database size monitoring: View the total database size and the size of each table.
- ✅ Table row counts: Monitor the number of rows for every table in your database.
- ✅ Interactive graphs: Analyze your data visually with interactive, filterable graphs.
- ✅ Automated logging: Periodic cron runs log database and table size information, providing a historical record of growth over time.
- ✅ Growth tracking: Quickly identify which tables are increasing in size and might need optimization.
- ✅ Developer & administrator friendly: Useful insights for site optimization, scaling decisions, and troubleshooting.
Use cases
- Keep track of database growth trends.
- Detect bloated tables that might indicate bugs, logging issues, or inefficient data storage.
- Support data-driven maintenance and scaling plans for your Drupal site.
- Help plan for database optimization or archiving.
How it works
- A cron job runs periodically to collect database and table size statistics.
- This data is logged and can be reviewed over time to understand trends.
- An admin interface shows the current state of the database, with sortable tables and interactive graphs.
Installation & Usage
Use Composer (recommended):
composer require drupal/db_health
Enable the module:
drush en db_health
Run a manual database check:
drush db-health:run
View database health metrics
Navigate to Administration > Reports > Database Health (/admin/reports/db-health).
Review table sizes and row counts.
Explore historical trends with interactive graphs.
Automated monitoring
The module includes a cron task that runs periodically, collecting and logging database statistics. Ensure your site's cron is configured properly to keep your metrics up to date.
Donation Support
This project took significant time to develop. If it has helped you save time in your work or business, feel free to contribute any amount you consider fair to support its continued development