Table of Contents
Overview
This document serves as a comprehensive reference for YugabyteDB DBAs and DevOps engineers, consolidating essential tools, commands, and best practices for effective database management, troubleshooting, and operational excellence.
Understanding the following concepts is crucial when deploying a new application, setting up a new environment, or troubleshooting issues specific to a universe. This helps avoid unexpected surprises like network issues or misconfigurations. Also, it is a best practice to ensure that every DBA or DevOps engineer is familiar with these concepts and tools for efficient database management and incident response.
🚀Most Important:
Get familiar with the Ask AI feature in YugabyteDB documentation
for instant answers! This powerful tool allows you to quickly search for
solutions,
best practices, and troubleshooting steps directly within the docs. Whether
you’re
facing an error, need configuration guidance, or want to understand a specific
feature, Ask AI provides relevant information in seconds.
Make
it a habit to use this feature as your first stop whenever you have a question
or need any help.
Working with YugabyteDB Support
Support Bundle
- This is the most common request from the YugabyteDB support team. A support bundle is a collection of logs, configuration files, and other diagnostic information useful for troubleshooting issues. The support bundle is generated using the Yugabyte Anywhere UI. You can read more about it here.
Promdump
- This is another common request from the YugabyteDB support team. It is a collection of Prometheus metrics useful for troubleshooting issues. You can read more about it here.
- You can download the latest version of promdump from here and keep it on any Linux host that has access to the YugabyteDB Anywhere host.
Sample Command:
./promdump --url=http://yba.example.com:9090 \ --yba_api_token=<API-TOKEN> \ --universe_name=<UniverseName> \ --start_time=2023-04-03T04:00:00Z \ --period=24h \ --batch=15m
moses.pl
- This Perl script collects tablet, configuration, xCluster and some metrics information, analyses it, and produces a SQLite database and a summary report. You can read more about it here.
- You can download the latest version of Moses.pl from here and keep it on any Linux host where you have access to the YugabyteDB Anywhere host.
- You will need the YBA URL, the YBA access token, and the name of the universe whose tablets you want to analyse.
Sample Command:
perl moses.pl --YBA_HOST=https://Your-yba-hostname-or-IP --API_TOKEN=Your-token --univ Your-universe-name
Common YugabyteDB Administrative Tools
yb-admin
- This is the YugabyteDB admin tool, which can be used to perform various administrative tasks that come with the YugabyteDB installation.
- This comes with various options, such as get_load_balancer_state and
list_all_masters. You can read more about it here. - This tool requires two command-line arguments to be passed, such as—- master_addresses and—-certs_dir_name if you are using a secure cluster. It also accepts additional arguments based on the command you are running.
Sample Command:
/home/yugabyte/master/bin/yb-admin --master_addresses=master1:7100,master2:7100,master3:7100 --certs_dir_name=/home/yugabyte/yugabyte-tls-config list_all_masters
yb-ts-cli
- This is the YugabyteDB CLI tool that can be used to perform various administrative tasks, which comes with the YugabyteDB installation. Unlike yb-admin, this tool is used to perform tasks on a specific node.
- This comes with various options such as
flush_tablets,list_tablets. You can read more about it here. - This tool requires two command-line arguments to be passed, such as—- server_address and—-certs_dir_name if you are using a secure cluster. It also accepts additional arguments based on the command you are running.
Sample Command:
/home/yugabyte/tserver/bin/yb-ts-cli --server_address=server1:9100 --certs_dir_name=/home/yugabyte/yugabyte-tls-config list_tablets
Connecting to databases
- Use
ysqlshto connect to the YugabyteDB YSQL database. You can read more about it here. - Use
ycqlshto connect to the YugabyteDB YCQL database. You can read more about it here.
Backup and Restore Tools
- Be familiar with the Distributed Snapshots
- Yugabyte Anywhere uses distributed snapshots to take consistent backups of a universe. You can read more about it here.
- Use
ysql_dumpandysql_dumpallto take logical backups of the YugabyteDB YSQL database. You can read more about it here. - Explore point-in-time recovery (PITR) and incremental backups.
Monitoring & Observability
- Metrics: Regularly monitor key metrics such as latency, throughput, connections, cache hit/miss, replication lag, and disk usage. Use built-in endpoints and dashboards for real-time monitoring. See Metrics guide.
- Alerting: Set up alerts for critical events like node failures, high disk usage, clock skew, and latency spikes. See Performance metrics.
-
Observability: Know where to find and how to interpret YugabyteDB logs for troubleshooting. See Observability.
- Be familiar with
- Log locations and levels
- Live query monitoring
- Tablet information
- And more from observability.
- Be familiar with
Performance & Troubleshooting
-
Query Tuning: Use
pg_stat_statementsandEXPLAINto analyze and optimize queries. See Query tuning. - Cluster Health: Use the YugabyteDB Anywhere dashboard for monitoring cluster health and performance metrics.
Comments
0 comments
Please sign in to leave a comment.