mmumshad
Contributor
Contributor

vCenter Orchestrator API to get Server logs

What is the vCenter/vRealize Orchestrator API to get Server Logs. I have the below API, but it only gives me the System Events. I need to retrieve the detailed log messages as show in the Logs tab in vCenter Orchestrator. Couldn't find an API for that.

GET http://<host>:<port>/api/workflows/{workflowId}/executions/{executionId}/logs/
0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

What is shown on the "Logs" tab is so called system log messages (stored in log files on the file system). In the scripting, they are logged using System.log() statements. By design, they are short lived, and I think there is no API to return them.

The other type of logs are those logged with Server.log(). They are stored in the database and thus live longer. The API you mention returns this type of logs.

So it is recommended to use Server.log() for more important logs that you want to remain longer, and to use System.log() for logs that you dump on console and forget about. This is the current design.

0 Kudos