Environment
- YugabyteDB - All Versions
Issue
Occasionally, the support or development teams may request that you use the Yugatool utility to perform certain tasks. For example, this utility has the ability to generate reports that can assist with analysis of consensus or table state issues in a YugabyteDB Universe. This article provides instructions for common uses of the Yugatool utility.
Resolution
Overview
The Yugatool utility can be used to generate reports. For example:
- A "tablet info" report, showing the information for a specific table shard ("tablet").
- A "cluster info tablet" report (often just called a "tablet report"), showing various information about all the tables and tablets for a database, as well as the tablet servers that are serving them.
In order to generate reports or use other Yugatool functionality, you will need the following information:
- The type of report to run.
- A list of the master addresses for the Universe.
- If TLS has been enabled for the Universe, the path to the CA and client TLS certificates.
Note: The current version of Yugatool as of the publication date of this article is:
$ ./yugatool --version
yugatool version 56076bdcaf86ba28097bb1db6a1732a6d54c24de
Steps
1. Download the attached yugatool.gz file, copy it to the master leader node (or another Linux system that can reach the master leader of the YugabyteDB Universe), extract it, and mark it executable:
gunzip yugatool.gz
chmod +x yugatool
2. Export the list of master addresses for the Universe as an environment variable for use in later commands. For example:
export MASTERS=10.0.0.1:7100,10.0.1.1:7100,10.0.2.1:7100
Replace the master addresses with the correct master addresses for your Universe. The IP addresses of the masters can be found in the Nodes tab of the YugabyteDB Anywhere (formerly Yugabyte Platform) interface.
If TLS encryption is not enabled for this Universe, skip steps 3 and 4.
3. If TLS encryption is enabled for the Universe, export the paths to the TLS certificates as an environment variable:
export TLS_CONFIG="--cacert /home/yugabyte/.yugabytedb/root.crt \
--client-cert /home/yugabyte/.yugabytedb/yugabytedb.crt \
--client-key /home/yugabyte/.yugabytedb/yugabytedb.key"
Replace the paths to the certificate and key files with the appropriate values if these files are in a non-default location.
If the Universe is using CA-signed certificates, skip step 4.
4. If the Universe is using self-signed TLS certificates, add the --skiphostverification flag to the TLS_CONFIG environment variable:
export TLS_CONFIG="$TLS_CONFIG --skiphostverification"
5. Run Yugatool to generate the requested report. For example, to generate a tablet report and display it at the console:
./yugatool cluster_info \
-m $MASTERS \
$TLS_CONFIG \
--tablet-report
To save the report to a file, use a redirect. For example:
./yugatool cluster_info \
-m $MASTERS \
$TLS_CONFIG \
--tablet-report \
> /tmp/tablet-report-$(hostname).out
To generate a report in JSON format, add the -o flag:
./yugatool cluster_info \
-m $MASTERS \
$TLS_CONFIG \
--tablet-report \
-o json \
> /tmp/tablet-report-$(hostname).json
6. Compress the resulting report file:
gzip /tmp/tablet-report-yb-dev-testuniverse-n1.json
7. Upload the resulting report to your Zendesk ticket.
Comments
0 comments
Please sign in to leave a comment.