Help Center/ Cloud Application Engine/ API Reference/ CAE API/ Monitoring System/ Creating Monitoring System Configurations
Updated on 2025-02-14 GMT+08:00

Creating Monitoring System Configurations

Function

This API is used to create monitoring system configurations.

URI

POST /v1/{project_id}/cae/monitor-system

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. See Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Maximum characters: 16,384

X-Enterprise-Project-ID

No

String

Enterprise project ID.

  • When an environment is created, it will be bound with an enterprise project ID.
  • Enter 0 or up to 36 characters in UUID format with hyphens (-).
  • If this parameter is not specified or set to 0, resources in the default enterprise project are queried.
NOTE:

For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide.

X-Environment-ID

Yes

String

Environment ID.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

api_version

No

String

API version. Fixed value: v1.

Enumerated value:

  • v1

kind

No

String

API type. Fixed value: MonitorSystem.

Enumerated value:

  • MonitorSystem

spec

No

MonitorSystemRequestBodySpec object

Created or updated monitoring system configurations.

Table 4 MonitorSystemRequestBodySpec

Parameter

Mandatory

Type

Description

type

Yes

String

Collection mode.

Enumerated value:

  • apm2

instrumentation

Yes

String

Agent injection mode.

Enumerated values:

  • manual
  • automatic

access_key

No

String

APM 2.0 access key.

access_value

No

String

APM 2.0 access key value.

access_token

No

String

APM 2.0 token.

apm_application

Yes

String

APM 2.0 application.

version

Yes

String

Enhanced Agent version.

image_pull_policy

Yes

String

Agent image update policy.

Enumerated values:

  • Always
  • IfNotPresent

Response Parameters

None

Example Request

Create monitoring system configurations.

POST https://{endpoint}/v1/{project_id}/cae/monitor-system

{
  "api_version" : "v1",
  "kind" : "MonitorSystem",
  "spec" : {
    "type" : "apm2",
    "access_key" : "******",
    "access_value" : "******",
    "master_address" : "https://10*.**.**.96:443",
    "apm_application" : "default",
    "image_pull_policy" : "Always",
    "version" : "1.32.0.14",
    "instrumentation" : "automatic"
  }
}

Example Response

None

Status Code

Status Code

Description

204

The request is successful.

Error Code

For details, see Error Codes.