Skip to content
Last updated

Collect Server log Job

Overview

This job provides the ability to collect and download the server log for servers managed by COM.

Job Template IDResource TypeJob Parameters
2d744494-22d4-4d61-8c65-647ccadeb6b6compute-ops-mgmt/servercollect_ahs_log

Create Job

A job can be created by issuing a POST to the /compute-ops-mgmt/v1/jobs endpoint with the correct payload for the job.

The following properties are used when creating a job:

PropertyJSON TypeDescriptionRequired?
jobTemplatestring (id)The durable Template ID of the jobYes
resourceTypestring (type)The TYPE of the resource the job will operate onYes
resourceIdstring (id)The ID of the resource the job will operate onYes
jobParamsobjectAny additional data required by the jobNo

If the job was created successfully, a 201 Created response is returned. The response includes the job resource which has a job resourceUri that you can use to track the progress of the job.

The server log collection can be downloaded by executing GET on /compute-ops-mgmt/v1/servers/{server_id}/download-logs endpoint.

Job Parameters

This table summarizes the supported properties in jobParams.

PropertyJSON TypeValuesRequired?
collect_ahs_logbooleanWhen enabled, Active Health System (AHS) Log will be downloaded as part of collect server log jobNo

Parameter properties

  • collect_ahs_log: When enabled, AHS log will be downloaded as part of collect server log job .
  • Default : false

Examples

Here are a couple of example request payloads for creating this job.

Example 1

Collect server log which includes AHS collection.

{
   "jobTemplate": "2d744494-22d4-4d61-8c65-647ccadeb6b6",
   "resourceType": "compute-ops-mgmt/server",
   "resourceId": "868703-B21+SGH744YPVP",
   "jobParams": {
      "collect_ahs_log": true
   }
}

Example 2

Collect server log without AHS collection.

{
   "jobTemplate": "2d744494-22d4-4d61-8c65-647ccadeb6b6",
   "resourceType": "compute-ops-mgmt/server",
   "resourceId": "868703-B21+SGH744YPVP",
}