SGS16 Trusted Contributor.
Trusted Contributor.
348 views

How to get the executionlog and outputs of certain runbook for last 1 months

Hi All,

   I want to develop a runbook to get the  execution log and outputs of certain runbook for last 1 month. and then pass the result to csv file each CI results in each row.

What is the URL to get all the execution step details and JSON query to get the each execution results and pass the each output to excel sheet?

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

Re: How to get the executionlog and outputs of certain runbook for last 1 months

Hi,

If we are talking about runbooks from the OMi/BSM side of things and you want strictly that information, then you would have to check their documentation and see what their API allows you to see from the historical point of view. 

If you want to further drill down to the flows that are used and get that information then that could be handled fairly easily:

- identify all of the flow uuids that  the runbook utilizes

- get the run execution history for the last 30 days and place it ino the first sheet of a multi-sheet excel file. Save only the run id and the flow uuid (the rest of the data is meaningless for now) into separate collumns

- on the next sheet by using formulas save the execution ids of the uuids you are looking for

- activate all formulas using powershell. By default the oo excell operations will leave the formulas as text, but by running a powershell script that replaces = with = you can enable the formulas.

- on the third sheet save the flow details based on specific per execution id api calls.

Hope this helps,

Vlad 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.