You can use the API to generate log bundles for an environment or products in VMware Aria Suite Lifecycle and use them to troubleshoot issues with deployments, upgrades, or patching.
What is a log bundle?
Log bundles have collective diagnostic information about the
VMware Aria Suite Lifecycle system. You generate and get the log bundle during or after creating an environment and installing products. Each log bundle is a downloadable tar file.
- The environment log bundle includes information about all products installed in the environment. The tar file contains a group of individually zipped product log files.
- The product log bundle includes information about a specific product that is installed in the environment. The tar file contains a log file for a single product that has been compressed and converted to tar format.
Prerequisites
Before generating a log bundle:
- Verify that you are running VMware Aria Suite Lifecycle 8.3 or later.
- Verify that all general prerequisites have been satisfied and that you have your environment ID and product ID. See the prerequisites for Performing Day 2 operations using VMware Aria Suite Lifecycle APIs.
How do I generate and get an environment log bundle?
Verify that you have assigned a environmentId
variable.
To generate a log bundle for an environment, use the following request.
curl -X POST\ '$url/lcm/lcops/api/v2/environments/$environmentId/log-bundles' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ | jq "."
The response includes the request ID that you can use for tracking. Once log bundle generation is complete, use the following request to get the location of the log bundle.
curl -X GET\ '$url/lcm/lcops/api/v2/environments/$environmentId/log-bundles' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ | jq "."
A successful response includes the name and location of the tar files that contain the log bundles for all products installed in the environment. The
logGeneratedTime
is specified in Unix time.
[ { "logGeneratedTime": 1607335811069, "logLocation": "https://lcmIP.mycompany.com/repo/logBundleRepo/environment/dc302831-8232-4820-9479-6921edb86cf7/log-dc302831-8232-4820-9479-6921edb86cf7-1607335811069.tar.gz" }, { "logGeneratedTime": 1607335868688, "logLocation": "https://lcmIP.mycompany.com/repo/logBundleRepo/environment/dc302831-8232-4820-9479-6921edb86cf7/log-dc302831-8232-4820-9479-6921edb86cf7-1607335868688.tar.gz" } ]
How do I generate and get a product log bundle?
Verify that you have assigned environmentId
and productId
variables.
To generate a log bundle for a product that is installed in your environment, use the following request.
curl -X POST\ '$url/lcm/lcops/api/v2/environments/$environmentId/products/$productId/log-bundles' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ | jq "."
The response includes the request ID that you can use for tracking. Once log bundle generation is complete, use the following request to get the location of the log bundle.
curl -X GET\ '$url/lcm/lcops/api/v2/environments/$environmentId/products/$productId/log-bundles' \ -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \ -H 'Content-Type: application/json' \ | jq "."
A successful response includes the name and location of the tar file that contain the log bundles for the product. The
logGeneratedTime
is specified in Unix time.
[ { "logGeneratedTime": 1607335505248, "logLocation": "https://lcmIP.mycompany.com/repo/logBundleRepo/environment/dc302831-8232-4820-9479-6921edb86cf7/vrops/log-dc302831-8232-4820-9479-6921edb86cf7-1607335505248.tar.gz" } ]