dolphie · PyPI

dolphie · PyPI

Телеграм -> @oscave

Skip to main content

Warning Some features may not work without JavaScript. Please try enabling it if you encounter problems.

Search PyPI

Search PyPI

dolphie 4.2.2

pip install dolphie

Latest version

Released: Feb 12, 2024

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

Statistics

View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery

Meta

License: GNU General Public License v3 or later (GPLv3+) (GPL-3.0-or-later)

Author: Charles Thompson

Requires: Python >=3.8, <4.0

Maintainers

vuther

Classifiers

Project description

Dolphie


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

Installation

Requires Python 3.8+

Using PyPi

$ pip install dolphie

Using Poetry

$ curl -sSL https://install.python-poetry.org | python3 -

$ poetry install

Using Homebrew

If you are a Homebrew user, you can install dolphie via

$ brew install dolphie

Using Docker

$ docker pull ghcr.io/charles-001/dolphie:latest
$ docker run -dit --name dolphie ghcr.io/charles-001/dolphie:latest
$ docker exec -it dolphie dolphie -h host.docker.internal -u root --ask-pass

Usage

positional arguments:
  uri                   Use a URI string for credentials - format: mysql://user:password@host:port (port is optional with default 3306)

options:
  --help                show this help message and exit
  -u , --user           Username for MySQL
  -p , --password       Password for MySQL
  -h , --host           Hostname/IP address for MySQL
  -P , --port           Port for MySQL (Socket has precendence)
  -S , --socket         Socket file for MySQL
  --config-file         Dolphie's config file to use [default: ~/.dolphie]
  --mycnf-file          MySQL config file path to use. This should use [client] section. See below for options support [default: ~/.my.cnf]
  -f , --host-cache-file
                        Resolve IPs to hostnames when your DNS is unable to. Each IP/hostname pair should be on its own line using format ip=hostname [default: ~/dolphie_host_cache]
  -q , --host-setup-file
                        Specify location of file that stores the available hosts to use in host setup modal [default: ~/dolphie_hosts]
  -l , --login-path     Specify login path to use with mysql_config_editor's file ~/.mylogin.cnf for encrypted login credentials. Supercedes config file [default: client]
  -r , --refresh_interval
                        How much time to wait in seconds between each refresh [default: 1]
  -H , --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 REPLICA STATUS
  --ssl-mode            Desired security state of the connection to the host. Supports: REQUIRED/VERIFY_CA/VERIFY_IDENTITY [default: OFF]
  --ssl-ca              Path to the file that contains a PEM-formatted CA certificate
  --ssl-cert            Path to the file that contains a PEM-formatted client certificate
  --ssl-key             Path to the file that contains a PEM-formatted private key for the client certificate
  --panels              What panels to display on startup separated by a comma. Supports: dashboard/processlist/graphs/replication/locks/ddl [default: dashboard,processlist]
  --graph-marker        What marker to use for graphs (available options: https://tinyurl.com/dolphie-markers) [default: braille]
  --pypi-repository     What PyPi repository to use when checking for a new version. If not specified, it will use Dolphie's PyPi repository
  --hostgroup           This is used for creating tabs and connecting to them for hosts you specify in Dolphie's config file under a hostgroup section. As an example, you'll have a section called [cluster1] then below it you will list each host on a new line in the format key=host (keys have no meaning). Hosts support optional port (default is whatever port parameter is) in the format host:port. You can also name the tabs by suffixing ~tab_name to the host (i.e. 1=host~tab_name)
  --show-trxs-only      Start with only showing threads that have an active transaction
  --additional-columns  Start with additional columns in Processlist panel
  --historical-locks    Always run the locks query so it can save historical data to its graph instead of only when the Locks panel is open. This query can be expensive in some environments
  -V, --version         Display version and exit

MySQL my.cnf file supports these options under [client] section:
 host
 user
 password
 port
 socket
 ssl_mode REQUIRED/VERIFY_CA/VERIFY_IDENTITY
 ssl_ca
 ssl_cert
 ssl_key

Login path file supports these options:
 host
 user
 password
 port
 socket

Environment variables support these options:
 DOLPHIE_USER
 DOLPHIE_PASSWORD
 DOLPHIE_HOST
 DOLPHIE_PORT
 DOLPHIE_SOCKET

Dolphie config file supports these options under [dolphie] section:
 (str) user
 (str) password
 (str) host
 (int) port
 (str) socket
 (str) ssl_mode
 (str) ssl_ca
 (str) ssl_cert
 (str) ssl_key
 (str) mycnf_file
 (str) login_path
 (str) host_cache_file
 (str) host_setup_file
 (int) refresh_interval
 (str) heartbeat_table
 (str) startup_panels
 (str) graph_marker
 (str) pypi_repository
 (str) hostgroup
 (bool) show_trxs_only
 (bool) show_additional_query_columns
 (bool) historical_locks

Supported MySQL versions

  • MySQL/Percona Server 5.6/5.7/8.0+
  • RDS/Aurora

Grants required

Least privilege

  1. PROCESS (only if you switch to using processlist via P command)
  2. SELECT to performance_schema + pt-heartbeat table (if used)
  3. REPLICATION CLIENT/REPLICATION SLAVE
  4. BACKUP_ADMIN (MySQL 8 only)
  1. PROCESS (only if you switch to using processlist via P command)
  2. Global SELECT access (good for explaining queries, listing all databases, etc)
  3. REPLICATION CLIENT/REPLICATION SLAVE
  4. SUPER (required if you want to kill queries)
  5. BACKUP_ADMIN (MySQL 8 only)

Features

  • Tabs docked at the top to seamlessly switch between connected hosts
  • Hostgroups to make it easy for connecting to multiple hosts at once
  • 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
  • Graphs for many metrics that can give you great insight into how your database is performing
  • Sparkline to show queries per second in a live view
  • 2 options for finding replica lag in this order of precedence:
    • pt-heartbeat table (specified by --heartbeat-table)
    • SHOW SLAVE STATUS
  • Keeps a history of the servers you connect to that provides autocompletion for hostnames in the Host Setup modal
  • Host cache file. This provides users a way to specify hostnames for IPs when their network's DNS can't resolve them. An example use case for this is when you connect to your work's VPN and DNS isn't available to resolve IPs. In my opinion, it's a lot easier to look at hostnames than IPs!
  • 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 with autocompletion for their input

Hostgroups

Hostgroups are a way to easily connect to multiple hosts at once. To set this up, you will create a section in Dolphie's config file with the name you want the hostgroup to be and list each host on a new line in the format key=host (keys have no meaning). Hosts support optional port (default is whatever port parameter is) in the format host:port. You can also name the tabs by suffixing ~tab_name to the host. Once ready, you will use the parameter hostgroup or Host Setup modal to see it in action!

Example:

[cluster1]
1=host1
2=host2:3307
3=host3:3308~[red]production[/red] :ghost:

Things to note

Order of precedence for variables passed to Dolphie:

  1. Command-line
  2. Environment variables
  3. Dolphie's config file
  4. ~/.mylogin.cnf (mysql_config_editor)
  5. ~/.my.cnf

Feedback

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

Project details

Statistics

View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery

Meta

License: GNU General Public License v3 or later (GPLv3+) (GPL-3.0-or-later)

Author: Charles Thompson

Requires: Python >=3.8, <4.0

Maintainers

vuther

Classifiers

Release history Release notifications | RSS feed

This version

4.2.2

Feb 12, 2024

4.2.1

Feb 12, 2024

4.2.0

Feb 12, 2024

4.1.1

Feb 8, 2024

4.1.0

Feb 8, 2024

4.0.0

Feb 5, 2024

3.3.1

Jan 17, 2024

3.3.0

Jan 17, 2024

3.2.0

Nov 19, 2023

3.1.4

Oct 31, 2023

3.1.3

Sep 18, 2023

3.1.2

Sep 7, 2023

3.1.1

Sep 5, 2023

3.0.10

Aug 28, 2023

3.0.9

Aug 23, 2023

3.0.8

Aug 22, 2023

3.0.7

Aug 21, 2023

3.0.6

Aug 21, 2023

3.0.5

Aug 21, 2023

3.0.4

Aug 19, 2023

3.0.3

Aug 19, 2023

3.0.2

Aug 17, 2023

3.0.1

Aug 16, 2023

2.0.18

Jul 11, 2023

2.0.16

Jul 6, 2023

2.0.10

Jul 5, 2023

2.0.7

Jul 4, 2023

2.0.6

Jul 4, 2023

2.0.5

Jul 3, 2023

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dolphie-4.2.2.tar.gz (75.4 kB

view hashes)

Uploaded Feb 12, 2024 source

Built Distribution

dolphie-4.2.2-py3-none-any.whl (82.5 kB

view hashes)

Uploaded Feb 12, 2024 py3

Close

Hashes for dolphie-4.2.2.tar.gz

Hashes for dolphie-4.2.2.tar.gz Algorithm Hash digest SHA256

f8727d86e885cc51d66b7afef747b43ad30000f9d7b22d232de928a667ca4c3a MD5

b778fe973c37c5c8c1818ad014ede3ee BLAKE2b-256

ab3761ae4b07e2107c70f6756279932d82a4c243b2c8ab21b680687deeffce56

Close

Close

Hashes for dolphie-4.2.2-py3-none-any.whl

Hashes for dolphie-4.2.2-py3-none-any.whl Algorithm Hash digest SHA256

63b752edb20ce5292af071b73f1546297b295b2f7c44a4e5891d8ca094534ea6 MD5

600e3d6e233b900318192717f5fa4a7f BLAKE2b-256

98f75a15778d80ac08dc025d50d8025aed82121c9ccf81def4faaaecebe0a951

Close

Help

About PyPI

Contributing to PyPI

Using PyPI


Status: all systems operational

Developed and maintained by the Python community, for the Python community.
Donate today!

"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.

© 2024 Python Software Foundation
Site map

Supported by

AWS Cloud computing and Security Sponsor

Datadog Monitoring

Fastly CDN

Google Download Analytics

Microsoft PSF Sponsor

Pingdom Monitoring

Sentry Error logging

StatusPage Status page

Report Page