How to access historic change logs of all changes applied by an instance of Ops Manager
search cancel

How to access historic change logs of all changes applied by an instance of Ops Manager

book

Article ID: 293729

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

When you export the support bundle, it includes 5 most recent change logs. In some cases, you may be requested to provide a change log from the past.

You can view all past historic change logs to date in the Ops Manager GUI > Change Log tab but it is not possible to export them from there. However, you can see the ID of each change log.

This is because Ops Manager GUI accesses installation_logs table in the Ops Manager database, which are stored in binary and are converted by the Ops Manager client to be viewed by the operators.

This article covers how to access historic change logs of all changes applied by an instance of Ops Manager.

Environment

Product Version: 2.10

Resolution

Prerequisites

Access to Ops Manager (FQDN, username and password).


Accessing API endpoints communicating with Ops Manager

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:

  • /api/v0/installations - JSON array of all installations performed; including change log ID, additions/deletions/updates, status, and finished timestamp.
  • /api/v0/installations/CHANGELOG_ID/logs - semi-structured log data from a specific change log.

There are two options to access these API endpoints. You can either use the Ops Manager (om) CLI or a Curl command.


Using om CLI

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.


Curl command

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.