In order to access a historic change log you will have to access the following API endpoints that communicate with the Ops Manager database and redirect the output into a file if needed:
There are two options to access these API endpoints. You can either use the Ops Manager (om) CLI or a Curl command.
Prerequisites
You have the following installed:
1. Login to Ops Manager VM and create an env.yml file that will be used by the OM CLI:
--- target: https://OPSMAN-FQDN username: OPSMAN-USERNAME password: OPSMAN-PASSWORD connect-timeout: 30 # default 5 request-timeout: 1800 # default 1800 skip-ssl-validation: true # default false
2. Run the following command to retrieve the JSON array of all installations performed. The ID of each change log should match the IDs from Ops Manager GUI > Change Log tab.
om -e env.yml curl -p /api/v0/installations | jq
3. Run the following command to retrieve the log data from a specific change log.
om -e env.yml curl -p /api/v0/installations/CHANGELOG_ID/logs | jq -r .logs
Note: The output will be very long and we recommend redirecting the output to a separate file.
Prerequisites
You have the following installed:
1. Login to Ops Manager VM and use the UAAC to target Ops Manager UAA server in order to retrieve the access token that will be used to perform the curl command. For more information on retrieving the access token, refer to:
With the retrieved access token, you can perform the curl commands in the following steps.
2. Run the following command to retrieve the JSON array of all installations performed. The ID of each change log should match the IDs from Ops Manager GUI > Change Log tab.
curl "https://OPSMAN-FQDN/api/v0/installations" -X GET -H "Authorization: Bearer YOUR-ACCESS-TOKEN" | jq
3. Run the following command to retrieve the log data from a specific change log.
curl "https://OPSMAN-FQDN/api/v0/installations/CHANGELOG_ID/logs" -X GET -H "Authorization: Bearer YOUR-ACCESS-TOKEN" | jq -r .logs
Note: The output will be very long and we recommend redirecting the output to a separate file.