This API creates or updates a Logstash pipeline used for Logstash Central Management.
-
If the Elasticsearch security features are enabled, you must have the
manage_logstash_pipelinescluster privilege to use this API.
Creates a Logstash pipeline. If the specified pipeline exists, the pipeline is replaced.
-
description - (Optional, string) Description of the pipeline. This description is not used by Elasticsearch or Logstash.
-
last_modified -
(Required, string)
Date the pipeline was last updated. Must be in the
yyyy-MM-dd'T'HH:mm:ss.SSSZZstrict_date_timeformat. -
pipeline - (Required, string) Configuration for the pipeline. For supported syntax, see the Logstash configuration documentation.
-
pipeline_metadata - (Required, object) Optional metadata about the pipeline. May have any contents. This metadata is not generated or used by Elasticsearch or Logstash.
-
pipeline_settings - (Required, object) Settings for the pipeline. Supports only flat keys in dot notation. For supported settings, see the Logstash settings documentation.
-
username - (Required, string) User who last updated the pipeline.
The following example creates a new pipeline named my_pipeline:
PUT _logstash/pipeline/my_pipeline
{
"description": "Sample pipeline for illustration purposes",
"last_modified": "2021-01-02T02:50:51.250Z",
"pipeline_metadata": {
"type": "logstash_pipeline",
"version": "1"
},
"username": "elastic",
"pipeline": "input {}\n filter { grok {} }\n output {}",
"pipeline_settings": {
"pipeline.workers": 1,
"pipeline.batch.size": 125,
"pipeline.batch.delay": 50,
"queue.type": "memory",
"queue.max_bytes.number": 1,
"queue.max_bytes.units": "gb",
"queue.checkpoint.writes": 1024
}
}
If the request succeeds, you receive an empty response with an appropriate status code.