To collect a dump of the yugabyte webserver API, which is useful for further debugging by Yugabyte Support, please take the following steps.
First, edit the following script to use correct IPs or hostnames for the yugabyte master servers.
You can view the list of master servers in the platform UI - under the "Nodes" tab look for "master" under the "processes column"
Find the IP address in the first column of this chart:
Now, copy the following script and save to a file called "dump_webui.sh". The script should be created on one of the tserver or master nodes of the cluster.
NOTE: you will need the wget command, available using "yum install -y wget"
#!/bin/bash
# usage: ./dump_webui.sh ${MASTERS} /path/to/yugabyte/bin/
set -x
export MASTERS=$1
export PATH=$2:$PATH
DOWNLOAD_DIR=/tmp/webserver_dump
mkdir -p ${DOWNLOAD_DIR}
cd ${DOWNLOAD_DIR}
# if TLS is enabled, edit the directory to point to the correct cert dir
# and uncomment the following line
#CERTS="--certs_dir_name /home/yugabyte/yugabyte-tls-config/"
for i in `yb-admin --master_addresses=${MASTERS} ${CERTS} list_all_tablet_servers --exclude_dead | tail -n +2 | awk '{print $2}' | awk -F: '{print $1}'`; do
wget -rkE $i:9000
wget -rkE $i:13000/statements
done
for i in `yb-admin --master_addresses=${MASTERS} ${CERTS} list_all_masters | tail -n +2 | awk '{print $2}' | awk -F: '{print $1}'`; do
wget -rkE $i:7000
wget -rkE $i:7000/api/v1/cluster-config
wget -rkE $i:7000/api/v1/tablet-servers
wget -rkE $i:7000/api/v1/health-check
wget -rkE $i:7000/api/v1/tablet-replication
wget -rkE $i:7000/api/v1/tablet-under-replication
wget -rkE $i:7000/api/v1/is-leader
wget -rkE $i:7000/api/v1/masters
wget -rkE $i:7000/api/v1/version
wget -rkE $i:7000/metrics
wget -rkE $i:7000/dump-entities
done
tar -cvzf ${DOWNLOAD_DIR}.tar.gz ${DOWNLOAD_DIR} -C ${DOWNLOAD_DIR}
echo "Tarfile at ${DOWNLOAD_DIR}.tar.gz"
Mark the file executable by using
chmod +x ./dump_webui.sh
Then execute the script, including the path of yugabyte bin folder, and the list of masters
In a platform deployment, this is /home/yugabyte/yb-software/yugabyte-[product-version]/bin
For example:
$ ./dump_webui.sh 10.142.0.56:7100,10.142.0.57:7100,10.142.0.58:7100 /home/yugabyte/yb-software/yugabyte-2.4.0.0-b60-centos-x86_64/bin/
Comments
0 comments
Please sign in to leave a comment.