dargslan-mysql-health
MySQL/MariaDB Health Checker — Monitor connections, slow queries, replication status, and database sizes. Zero external dependencies (uses mysql CLI client).
Installation
pip install dargslan-mysql-health
CLI Usage
# Full health report
dargslan-mysql report
# Connection statistics
dargslan-mysql connections
# Slow query info
dargslan-mysql slow
# Database sizes
dargslan-mysql databases
# Replication status
dargslan-mysql replication
# All issues
dargslan-mysql issues
# JSON output
dargslan-mysql json
# Custom connection
dargslan-mysql report -H 10.0.0.5 -P 3306 -u admin
Python API
from dargslan_mysql_health import MySQLHealth
mh = MySQLHealth(host='localhost', user='root')
# Full audit
issues = mh.audit()
# Specific checks
conn = mh.connection_status()
slow = mh.slow_queries()
dbs = mh.database_sizes()
repl = mh.replication_status()
# Server info
info = mh.server_info()
# Formatted report
mh.print_report()
Health Checks
| Check | Severity | Description |
|---|---|---|
| Connection usage >80% | Warning | Too many active connections |
| Connection usage >95% | Critical | Nearly maxed out connections |
| Slow query log off | Info | Slow query logging disabled |
| High slow queries | Warning | >1000 slow queries recorded |
| Replication broken | Critical | IO/SQL thread not running |
| Replication lag | Warning | >60 seconds behind master |
Environment Variables
| Variable | Description |
|---|---|
MYSQL_USER |
Default MySQL username |
MYSQL_PASSWORD |
Default MySQL password |
More from Dargslan
- Dargslan.com — Linux & DevOps eBook Store
- Free Cheat Sheets — 300+ downloadable PDFs
- Blog & Tutorials — 300+ in-depth articles
- All Python Tools — 20+ CLI packages
License
MIT — see LICENSE
Metadata
Release files for dargslan-mysql-health 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dargslan_mysql_health-1.0.0.tar.gz | 5.9 kB | Without provenance | Details for dargslan_mysql_health-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dargslan_mysql_health-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for dargslan_mysql_health-1.0.0-py3-none-any.whl |
Total release size: 12.9 kB
Release files / dargslan_mysql_health-1.0.0.tar.gz
| Download URL | dargslan_mysql_health-1.0.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a4fc79a19aa876a131f3fbdae0e5906d6c4968016486a29e0c4a138145d061c
|
|
BLAKE2b-256 checksum How to use checksums |
db0afbc51aab4c334823b70bc7b386fc576bc22655142b992ac4e2aa3241dc41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / dargslan_mysql_health-1.0.0-py3-none-any.whl
| Download URL | dargslan_mysql_health-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6963d2fdffc77571a82055b7ff09c6052a710a1d6ed71d38900d0c280ff1ba29
|
|
BLAKE2b-256 checksum How to use checksums |
312cef5bbf7aa55a26dc1b907150b402633364e5cf536eefe6de29f71439956a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for dargslan-mysql-health 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.