Environment
- YugabyteDB Anywhere (platform) - All versions
Issue
Need the provide logs to Support for troubleshooting
Resolution
Overview
In order to get the logs you require from the UI, there are a number of different methods to follow.
Support Bundle from Platform UI:
In versions 2.16 and above, you can select to use the SupportBundle , which will download all log files from all nodes into one compressed file, which can then be locally checked.
Details of SupportBundle may be found at https://docs.yugabyte.com/preview/yugabyte-platform/troubleshoot/universe-issues/#use-support-bundles
Support Bundle using REST APIs:
- Identify the endpoint (IP address or hostname) and the port of your YugabyteDB cluster
curl --request GET \
--url http://<yba_host>/api/v1/customers/<cUUID>/support_bundle/components \
--header 'Accept: application/json' \
--header 'X-AUTH-YW-API-TOKEN: <AUTH>'
["UniverseLogs","ApplicationLogs","OutputFiles","ErrorFiles","CoreFiles","GFlags","Instance","ConsensusMeta","TabletMeta","YbcLogs","K8sInfo"]
curl --request POST \
--url http://<yba_host>/api/v1/customers/<cUUID>/universes/<universeUUID>/support_bundle \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-AUTH-YW-API-TOKEN: <AUTH>' \
--data '{
"components": [
"UniverseLogs"
],
"endDate": "2023-06-14T06:01:10Z",
"startDate": "2023-06-14T06:02:10Z"
}'
{"taskUUID":"72eee332-9600-46aa-9c8f-a896e6ec88a4","resourceUUID":"adfedf31-0720-46d7-8c90-b8155f6f19cc"}
curl --request GET --url http://<yba_host>/api/v1/customers/<cUUID>/universes/<UniverseUUID>/support_bundle --header 'Accept: application/json' --header 'X-AUTH-YW-API-TOKEN: <AUTH>' | jq
[
{
"bundleUUID": "cd475f33-7dec-41dc-9765-94820cc0aea9",
"path": "/opt/yugabyte/yugaware/data/yb-support-bundle-Incremental-backup-poc-20230615060116.640-logs.tar.gz",
"scopeUUID": "9c57f19c-6464-4718-8738-17d881f245d9",
"startDate": "2023-06-14T06:01:10Z",
"endDate": "2023-06-15T06:01:10Z",
"bundleDetails": {
"components": [
"UniverseLogs",
"ApplicationLogs",
"YbcLogs"
]
},
"status": "Success",
"sizeInBytes": 693667826,
"expirationDate": "2023-06-25T00:00:00Z",
"creationDate": "2023-06-15T00:00:00Z"
},
{
"bundleUUID": "fc30a584-7075-4fd3-af2d-67cb330bb616",
"path": "/opt/yugabyte/yugaware/data/yb-support-bundle-Incremental-backup-poc-20230615065108.927-logs.tar.gz",
"scopeUUID": "9c57f19c-6464-4718-8738-17d881f245d9",
"startDate": "2023-06-08T06:51:01Z",
"endDate": "2023-06-15T06:51:01Z",
"bundleDetails": {
"components": [
"UniverseLogs",
"ApplicationLogs",
"YbcLogs"
]
},
"status": "Success",
"sizeInBytes": 2024897732,
"expirationDate": "2023-06-25T00:00:00Z",
"creationDate": "2023-06-15T00:00:00Z"
}
]
curl --request GET \ --url https://stoplight.io/mocks/yugabyte/yugabyte-platform/18947515/api/v1/customers/cUUID/universes/uniUUID/support_bundle/sbUUID/download \ --header 'Accept: application/x-compressed' \ --header 'X-AUTH-YW-API-TOKEN: '
curl --request GET --url http://<yba_host>/api/v1/customers/2ba90b01-c44b-400d-8b5c-a80edf20e84a/universes/9c57f19c-6464-4718-8738-17d881f245d9/support_bundle/fc30a584-7075-4fd3-af2d-67cb330bb616/download --header 'Accept: application/x-compressed' --header 'X-AUTH-YW-API-TOKEN: 0cc6d5f6-172b-4cea-8e6d-92f98ef25d85' -o fc30a584-7075-4fd3-af2d-67cb330bb616.tar.gz
Individual Logs from the UI:
1. Get the logs from the 'Logs' entry in the dropdown menu:
Navigate to YBAnywhere
Select the person dropdown menu on the top right of the window
Select 'Logs' and you will see the application logs.
Note that you can select a particular universe, limit the number of lines shown and search for a particular expression using regex.
2. Get the logs for each Master/Tserver:
To get the log files from the Master/TServer, select 'Universes' then 'Nodes' and click on the 'Actions' drop down for the node you would like
Click on 'Download Logs' from the dropdown and accept downloads if required.
A compressed file will be stored to your disk called <IP ADDRESS>-logs[-n].tar where IP ADDRESS is the IP address of the server, and -n indicate the number of downloads for said file.
When you uncompress the file, you will see directories for 'master' and 'tserver', under which will be a logs directory containing the relevant log files.
Additional Information:
How to send logs & diagnostic data to Yugabyte Support : How to send logs & diagnostic data to Yugabyte Support
Comments
0 comments
Please sign in to leave a comment.