Giter VIP home page Giter VIP logo

dolphie's Introduction

Dolphie


An intuitive feature-rich top tool for monitoring MySQL in real time

Requirements

  1. Python 3.6+
  2. Packages: rich, pymysql, charset_normalizer, myloginpath, packaging
  3. Unix systems (Windows may work, haven't tested)

Supported MySQL versions

  • MySQL/Percona Server 5.5/5.6/5.7/8.0
  • MariaDB 10+
  • RDS/Aurora

Grants required

Least privilege

  1. PROCESS
  2. SELECT to performance_schema (if used) + pt-heartbeat table (if used)
  3. REPLICATION CLIENT

Recommended

  1. PROCESS
  2. Global SELECT access (good for explaining queries, listing all databases, etc)
  3. REPLICATION CLIENT
  4. SUPER (only required if you want to kill queries)

Features

  • Dolphie uses panels to present groups of data. They can all be turned on/off to have a view of your database server that you prefer (see Help screenshot for panels available)
  • Prefers Performance Schema over Processlist if it's turned on for listing queries. Can be switched to use Processlist by pressing key "1" (or using parameter) since P_S can truncate query length for explaining queries
  • 3 options for finding replica lag in this order of preference:
    • Performance Schema (MySQL 8 only - most accurate, especially for multi-threaded replication)
    • pt-heartbeat table (specified by parameter)
    • SHOW SLAVE STATUS
  • Supports encrypted login credentials via mysql_config_editor
  • Automatic conversion of large numbers & bytes to human-readable
  • Notifies when new version is available
  • Many commands at your fingertips (see Help screenshot)
  • Many valuable statisitics across the available panels that can help you troubleshoot issues and be proactive against them

Usage

  --help                show this help message and exit
  -u USER, --user USER  Username for MySQL
  -p PASSWORD, --password PASSWORD
                        Password for MySQL
  --ask-pass            Ask for password (hidden text)
  -h HOST, --host HOST  Hostname/IP address for MySQL
  -P PORT, --port PORT  Port for MySQL (Socket has precendence)
  -S SOCKET, --socket SOCKET
                        Socket file for MySQL
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        Absolute config file path to use. This should use [client] section. See below for options support [default: ~/.my.cnf]
  -l LOGIN_PATH, --login-path LOGIN_PATH
                        Specify login path to use mysql_config_editor's file ~/.mylogin.cnf for encrypted login credentials. Supercedes config file and supports all options available [default: client]
  -r REFRESH_INTERVAL, --refresh_interval REFRESH_INTERVAL
                        How much time to wait in seconds between each refresh [default: 1]
  -H HEARTBEAT_TABLE, --heartbeat-table HEARTBEAT_TABLE
                        If your hosts use pt-heartbeat, specify table in format db.table to use the timestamp it has for replication lag instead of Seconds_Behind_Master from SHOW SLAVE STATUS
  --ssl-mode SSL_MODE   Desired security state of the connection to the host. Supports: REQUIRED/VERIFY_CA/VERIFY_IDENTITY [default: OFF]
  --ssl-ca SSL_CA       Path to the file that contains a PEM-formatted CA certificate
  --ssl-cert SSL_CERT   Path to the file that contains a PEM-formatted client certificate
  --ssl-key SSL_KEY     Path to the file that contains a PEM-formatted private key for the client certificate
  --hide-dashboard      Start without showing dashboard. This is good to use if you want to reclaim terminal space and not execute the additional queries for it
  --show-trxs-only      Start with only showing queries that are running a transaction
  --additional-columns  Start with additional columns in processlist panel
  --use-processlist     Start with using Processlist instead of Performance Schema for listing queries

Config file with [client] section supports these options:
    host
    user
    password
    port
    socket
    ssl_mode REQUIRED/VERIFY_CA/VERIFY_IDENTITY
    ssl_ca
    ssl_cert
    ssl_key

Feedback

I welcome all questions, bug reports, and requests. If you enjoy Dolphie, please let me know! I'd love to hear from you ๐Ÿ˜ƒ

Dashboard with processlist

dashboard_processlist

Dashboard with InnoDB statisitics + processlist

Screen Shot 2022-09-04 at 4 23 21 AM

Dashboard with replicas

Screen Shot 2022-09-03 at 1 38 43 AM

Explain query

explain

Users list via userstat variable

users

Variable wildcard searching

variables

Help

Screen Shot 2022-09-02 at 7 48 45 PM

dolphie's People

Contributors

charles-001 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.