Docs Menu
Docs Home
/
MongoDB Cloud Manager
/ / /

Get One Log Collection Job

On this page

  • Resource
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Example Request
  • Example Response
  • Response Header
  • Response Body

Note

Groups and projects are synonymous terms. Your {PROJECT-ID} is the same as your project id. For existing groups, your group/project id remains the same. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

When you create a log collection job, Cloud Manager starts a background job to download the logs from the specified Cloud Manager deployment. Use this endpoint to retrieve a single log collection job by its unique identifier.

Base URL: https://cloud.mongodb.com/api/public/v1.0

GET /groups/{GROUP-ID}/logCollectionJobs/{JOB-ID}
Name
Type
Necessity
Description
GROUP-ID
string
Required
Unique 24-hexadecimal digit string that identifies the log collection request job.
JOB-ID
string
Required
Unique 24-hexadecimal digit string that identifies the log collection job to retry. Use the Get All Log Collection Jobs for One Project endpoint to obtain the IDs associated with your project.
Name
Type
Description
Default
pageNum
integer
Page number (1-index based).
1
itemsPerPage
integer
Number of items to return per page, up to a maximum of 500.
100
pretty
boolean
false
envelope
boolean

Indicates whether or not to wrap the response in an envelope.

Some API clients cannot access the HTTP response headers or status code. To remediate this, set "envelope" : true in the query.

For endpoints that return one result, response body includes:

Name
Description
status
HTTP response code
content
Expected response body

For endpoints that return a list of results, the results object is an envelope. Cloud Manager adds the status field to the response body.

None
verbose
Boolean
If true, returns all child jobs in the response. A log collection job contains child jobs for each log type and MongoDB process included in the request.
false

This endpoint doesn't use HTTP request body parameters.

Name
Type
Description
childJobs
array
List of child jobs associated with this request. Included in the response if you set tthe verbose query parameter to true.
childJobs[n].errorMessage
string
Error message showing why this child job failed, if applicable.
childJobs[n].finishDate
string
Timestamp in ISO 8601 date and time format in UTC when this child job finished.
childJobs[n].hostName
string
Name of the host from whom the child job collects the logs.
childJobs[n].logCollectionType
string

Type of log this child job collects. Returns one of the following values:

  • AUTOMATION_AGENT

  • BACKUP_AGENT

  • MONITORING_AGENT

  • MONGODB

  • FTDC

childJobs[n].path
string

Path to the process in the deployment for which this child job collects logs. MongoDB Atlas uses these paths to build the directory hierarchy in the compressed archive file.

logCollectionType
Path
AUTOMATION_AGENT
<hostname>/automation_agent
BACKUP_AGENT
<hostname>/automation_agent
MONITORING_AGENT
<hostname>/automation_agent
MONGODB
<hostname>/<port>/<mongodb>
FTDC
<hostname>/<port>/<ftdc>
childJobs[n].startDate
string
Timestamp in ISO 8601 date and time format in UTC when this child job started.
childJobs[n].status
string

Status of this child job. This resource returns one of the following values:

  • SUCCESS

  • FAILURE

  • IN_PROGRESS

  • MARKED_FOR_EXPIRY

  • EXPIRED

childJobs[n].uncompressedDiskSpaceBytes
number
Total uncompressed disk space in bytes that this child job uses.
creationDate
string
Timestamp, in the number of seconds that have elapsed since the UNIX epoch when you created the log collection request job.
expirationDate
string
Timestamp, in the number of seconds that have elapsed since the UNIX epoch when the log collection request job expires.
groupId
string
Unique 24-hexadecimal digit string that identifies the project associated with log collection request.
id
string
Unique 24-hexadecimal digit string that identifies the log collection request job.
logTypes
array

List of log types included in this request. This resource returns one or more of the following values:

  • AUTOMATION_AGENT

  • BACKUP_AGENT

  • MONITORING_AGENT

  • MONGODB

  • FTDC

redacted
boolean
Flag that indicates whether the request replaces emails, hostnames, IP addresses, and namespaces in the response with random string values.
resourceName
string
Name of the resource for which you requested logs.
resourceType
string

Type of resource for which you requested logs. This resource returns one of the following values:

  • CLUSTER

  • PROCESS

  • REPLICA_SET

rootResourceName
string
Name of the complete deployment if you made the log request to a part of a deployment. Part of the deployment could be a replica set in a cluster or one shard of a sharded cluster.
rootResourceType
string

Type of the part of the complete deployment if you made the log request to a part of a deployment. Part of the deployment could be a replica set in a cluster or one shard of a sharded cluster. This resource returns one of the following values:

  • CLUSTER

  • PROCESS

  • REPLICA_SET

status
string

Status of the log collection request job. This resource returns one of the following values:

  • SUCCESS

  • FAILURE

  • IN_PROGRESS

  • MARKED_FOR_EXPIRY

  • EXPIRED

sizeRequestedPerFileBytes
number
Size for each log file in bytes.
uncompressedSizeTotalBytes
number
Total uncompressed size of the log data in bytes that this request returns.
userId
string
Unique 24-hexadecimal digit string that identifies the user executing the request.
url
string
Internet address from which you download the logs from this request.
1curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
2 --header "Accept: application/json" \
3 --include \
4 --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{GROUP-ID}/logCollectionJobs/{JOB-ID}?verbose=true&pretty=true"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
1{
2 "childJobs": [
3 {
4 "automationAgentId": "5c81086e014b76a3d85e1123",
5 "errorMessage": null,
6 "finishDate": "2019-03-07T12:02:57Z",
7 "hostName": "server1.example.com",
8 "logCollectionType": "AUTOMATION_AGENT",
9 "path": "server1.example.com/automation_agent",
10 "startDate": "2019-03-07T12:02:54Z",
11 "status": "SUCCESS",
12 "uncompressedDiskSpaceBytes": 12827
13 },
14 {
15 "automationAgentId": "5c81086e014b76a3d85e1117",
16 "errorMessage": null,
17 "finishDate": "2019-03-07T12:02:57Z",
18 "hostName": "server1.example.com:27027",
19 "logCollectionType": "MONGODB",
20 "path": "server1.example.com/27027/mongodb",
21 "startDate": "2019-03-07T12:02:54Z",
22 "status": "SUCCESS",
23 "uncompressedDiskSpaceBytes": 9292
24 },
25 ...
26 ],
27 "creationDate": "2019-03-07T12:02:54Z",
28 "downloadUrl": "https://cloud.mongodb.com/api/public/v1.0/groups/{GROUP-ID}/logCollectionJobs/5c81086e014b76a3d85e1113/download",
29 "expirationDate": "2019-05-06T12:02:54Z",
30 "groupId": "5c8100bcf2a30b12ff88258f",
31 "id": "5c81086e014b76a3d85e1113",
32 "logTypes": [
33 "AUTOMATION_AGENT",
34 "MONGODB",
35 "FTDC"
36 ],
37 "redacted": false,
38 "resourceName": "myReplicaSet",
39 "resourceType": "replicaset",
40 "rootResourceName": "myReplicaSet",
41 "rootResourceType": "replicaset",
42 "sizeRequestedPerFileBytes": 1000,
43 "status": "IN_PROGRESS",
44 "uncompressedSizeTotalBytes": 44518,
45 "userId": "5c80f75fcf09a246878f67a4"
46}

Back

Get All Log Collection Jobs for One Project

Next

Download Logs from a Log Collection Job