Updates the configuration of the X-Pack Monitoring feature of a Logstash cluster.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers and does not have operation-specific request headers. For more information, see the "Common request parameters" section of the "Common parameters" topic.

Request syntax

POST /openapi/logstashes/{InstanceId}/xpack-monitor-config HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes ls-cn-oew1qbgl****

The ID of the Logstash instance.

ClientToken String Query No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

Object Body No

The configuration information of X-Pack monitoring.

enable Boolean Body No true

Indicates whether X-Pack monitoring is enabled. Valid values:

  • true: enables instant image cache.
  • false: disables reuse of image cache layers.
endpoints Array of String Body No http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200

The endpoint of the Elasticsearch instance.

userName String Body No elastic

The username that is used to access the Elasticsearch cluster.

password String Body No ******

The password that is used to access the Elasticsearch cluster.

Response parameters

Parameter Type Example Description
Result Boolean true

Returned results:

  • true: The update was successful.
  • false: The update failed.
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D***

The ID of the request.


Sample requests

POST /openapi/logstashes/ls-cn-oew1qbgl****/xpack-monitor-config?ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1

  "enable" : true,
  "endpoints" : [ "http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200" ],
  "userName" : "elastic",
  "password" : "******"

Sample success response

JSON format

HTTP/1.1 200 OK

  "Result" : true,
  "RequestId" : "30A59FC7-609B-4C12-B6EF-991A5CA7****"

Error codes

For a list of error codes, visit the API Error Center.